diff --git a/Jenkinsfile b/Jenkinsfile index 716a6f5b13..41e200cb59 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -27,6 +27,12 @@ pipeline { stages { stage("env") { steps { + node("master") { + script { + def STATUS = load('./lib/ci/Status.groovy') + echo STATUS.reportStep(); + } + } script { setEnv() } @@ -36,6 +42,7 @@ pipeline { steps { script { checkAndAbortBuild() + } } } @@ -774,12 +781,6 @@ pipeline { } post { always { - script { - if (env.SLACK_USERNAME) { - def slackColorMap = ["SUCCESS": "good", "FAILURE": "danger", "UNSTABLE": "warning", "ABORTED": null] - slackSend(color: slackColorMap[currentBuild.currentResult], channel: env.SLACK_USERNAME, message: "[${BUILD_TAG_SLASHED} `${BRANCH}`] " + currentBuild.currentResult + " (<${BUILD_URL}/flowGraphTable/?auto_refresh=true|Open>)") - } - } node("master") { script { if (SLACK_BUILDS_CHANNEL) { @@ -787,6 +788,12 @@ pipeline { } } } + script { + if (env.SLACK_USERNAME) { + def slackColorMap = ["SUCCESS": "good", "FAILURE": "danger", "UNSTABLE": "warning", "ABORTED": null] + slackSend(color: slackColorMap[currentBuild.currentResult], channel: env.SLACK_USERNAME, message: "[${BUILD_TAG_SLASHED} `${BRANCH}`] " + currentBuild.currentResult + " (<${BUILD_URL}/flowGraphTable/?auto_refresh=true|Open>)") + } + } } } } diff --git a/lib/ci/Status.groovy b/lib/ci/Status.groovy new file mode 100644 index 0000000000..b6cd15ca53 --- /dev/null +++ b/lib/ci/Status.groovy @@ -0,0 +1,7 @@ +class Status { + def reportStep() { + return "reportStep HI" + } +} + +return new Status();