forked from wouerner/salic-minc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
57 lines (52 loc) · 1.4 KB
/
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
56
57
pipeline {
agent {
label "jenkins-jx-base"
}
environment {
ORG = 'culturagovbr'
APP_NAME = 'salic-minc'
CHARTMUSEUM_CREDS = credentials('jenkins-x-chartmuseum')
}
stages {
stage('Build Release') {
when {
branch 'master'
}
steps {
container('jx-base') {
sh "git checkout master"
sh "git config --global credential.helper store"
sh "jx step git credentials"
sh "echo \$(jx-release-version) > VERSION"
echo "teste"
sh "CI=true DISPLAY=:99"
sh "export VERSION=`cat VERSION` && skaffold build -f skaffold.yaml"
sh "jx step post build --image $DOCKER_REGISTRY/$ORG/$APP_NAME:\$(cat VERSION)"
}
}
}
stage('Promote to Environments') {
when {
branch 'master'
}
steps {
container('jx-base') {
dir('./charts/salic-minc') {
//sh "jx step changelog --version v\$(cat ../../VERSION)"
// generate tag helm chart
sh "make tag"
// release the helm chart
sh "jx step helm release"
// promote through all 'Auto' promotion Environments
sh "jx promote -b --env homolog --timeout 1h --version \$(cat ../../VERSION)"
}
}
}
}
}
post {
always {
cleanWs()
}
}
}