mirror of
https://github.com/waku-org/nwaku.git
synced 2025-01-14 08:57:14 +00:00
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') {
|
stage('Build') {
|
||||||
steps { script {
|
steps { script {
|
||||||
image = docker.build(
|
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)}' " +
|
"--label=commit='${env.GIT_COMMIT.take(8)}' " +
|
||||||
"--build-arg=MAKE_TARGET='${params.MAKE_TARGET}' " +
|
"--build-arg=MAKE_TARGET='${params.MAKE_TARGET}' " +
|
||||||
"--build-arg=NIMFLAGS='${params.NIMFLAGS}' " +
|
"--build-arg=NIMFLAGS='${params.NIMFLAGS}' " +
|
||||||
@ -82,7 +82,10 @@ pipeline {
|
|||||||
credentialsId: params.DOCKER_CRED, url: ""
|
credentialsId: params.DOCKER_CRED, url: ""
|
||||||
]) {
|
]) {
|
||||||
image.push()
|
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…
x
Reference in New Issue
Block a user