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

Commit 616a4bc

Browse files
committed
Build: Use jpl v4.0.0 version, add cleanup stage and review docker publish function
1 parent 979bea3 commit 616a4bc

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

Jenkinsfile

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

3-
@Library('github.com/teecke/jenkins-pipeline-library@v3.4.1') _
3+
@Library('github.com/tpbtools/jenkins-pipeline-library@v4.0.0') _
44

55
// Initialize global config
6-
cfg = jplConfig('gp-haproxy', 'docker', '', [email: env.CITEECKE_NOTIFY_EMAIL_TARGETS])
7-
6+
cfg = jplConfig('gp-haproxy', 'bash', '', [email: env.CI_NOTIFY_EMAIL_TARGETS])
87

98
/**
109
* Build and publish docker images
@@ -15,8 +14,8 @@ def buildAndPublishDockerImage(nextReleaseNumber = "") {
1514
if (nextReleaseNumber == "") {
1615
nextReleaseNumber = sh (script: "kd get-next-release-number .", returnStdout: true).trim().substring(1)
1716
}
18-
docker.withRegistry("", 'teeckebot-docker-credentials') {
19-
def customImage = docker.build("teecke/${cfg.projectName}:${nextReleaseNumber}", "--pull --no-cache ${cfg.projectName.substring(3)}")
17+
docker.withRegistry("", 'docker-token') {
18+
def customImage = docker.build("${env.DOCKER_ORGANIZATION}/${cfg.projectName}:${nextReleaseNumber}", "--pull --no-cache .")
2019
customImage.push()
2120
if (nextReleaseNumber != "beta") {
2221
customImage.push('latest')
@@ -56,6 +55,9 @@ pipeline {
5655
always {
5756
jplPostBuild(cfg)
5857
}
58+
cleanup {
59+
deleteDir()
60+
}
5961
}
6062

6163
options {
@@ -65,4 +67,4 @@ pipeline {
6567
disableConcurrentBuilds()
6668
timeout(time: 10, unit: 'MINUTES')
6769
}
68-
}
70+
}

0 commit comments

Comments
 (0)