Last active
August 27, 2023 18:19
-
-
Save daipresents/c6ba0749c8c402125c1496de5dc937c5 to your computer and use it in GitHub Desktop.
Split Jenkinsfile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def notify(message) { | |
| def channel = "#notify-channel" | |
| def domain = "daipresents" | |
| def token = "TOKEN_IS_HERE" | |
| def slack_msg = "${message}" | |
| slackSend channel: "${channel}", color: "good", message: "${slack_msg}", teamDomain: "${domain}", token: "${token}" | |
| } | |
| return this |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Running on master in /var/lib/jenkins/workspace/MY_JOB_NAME | |
| [Pipeline] { | |
| [Pipeline] pwd | |
| [Pipeline] load | |
| [Pipeline] // load | |
| [Pipeline] } | |
| [Pipeline] // node | |
| [Pipeline] End of Pipeline | |
| java.nio.file.NoSuchFileException: /var/lib/jenkins/workspace/MY_JOB_NAME/common.groovy |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| node { | |
| checkout scm | |
| common = load "${pwd()}/common.groovy" | |
| common.notify("This is message") | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment