forked from wavefrontHQ/helm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrelease.Jenkinsfile
55 lines (51 loc) · 1.54 KB
/
release.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
46
47
48
49
50
51
52
53
54
55
pipeline {
agent any
tools {
go 'Go 1.15'
}
environment {
NEW_APP_VERSION = "${params.NEW_APP_VERSION}"
NEW_CHART_VERSION = "${params.NEW_CHART_VERSION}"
GIT_CREDENTIAL_ID = 'wf-jenkins-github'
TOKEN = credentials('GITHUB_TOKEN')
GITHUB_CREDS_PSW = credentials("GITHUB_TOKEN")
}
stages {
stage("Setup Tools") {
steps {
withEnv(["PATH+EXTRA=${HOME}/go/bin"]) {
sh './wavefront/release/setup-for-release.sh'
}
}
}
stage("Bump Github Version") {
steps {
withEnv(["PATH+EXTRA=${HOME}/go/bin"]) {
sh 'git config --global user.email "[email protected]"'
sh 'git config --global user.name "svc.wf-jenkins"'
sh 'git remote set-url origin https://${TOKEN}@github.com/wavefronthq/helm.git'
sh './wavefront/release/bump-version.sh'
}
}
}
stage("Release helm chart") {
steps {
sh './wavefront/release/release-helm-chart.sh'
}
}
}
post {
regression {
slackSend (channel: '#tobs-k8po-team', color: '#FF0000', message: "BUILD FAILED: <${env.BUILD_URL}|${env.JOB_NAME} [${env.BUILD_NUMBER}]>")
}
fixed {
slackSend (channel: '#tobs-k8po-team', color: '#008000', message: "BUILD FIXED: <${env.BUILD_URL}|${env.JOB_NAME} [${env.BUILD_NUMBER}]>")
}
success {
slackSend (channel: '#tobs-k8po-team', color: '#008000', message: "BUILD SUCCESS: <${env.BUILD_URL}|${env.JOB_NAME} [${env.BUILD_NUMBER}]>")
}
always {
cleanWs()
}
}
}