Browse Source

only deploy from master branch

Steven Jacobs 1 year ago
parent
commit
d3ae0470fb
1 changed files with 6 additions and 1 deletions
  1. 6 1
      Jenkinsfile

+ 6 - 1
Jenkinsfile

@@ -7,9 +7,14 @@ pipeline {
                 sh './bin/build'
             }
         }
-        stage('Deploy') {
+        stage('Save Artifacts') {
             steps {
                 archiveArtifacts(artifacts: 'dist/**/*.gz')
+            }
+        }
+        stage('Deploy Artifacts') {
+            when { branch 'master' }
+            steps {
                 // work around s3Upload globbing limitations
                 sh 'mkdir dist/public && find dist/ -name "*.gz" -type f -exec mv {} dist/public/ \\;'
                 withAWS(credentials: 'iam-jenkins', region: 'us-east-1') {