Skip to content

Commit 631b663

Browse files
Selective notifications
1 parent a839819 commit 631b663

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

Jenkinsfile

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@
1818
*/
1919
def RELEASE_BRANCHES = ["master"]
2020

21+
/**
22+
* Branches to send notifcations for
23+
*/
24+
def NOTIFY_BRANCHES = ["slacknotify","master"]
25+
26+
2127
/**
2228
* The following flags are switches to control which stages of the pipeline to be run. This is helpful when
2329
* testing a specific stage of the pipeline.
@@ -620,10 +626,18 @@ pipeline {
620626
}
621627
post {
622628
unsuccessful {
623-
slackSend (channel: '#cics-node-dev', message: "${env.JOB_NAME} #${env.BUILD_NUMBER} completed - ${currentBuild.result} (<${env.BUILD_URL}|Open>)", tokenCredentialId: 'slack-cics-node-dev')
629+
script {
630+
if (NOTIFY_BRANCHES.contains(BRANCH_NAME)) {
631+
slackSend (channel: '#cics-node-dev', message: "${env.JOB_NAME} #${env.BUILD_NUMBER} completed - ${currentBuild.result} (<${env.BUILD_URL}|Open>)", tokenCredentialId: 'slack-cics-node-dev')
632+
}
633+
}
624634
}
625635
fixed {
626-
slackSend (channel: '#cics-node-dev', message: "${env.JOB_NAME} #${env.BUILD_NUMBER} completed - Back to normal (<${env.BUILD_URL}|Open>)", tokenCredentialId: 'slack-cics-node-dev')
636+
script {
637+
if (NOTIFY_BRANCHES.contains(BRANCH_NAME)) {
638+
slackSend (channel: '#cics-node-dev', message: "${env.JOB_NAME} #${env.BUILD_NUMBER} completed - Back to normal (<${env.BUILD_URL}|Open>)", tokenCredentialId: 'slack-cics-node-dev')
639+
}
640+
}
627641
}
628642
}
629643
}

src/imperative.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import {IImperativeConfig} from "@zowe/imperative";
1515
const MAX_LENGTH = 8;
1616
const MAX_HLQ_LENGTH = 35;
1717
const MAX_TARGETDIR_LENGTH = 255;
18+
splat
1819
const config: IImperativeConfig = {
1920
commandModuleGlobs: ["**/cli/*/*.definition!(.d).*s"],
2021
pluginHealthCheck: __dirname + "/healthCheck.handler",

0 commit comments

Comments
 (0)