[26.06.20] Docker builder change

This commit is contained in:
andyjk15 2020-06-26 16:36:54 +01:00
parent 6ca2206622
commit 15e00efac6

View File

@ -76,27 +76,15 @@ try {
stage('Tag Repository') { stage('Tag Repository') {
withDockerServer([uri: "${env.DOCKER_REPOSITORY_TCP}"]) { withDockerServer([uri: "${env.DOCKER_REPOSITORY_TCP}"]) {
withDockerRegistry([credentialsId: 'Registry', url: "https://registry.cryptosky.me"]) { docker.build("${env.APPLICATION_NAME}:${env.APPLICATION_VERSION}")
def image = docker.build("${env.DOCKER_REPOSITORY}/db-gateway:${env.APPLICATION_VERSION}") docker.build("${env.APPLICATION_NAME}:latest")
image.push()
def latest = docker.build("${env.DOCKER_REPOSITORY}/db-gateway:latest")
latest.push()
}
}
// withDockerServer([uri: "${env.DOCKER_REPOSITORY_TCP}"]) { sh "docker tag ${env.APPLICATION_NAME}:${env.APPLICATION_VERSION} ${env.DOCKER_REPOSITORY}/${env.APPLICATION_NAME}:${env.APPLICATION_VERSION}"
// def image = docker.build("db-gateway:${env.APPLICATION_VERSION}") sh "docker tag ${env.APPLICATION_NAME}:latest ${env.DOCKER_REPOSITORY}/${env.APPLICATION_NAME}:latest"
// def latest = docker.build("db-gateway:latest")
//
// sh "docker tag ${image} ${env.DOCKER_REPOSITORY}/db-gateway:${env.APPLICATION_VERSION}"
// sh "docker tag ${latest} ${env.DOCKER_REPOSITORY}/db-gateway:latest"
//
// sh "docker push ${env.DOCKER_REPOSITORY}/${image}"
// sh "docker push ${env.DOCKER_REPOSITORY}/${latest}"
// }
// sh "docker build -t db-gateway:${env.APPLICATION_VERSION}" sh "docker push ${env.DOCKER_REPOSITORY}/${env.APPLICATION_NAME}:${env.APPLICATION_VERSION}"
// sh "docker build -t db-gateway:latest" sh "docker push ${env.DOCKER_REPOSITORY}/${env.APPLICATION_NAME}:latest"
}
withCredentials( withCredentials(
[usernamePassword( [usernamePassword(