This file contains 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
stage('checkout') { | |
checkout scm | |
} |
This file contains 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
properties([ | |
parameters([ | |
string(name: 'releaseType', description: "major, minor, or patch", defaultValue: 'minor') | |
]) | |
]) |
This file contains 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
stage('npm install') { | |
sh "yarn install" | |
} | |
stage('unit tests'){ | |
sh "yarn test" | |
} | |
if (env.BRANCH_NAME == 'master'){ | |
stage('push to artifactory') { |
This file contains 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
stage('notify slack') { | |
slackSend channel: #slack-team, color: '#2ECC71', message: "Push ${JOB_NAME} (release type: ${env.RELEASE_TYPE}) to Artifactory - Complete - <${BUILD_URL}|See the build>" | |
} |
This file contains 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
#!groovy | |
def slackChannel = "#team-slackchannel" | |
properties([ | |
parameters([ | |
string(name: 'releaseType', description: "major, minor, or patch", defaultValue: 'minor') | |
]) | |
]) |
This file contains 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
env.ENVIRONMENT = "staging" | |
sh "python2.7 release.py -e ${env.ENVIRONMENT}" |
This file contains 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
// 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 |