[26.06.20] Pipeline Changes

This commit is contained in:
andrewso 2020-06-26 16:13:13 +01:00
parent 24ad9d845d
commit 35e21c35a1

View File

@ -67,12 +67,17 @@ try {
stage('Tag Repository') { stage('Tag Repository') {
withDockerServer([uri: "${env.DOCKER_REPOSITORY_TCP}"]) { withDockerServer([uri: "${env.DOCKER_REPOSITORY_TCP}"]) {
withDockerRegistry([credentialsId: 'Registry', url: "${env.DOCKER_REPOSITORY_URL}"]) { // withDockerRegistry([credentialsId: 'Registry', url: "${env.DOCKER_REPOSITORY_URL}"]) {
def image = docker.build("${env.DOCKER_REPOSITORY}/${env.APPLICATION_NAME}:${env.APPLICATION_VERSION}") def image = docker.build("${env.APPLICATION_NAME}:${env.APPLICATION_VERSION}")
image.push() // image.push()
def latest = docker.build("${env.DOCKER_REPOSITORY}/${env.APPLICATION_NAME}:latest") def latest = docker.build("${env.APPLICATION_NAME}:latest")
latest.push() // latest.push()
} // }
sh "docker tag ${image} ${env.DOCKER_REPOSITORY}/${env.APPLICATION_NAME}:${env.APPLICATION_VERSION}"
sh "docker tag ${latest} ${env.DOCKER_REPOSITORY}/${env.APPLICATION_NAME}:latest"
sh "docker push ${env.DOCKER_REPOSITORY}/${image}"
sh "docker push ${env.DOCKER_REPOSITORY}/${latest}"
} }
withCredentials( withCredentials(
[usernamePassword( [usernamePassword(