Skip to content

Commit 701ce2c

Browse files
committed
feat: docker image now requires config file at runtime
BREAKING CHANGE: Instead of inserting the API key at build time. It now must be mounted during start up time.
1 parent 7e59944 commit 701ce2c

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

vars/runJenkinsPipeline.groovy

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -582,6 +582,9 @@ def call(){
582582
equals expected: true, actual: params.DEPLOY_DOCKER_IMAGE
583583
}
584584
}
585+
options{
586+
lock('deploy_getmarcapi')
587+
}
585588
stages{
586589
stage('Additional Deploy') {
587590
when{
@@ -659,11 +662,12 @@ def call(){
659662
}
660663
steps{
661664
script{
665+
def registryUrl
662666
configFileProvider([configFile(fileId: 'getmarc_deployapi', variable: 'CONFIG_FILE')]) {
663667
try{
664668
def CONFIG = readJSON(file: CONFIG_FILE)['deploy']
665669
def build_args = CONFIG['docker']['build']['buildArgs'].collect{"--build-arg=${it}"}.join(' ')
666-
def registryUrl = CONFIG['docker']['server']['registry']
670+
registryUrl = CONFIG['docker']['server']['registry']
667671
def remoteRegistryImageName = "${registryUrl.replace('http://', '').replace('https://', '')}/${IMAGE_NAME}:${DOCKER_TAG}"
668672
def localImageName = "${IMAGE_NAME}:${DOCKER_TAG}"
669673

@@ -708,6 +712,11 @@ def call(){
708712
}
709713
}
710714
}
715+
post{
716+
always{
717+
milestone 2
718+
}
719+
}
711720
}
712721
}
713722
}

0 commit comments

Comments
 (0)