forked from dockers/pixelfed
tag with date
This commit is contained in:
parent
94a455361c
commit
5639ed4257
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue