Skip to content

Instantly share code, notes, and snippets.

View connieho15's full-sized avatar

Connie Ho connieho15

View GitHub Profile
stage('checkout') {
checkout scm
}
properties([
parameters([
string(name: 'releaseType', description: "major, minor, or patch", defaultValue: 'minor')
])
])
stage('npm install') {
sh "yarn install"
}
stage('unit tests'){
sh "yarn test"
}
if (env.BRANCH_NAME == 'master'){
stage('push to artifactory') {
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>"
}
#!groovy
def slackChannel = "#team-slackchannel"
properties([
parameters([
string(name: 'releaseType', description: "major, minor, or patch", defaultValue: 'minor')
])
])
env.ENVIRONMENT = "staging"
sh "python2.7 release.py -e ${env.ENVIRONMENT}"
// 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