-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
42 lines (40 loc) · 1.11 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
pipeline {
agent {
label "jenkins-jx-base"
}
environment {
ORG = 'trunksys'
APP_NAME = 'builder-dotnetcore'
}
stages {
stage('CI Build and push snapshot') {
when {
branch 'PR-*'
}
steps {
container('jx-base') {
sh "docker build -t docker.io/$ORG/$APP_NAME:SNAPSHOT-$BRANCH_NAME-$BUILD_NUMBER ."
sh "docker push docker.io/$ORG/$APP_NAME:SNAPSHOT-$BRANCH_NAME-$BUILD_NUMBER"
}
}
}
stage('Build and Push Release') {
when {
branch 'master'
}
steps {
container('jx-base') {
sh "jx step git credentials"
sh "sh ./jx/scripts/release.sh"
}
}
}
}
// post {
// failure {
// input """Pipeline failed.
// We will keep the build pod around to help you diagnose any failures.
// Select Proceed or Abort to terminate the build pod"""
// }
// }
}