Skip to content

Commit 950e1ad

Browse files
author
Vaughn Dice
committed
feat(Jenkinsfile): send slack channel to downstream test job
1 parent 6c9c935 commit 950e1ad

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

Jenkinsfile

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -203,13 +203,11 @@ stage 'Trigger e2e tests'
203203
// If build is on master, trigger workflow-test, otherwise, assume build is a PR and trigger workflow-test-pr
204204
waitUntil {
205205
try {
206-
if (git_branch == "remotes/origin/master") {
207-
build job: '/workflow-test', parameters: [[$class: 'StringParameterValue', name: 'WORKFLOW_CLI_SHA', value: git_commit],
208-
[$class: 'StringParameterValue', name: 'COMPONENT_REPO', value: 'workflow-cli']]
209-
} else {
210-
build job: '/workflow-test-pr', parameters: [[$class: 'StringParameterValue', name: 'WORKFLOW_CLI_SHA', value: git_commit],
211-
[$class: 'StringParameterValue', name: 'COMPONENT_REPO', value: 'workflow-cli']]
212-
}
206+
def downstreamJob = git_branch == "remotes/origin/master" ? '/workflow-test' : '/workflow-test-pr'
207+
build job: downstreamJob, parameters: [
208+
[$class: 'StringParameterValue', name: 'WORKFLOW_CLI_SHA', value: git_commit],
209+
[$class: 'StringParameterValue', name: 'COMPONENT_REPO', value: 'workflow-cli'],
210+
[$class: 'StringParameterValue', name: 'UPSTREAM_SLACK_CHANNEL', value: '#controller']]
213211
true
214212
} catch(error) {
215213
if (git_branch == "remotes/origin/master") {

0 commit comments

Comments
 (0)