diff --git a/dawn-gateway/staging b/dawn-gateway/staging
index 66698f76548e7e797ed406db782af4a6725ab2fc..e7fadf935b7d9f7ee2541e70ad1d11a83744039d 100644
--- a/dawn-gateway/staging
+++ b/dawn-gateway/staging
@@ -1,53 +1 @@
-pipeline {
-  agent any
-  tools {
-        go 'go-1.16'
-  }
-  options {
-    buildDiscarder logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '5', daysToKeepStr: '', numToKeepStr: '5')
-  }
-  stages {
-      
-      stage('checkout') {
-        steps {
-            git branch: 'staging',
-                credentialsId: 'tucker-gitlab-login',
-                url: 'https://gitlab.cs.umd.edu/dawn/go-backend/dawn-gateway.git'
-
-            sh "ls -lat"
-        }
-    }
-     
-    stage('test') {
-      steps {
-        sh """
-            dawn-cli test
-        """ 
-      }
-    }
-
-    stage('build') {
-      steps {
-        sh """
-            dawn-cli build-image -p .
-        """ 
-      }
-    }
-
-    stage('update backend services') {
-      steps {
-        git branch: 'main',
-                credentialsId: 'tucker-gitlab-login',
-                url: 'https://gitlab.cs.umd.edu/dawn/go-backend/dawn-cli'
-        sh """
-            dawn-cli deploy
-        """ 
-      }
-    }
-  }
-  post {
-        always {
-              cobertura autoUpdateHealth: false, autoUpdateStability: false, coberturaReportFile: '**/coverage.xml', enableNewApi: true, failUnhealthy: false, failUnstable: false, lineCoverageTargets: '80, 40, 60', maxNumberOfBuilds: 0, onlyStable: false, sourceEncoding: 'ASCII', zoomCoverageChart: false
-        }
-    }
-}
\ No newline at end of file
+backendServicePipeline "https://gitlab.cs.umd.edu/dawn/go-backend/dawn-gateway.git", "staging"
\ No newline at end of file
diff --git a/vars/backendServicePipeline.groovy b/vars/backendServicePipeline.groovy
index 551571fbd5ef4c23887cf98e64e1a7009408c752..e785de831021743caab19b45406436668bd2ae54 100644
--- a/vars/backendServicePipeline.groovy
+++ b/vars/backendServicePipeline.groovy
@@ -1,4 +1,4 @@
-def call(String repo, String branch) {
+def call(String repo, String branch, Bool) {
     pipeline {
   agent any
   tools {
@@ -25,6 +25,15 @@ def call(String repo, String branch) {
       }
     }
 
+    stage("build docs") {
+      steps {
+        sh """
+            go get https://github.com/swaggo/swag
+            swag init --parseDependency --parseDepth 2
+        """ 
+      }
+    }
+
     stage('build') {
       steps {
         sh """