Skip to content

Commit cde39f9

Browse files
committed
GLSP-1607: Fix deployment (#120)
Update jenkins job to pass its artifact url to the deployment job. This ensures that the deployment job can download the build client bundles before building the update site Fixes eclipse-glsp/glsp/issues/1607
1 parent 92cda51 commit cde39f9

File tree

1 file changed

+13
-19
lines changed

1 file changed

+13
-19
lines changed

Jenkinsfile

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ spec:
3131
readOnly: true
3232
- name: m2-repo
3333
mountPath: /home/jenkins/.m2/repository
34-
- name: volume-known-hosts
35-
mountPath: /home/jenkins/.ssh
3634
volumes:
3735
- name: "jenkins-home"
3836
emptyDir: {}
@@ -46,9 +44,6 @@ spec:
4644
path: settings.xml
4745
- name: m2-repo
4846
emptyDir: {}
49-
- name: volume-known-hosts
50-
configMap:
51-
name: known-hosts
5247
"""
5348
pipeline {
5449
agent {
@@ -79,9 +74,10 @@ pipeline {
7974
if (sh(returnStatus: true, script: 'git diff --name-only | grep -q "^client/yarn.lock"') == 0) {
8075
echo 'The yarn.lock file has uncommited changes!'
8176
error 'The yarn.lock file has uncommited changes!'
82-
}
77+
}
8378
}
8479
}
80+
archiveArtifacts artifacts: 'client/examples/workflow-webapp/app/**', fingerprint: true
8581
}
8682
}
8783
}
@@ -125,23 +121,21 @@ pipeline {
125121
}
126122

127123
stage('Deploy (master only)') {
128-
when {
124+
when {
129125
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
135130
}
136131
}
137132
}
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+
]
145139
}
146140
}
147141
}

0 commit comments

Comments
 (0)