-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile.backup
42 lines (42 loc) · 1.05 KB
/
Jenkinsfile.backup
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 any
environment {
ORG = 'kypseli'
APP_NAME = 'testcafe'
CHARTMUSEUM_CREDS = credentials('jenkins-x-chartmuseum')
}
stages {
stage('CI Build and push snapshot') {
when {
branch 'PR-*'
}
environment {
PREVIEW_VERSION = "0.0.0-SNAPSHOT-$BRANCH_NAME-$BUILD_NUMBER"
PREVIEW_NAMESPACE = "$APP_NAME-$BRANCH_NAME".toLowerCase()
HELM_RELEASE = "$PREVIEW_NAMESPACE".toLowerCase()
}
steps {
sh "skaffold version"
sh "export VERSION=$PREVIEW_VERSION && skaffold build -f skaffold.yaml"
}
}
stage('Build Release') {
when {
branch 'master'
}
steps {
git 'https://github.com/kypseli/testcafe.git'
sh "jx step next-version --use-git-tag-only --tag"
sh "export VERSION=`cat VERSION` && skaffold build -f skaffold.yaml"
}
}
stage('Promote to Environments') {
when {
branch 'master'
}
steps {
sh "jx step changelog --version v\$(cat VERSION)"
}
}
}
}