tag with date

pull/1/head
chris 2020-05-28 18:21:23 +02:00
parent 94a455361c
commit 5639ed4257
1 changed files with 3 additions and 0 deletions

3
Jenkinsfile vendored
View File

@ -15,13 +15,16 @@ pipeline {
withDockerRegistry([ credentialsId: registry_credentials, url: "https://"+registry ]) {
script {
def customImage = docker.build(registry+'/'+repo+'/'+project, "--build-arg DATE=$timeStamp --pull .")
customImage.push(timeStamp)
customImage.push()
registry_credentials = "3deeee3d-6fce-4430-98dd-9b4db56f43f7"
withDockerRegistry([ credentialsId: registry_credentials ]) {
def official_image = repo+'/'+project
sh "docker image tag " + registry+'/'+repo+'/'+project + ' ' + official_image
sh "docker image tag " + registry+'/'+repo+'/'+project + ' ' + official_image+':'+timeStamp
sh "docker push " + official_image
sh "docker push " + official_image+':'+timeStamp
}
}
}