forked from jenkins-x/builder-base
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Jenkinsfile
41 lines (40 loc) · 1001 Bytes
/
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
pipeline {
agent {
label "jenkins-jx-base"
}
environment {
ORG = 'jenkinsxio'
APP_NAME = 'builder-base'
PUSH = 'true'
}
stages {
stage('CI Build and push snapshot') {
when {
branch 'PR-*'
}
environment {
VERSION = "SNAPSHOT-$BRANCH_NAME-$BUILD_NUMBER"
PUSH_LATEST = "false"
}
steps {
container('jx-base') {
sh "./jx/scripts/build-images.sh"
}
}
}
stage('Build and Push Release') {
when {
branch 'master'
}
environment {
PUSH_LATEST = "true"
}
steps {
container('jx-base') {
sh "jx step git credentials"
sh "./jx/scripts/release.sh"
}
}
}
}
}