Skip to content
This repository was archived by the owner on Apr 21, 2020. It is now read-only.

Commit fc72018

Browse files
committed
Build: Update to jpl v3.1.6 and add auto-release stage
1 parent cf6247f commit fc72018

File tree

1 file changed

+8
-13
lines changed

1 file changed

+8
-13
lines changed

Jenkinsfile

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!groovy
22

3-
@Library('github.com/red-panda-ci/jenkins-pipeline-library@v2.9.1') _
3+
@Library('github.com/red-panda-ci/jenkins-pipeline-library@v3.1.6') _
44

55
// Initialize global config
66
cfg = jplConfig('dc-commit-validator', 'bash', '', [email:'redpandaci+dc-commit-validator@gmail.com'])
@@ -10,7 +10,7 @@ pipeline {
1010

1111
stages {
1212
stage ('Initialize') {
13-
agent { label 'master' }
13+
agent { label 'docker' }
1414
steps {
1515
jplStart(cfg)
1616
}
@@ -29,19 +29,14 @@ pipeline {
2929
sh 'bin/test.sh'
3030
}
3131
}
32-
stage ('Release confirm') {
33-
when { expression { cfg.BRANCH_NAME.startsWith('release/v') || cfg.BRANCH_NAME.startsWith('hotfix/v') } }
34-
steps {
35-
jplPromoteBuild(cfg)
36-
}
37-
}
38-
stage ('Release finish') {
39-
agent { label 'master' }
40-
when { expression { (cfg.BRANCH_NAME.startsWith('release/v') || cfg.BRANCH_NAME.startsWith('hotfix/v')) && cfg.promoteBuild.enabled } }
32+
stage ('Make release'){
33+
agent { label 'docker' }
34+
when { branch 'release/new' }
4135
steps {
42-
jplDockerPush (cfg, "kairops/dc-commit-validator", cfg.releaseTag, ".", "https://registry.hub.docker.com", "cikairos-docker-credentials")
36+
script { cfg.releaseTag = sh (script: "kd get-next-release-number .", returnStdout: true).trim() }
37+
jplDockerPush (cfg, "kairops/dc-commit-validator", cfg.releaseTag.substring(1), ".", "https://registry.hub.docker.com", "cikairos-docker-credentials")
4338
jplDockerPush (cfg, "kairops/dc-commit-validator", "latest", ".", "https://registry.hub.docker.com", "cikairos-docker-credentials")
44-
jplCloseRelease(cfg)
39+
jplMakeRelease(cfg, true)
4540
}
4641
}
4742
}

0 commit comments

Comments
 (0)