|
31 | 31 | readOnly: true |
32 | 32 | - name: m2-repo |
33 | 33 | mountPath: /home/jenkins/.m2/repository |
34 | | - - name: volume-known-hosts |
35 | | - mountPath: /home/jenkins/.ssh |
36 | 34 | volumes: |
37 | 35 | - name: "jenkins-home" |
38 | 36 | emptyDir: {} |
|
46 | 44 | path: settings.xml |
47 | 45 | - name: m2-repo |
48 | 46 | emptyDir: {} |
49 | | - - name: volume-known-hosts |
50 | | - configMap: |
51 | | - name: known-hosts |
52 | 47 | """ |
53 | 48 | pipeline { |
54 | 49 | agent { |
@@ -79,9 +74,10 @@ pipeline { |
79 | 74 | if (sh(returnStatus: true, script: 'git diff --name-only | grep -q "^client/yarn.lock"') == 0) { |
80 | 75 | echo 'The yarn.lock file has uncommited changes!' |
81 | 76 | error 'The yarn.lock file has uncommited changes!' |
82 | | - } |
| 77 | + } |
83 | 78 | } |
84 | 79 | } |
| 80 | + archiveArtifacts artifacts: 'client/examples/workflow-webapp/app/**', fingerprint: true |
85 | 81 | } |
86 | 82 | } |
87 | 83 | } |
@@ -125,23 +121,21 @@ pipeline { |
125 | 121 | } |
126 | 122 |
|
127 | 123 | stage('Deploy (master only)') { |
128 | | - when { |
| 124 | + when { |
129 | 125 | allOf { |
130 | | - branch 'master'; |
131 | | - expression { |
132 | | - /* Only trigger the deployment job if the changeset contains changes in |
133 | | - the `server` or `client/packages/` directory */ |
134 | | - sh(returnStatus: true, script: 'git diff --name-only HEAD^ | grep -q "^server"') == 0 |
| 126 | + branch 'master' |
| 127 | + expression { |
| 128 | + /* Only trigger deployment if the changeset contains changes in `server` or `client/packages` directories */ |
| 129 | + sh(returnStatus: true, script: 'git diff --name-only HEAD^ | grep -q "^server\\|^client"') == 0 |
135 | 130 | } |
136 | 131 | } |
137 | 132 | } |
138 | | - stages { |
139 | | - stage('Deploy server (P2)') { |
140 | | - steps { |
141 | | - build job: 'deploy-ide-p2-nightly', wait: false |
142 | | - } |
143 | | - |
144 | | - } |
| 133 | + steps { |
| 134 | + build job: 'deploy-ide-p2-nightly', |
| 135 | + wait: false, |
| 136 | + parameters: [ |
| 137 | + string(name: 'ARTIFACT_URL', value: "${env.BUILD_URL}artifact/client/examples/workflow-webapp/app/*zip*/app.zip") |
| 138 | + ] |
145 | 139 | } |
146 | 140 | } |
147 | 141 | } |
|
0 commit comments