generate jenkinsfile
dockers/alpine/pipeline/head There was a failure building this commit Details

This commit is contained in:
chris 2020-10-28 17:46:21 +01:00
parent 90f3292d9d
commit 1b1fa57e00
1 changed files with 8 additions and 9 deletions

17
Jenkinsfile vendored
View File

@ -16,26 +16,25 @@ pipeline {
customImage.push(version)
customImage.push("latest")
customImage.push("3.12")
def io_registry_credentials = "3deeee3d-6fce-4430-98dd-9b4db56f43f7"
withDockerRegistry([ credentialsId: io_registry_credentials ]) {
def io_registry_image = repo + '/' + project + ':' + version
sh "docker image tag " + registry+'/'+repo+'/'+project+':'+version + ' ' + io_registry_image
sh "docker push " + io_registry_image
sh "docker image tag " + registry+'/'+repo+'/'+project+':'+version + ' ' + io_registry_image.split(/\:/)[0] + "latest"
sh "docker push " + io_registry_image.split(/\:/)[0] + "latest"
sh "docker image tag " + registry+'/'+repo+'/'+project+':'+version + ' ' + io_registry_image.split(/\:/)[0] + "3.12"
sh "docker push " + io_registry_image.split(/\:/)[0] + "3.12"
sh "docker image tag " + registry+'/'+repo+'/'+project+':'+version + ' ' + io_registry_image.split(/\:/)[0] + ":latest"
sh "docker push " + io_registry_image.split(/\:/)[0] + ":latest"
sh "docker image tag " + registry+'/'+repo+'/'+project+':'+version + ' ' + io_registry_image.split(/\:/)[0] + ":3.12"
sh "docker push " + io_registry_image.split(/\:/)[0] + ":3.12"
}
def quay_credentials= "18fb6f7e-c6bc-4d06-9bf9-08c2af6bfc1a"
withDockerRegistry([ credentialsId: quay_credentials, url: "https://quay.io" ]) {
def quay_image = 'quay.io/' + repo + '/' + project + ':' + version
sh "docker push " + quay_image
sh "docker image tag " + registry+'/'+repo+'/'+project+':'+version + ' ' + official_image.split(/\:/)[0] + "latest"
sh "docker push " + official_image.split(/\:/)[0] + "latest"
sh "docker image tag " + registry+'/'+repo+'/'+project+':'+version + ' ' + official_image.split(/\:/)[0] + "3.12"
sh "docker push " + official_image.split(/\:/)[0] + "3.12"
sh "docker image tag " + registry+'/'+repo+'/'+project+':'+version + ' ' + official_image.split(/\:/)[0] + ":latest"
sh "docker push " + official_image.split(/\:/)[0] + ":latest"
sh "docker image tag " + registry+'/'+repo+'/'+project+':'+version + ' ' + official_image.split(/\:/)[0] + ":3.12"
sh "docker push " + official_image.split(/\:/)[0] + ":3.12"
}
}
}