Skip to content

Instantly share code, notes, and snippets.

@connieho15
Created December 22, 2017 19:07
Show Gist options
  • Save connieho15/639f9af195e86398fa00d61ad40f4690 to your computer and use it in GitHub Desktop.
Save connieho15/639f9af195e86398fa00d61ad40f4690 to your computer and use it in GitHub Desktop.
// Checking out the repository from github into your workspace:
checkout SCM
// Execute shell commands
sh "echo Hello World!"
// Branch-specific Behaviour:
if (env.BRANCH_NAME == 'master') {
stage ("promote staging"){
// do stuff
}
}
// Sending a message to a Slack Channel:
slackSend channel: #Your-Slack-Channel, color: '#2ECC71', message: "Build succeeded!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment