Reduce shell calls to single steps
authorJan Dittberner <jan@dittberner.info>
Sun, 27 Aug 2017 19:37:26 +0000 (21:37 +0200)
committerJan Dittberner <jan@dittberner.info>
Sun, 27 Aug 2017 19:37:26 +0000 (21:37 +0200)
Jenkinsfile

index acc6234..a99c722 100644 (file)
@@ -11,17 +11,15 @@ pipeline {
             steps {
                 sh "rm -rf '${GOPATH}/src/git.cacert.org' ; mkdir -p '${GOPATH}/src/git.cacert.org'"
                 sh "ln -s '${pwd()}' '${GOPATH}/src/git.cacert.org/cacert-boardvoting'"
-                dir(path: "${GOPATH}/src/git.cacert.org/cacert-boardvoting") {
-                    sh "go get -u github.com/golang/dep/cmd/dep"
-                    sh "${GOPATH}/bin/dep ensure -v"
+                dir("${GOPATH}/src/git.cacert.org/cacert-boardvoting") {
+                    sh "go get -u github.com/golang/dep/cmd/dep && '${GOPATH}/bin/dep' ensure -v"
                 }
             }
         }
         stage('Build') {
             steps {
-                dir(path: "${GOPATH}/src/git.cacert.org/cacert-boardvoting") {
-                    sh 'make clean'
-                    sh 'make'
+                dir("${GOPATH}/src/git.cacert.org/cacert-boardvoting") {
+                    sh 'make clean && make'
                 }
             }
         }