-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathopenshift-bump-verison.Jenkinsfile
45 lines (42 loc) · 1.41 KB
/
openshift-bump-verison.Jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
pipeline {
agent any
environment {
NEW_APP_VERSION = "${params.NEW_APP_VERSION}"
NEW_CHART_VERSION = "${params.NEW_CHART_VERSION}"
GITHUB_CREDS_PSW = credentials("GITHUB_TOKEN")
}
stages {
stage("Setup Tools") {
steps {
sh './wavefront/release/setup-for-release.sh'
}
}
stage("Create Bump Version PR") {
steps {
sh 'git config --global user.email "[email protected]"'
sh 'git config --global user.name "svc.wf-jenkins"'
sh 'git remote set-url origin https://${GITHUB_CREDS_PSW}@github.com/wavefronthq/helm.git'
sh './wavefront/openshift/bump-version.sh'
}
}
}
post {
// Notify only on null->failure or success->failure or failure->success
failure {
script {
if(currentBuild.previousBuild == null) {
slackSend (channel: '#tobs-k8po-team', color: '#FF0000', message: "OPENSHIFT BUMP VERSION JOB FAILED: <${env.BUILD_URL}|${env.JOB_NAME} [${env.BUILD_NUMBER}]>")
}
}
}
regression {
slackSend (channel: '#tobs-k8po-team', color: '#FF0000', message: "OPENSHIFT BUMP VERSION JOB FAILED: <${env.BUILD_URL}|${env.JOB_NAME} [${env.BUILD_NUMBER}]>")
}
fixed {
slackSend (channel: '#tobs-k8po-team', color: '#008000', message: "OPENSHIFT BUMP VERSION JOB FIXED: <${env.BUILD_URL}|${env.JOB_NAME} [${env.BUILD_NUMBER}]>")
}
always {
cleanWs()
}
}
}