tag with date

This commit is contained in:
chris 2020-05-28 18:21:23 +02:00
parent 94a455361c
commit 5639ed4257

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
}
}
}