mirror of
https://github.com/jc21/nginx-proxy-manager.git
synced 2024-08-30 18:22:48 +00:00
Fix PR docker image pushing to wrong repo
This commit is contained in:
parent
3dc9b20543
commit
26064b20b8
10
Jenkinsfile
vendored
10
Jenkinsfile
vendored
@ -31,11 +31,11 @@ pipeline {
|
|||||||
// Docker Build
|
// Docker Build
|
||||||
sh 'docker build --pull --no-cache --squash --compress -t ${TEMP_IMAGE} .'
|
sh 'docker build --pull --no-cache --squash --compress -t ${TEMP_IMAGE} .'
|
||||||
|
|
||||||
// Private Registry
|
// Dockerhub
|
||||||
sh 'docker tag ${TEMP_IMAGE} ${DOCKER_PRIVATE_REGISTRY}/${IMAGE}:github-${BRANCH_LOWER}'
|
sh 'docker tag ${TEMP_IMAGE} docker.io/jc21/${IMAGE}:github-${BRANCH_LOWER}'
|
||||||
withCredentials([usernamePassword(credentialsId: 'jc21-private-registry', passwordVariable: 'dpass', usernameVariable: 'duser')]) {
|
withCredentials([usernamePassword(credentialsId: 'jc21-dockerhub', passwordVariable: 'dpass', usernameVariable: 'duser')]) {
|
||||||
sh "docker login -u '${duser}' -p '${dpass}' ${DOCKER_PRIVATE_REGISTRY}"
|
sh "docker login -u '${duser}' -p '${dpass}'"
|
||||||
sh 'docker push ${DOCKER_PRIVATE_REGISTRY}/${IMAGE}:github-${BRANCH_LOWER}'
|
sh 'docker push docker.io/jc21/${IMAGE}:github-${BRANCH_LOWER}'
|
||||||
}
|
}
|
||||||
|
|
||||||
sh 'docker rmi ${TEMP_IMAGE}'
|
sh 'docker rmi ${TEMP_IMAGE}'
|
||||||
|
Loading…
Reference in New Issue
Block a user