From f0f7ca3e71896a6b7deb4bbb3d4584ef97ee3ac7 Mon Sep 17 00:00:00 2001 From: Scott Koranda Date: Sun, 31 May 2020 12:35:46 -0500 Subject: [PATCH] Abstract credential to use for repository Abstract the credential to use for the repository instead of assuming it is of the form dockerhub-$maintainer, and set it by default to be dockerhub-tier. --- Jenkinsfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 1721c7a..3adc09c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -2,6 +2,7 @@ pipeline { agent any environment { maintainer = "t" + maintainer_credential_ref = 'dockerhub-tier' imagename = 'g' tag = 'l' version='3.2.5' @@ -28,7 +29,7 @@ pipeline { stage('Build and Push') { steps { script { - docker.withRegistry('https://registry.hub.docker.com/', "dockerhub-$maintainer") { + docker.withRegistry('https://registry.hub.docker.com/', "$maintainer_credential_ref") { def image_to_build def image_dir def build_arg