mirror of https://github.com/waku-org/nwaku.git
ci: push GIT_REF if it looks like a version
Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
6072fcbee6
commit
184479e385
|
@ -57,7 +57,7 @@ pipeline {
|
|||
stage('Build') {
|
||||
steps { script {
|
||||
image = docker.build(
|
||||
"${params.IMAGE_NAME}:${env.GIT_COMMIT.take(8)}",
|
||||
"${params.IMAGE_NAME}:${params.IMAGE_TAG ?: env.GIT_COMMIT.take(8)}",
|
||||
"--label=commit='${env.GIT_COMMIT.take(8)}' " +
|
||||
"--build-arg=MAKE_TARGET='${params.MAKE_TARGET}' " +
|
||||
"--build-arg=NIMFLAGS='${params.NIMFLAGS}' " +
|
||||
|
@ -82,7 +82,10 @@ pipeline {
|
|||
credentialsId: params.DOCKER_CRED, url: ""
|
||||
]) {
|
||||
image.push()
|
||||
image.push(env.IMAGE_TAG)
|
||||
/* If Git ref is a tag push it as Docker tag too. */
|
||||
if (params.GIT_REF ==~ /v\d+\.\d+\.\d+.*/) {
|
||||
image.push(params.GIT_REF)
|
||||
}
|
||||
}
|
||||
} }
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue