Skip to content

Commit 2cbb4db

Browse files
committed
feat: BREAKING CHANGE. docker image now requires config file at runtime
instead of inserting the API key at build time. It now must be mounted during start up time.
1 parent 373b24c commit 2cbb4db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vars/runJenkinsPipeline.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,7 @@ def call(){
668668
def build_args = CONFIG['docker']['build']['buildArgs'].collect{"--build-arg=${it}"}.join(' ')
669669
def dockerImage = docker.build("${IMAGE_NAME}:${DOCKER_TAG}", "${build_args} .")
670670
withEnv(["DOCKER_REGISTRY=${CONFIG["docker"]["server"]["registry"]}"]){
671-
sh 'docker login $DOCKER_REGISTRY -u $DOCKER_CRED_USR -p $DOCKER_CRED_PSW'
671+
sh 'echo $DOCKER_CRED_PSW | docker login $DOCKER_REGISTRY -u $DOCKER_CRED_USR --password-stdin'
672672
}
673673
// docker.withRegistry(CONFIG['docker']['server']['registry'], 'jenkins-nexus'){
674674
// dockerImage.push()

0 commit comments

Comments
 (0)