[26.06.20] Docker builder change
This commit is contained in:
parent
d74b0eb749
commit
b6dcb0d6d0
@ -76,16 +76,25 @@ try {
|
||||
stage('Tag Repository') {
|
||||
|
||||
withDockerServer([uri: "${env.DOCKER_REPOSITORY_TCP}"]) {
|
||||
def image = docker.build("db-gateway:${env.APPLICATION_VERSION}")
|
||||
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}"
|
||||
withDockerRegistry([credentialsId: 'Registry', url: "${env.DOCKER_REPOSITORY_URL}"]) {
|
||||
def image = docker.build("${env.DOCKER_REPOSITORY}/db-gateway:${env.APPLICATION_VERSION}")
|
||||
image.push()
|
||||
def latest = docker.build("${env.DOCKER_REPOSITORY}/db-gateway:latest")
|
||||
latest.push()
|
||||
}
|
||||
}
|
||||
|
||||
// withDockerServer([uri: "${env.DOCKER_REPOSITORY_TCP}"]) {
|
||||
// def image = docker.build("db-gateway:${env.APPLICATION_VERSION}")
|
||||
// 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 build -t db-gateway:latest"
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user