From 70c563918f2bf537e50e645dd6c480a4f6a88733 Mon Sep 17 00:00:00 2001 From: cjswedes Date: Thu, 6 Aug 2026 11:08:18 -0500 Subject: [PATCH 1/2] Revert "Avoiding URI permissions error and defaulted credentials ID string to empty" This reverts commit 3083caa47e7741b04eaa44ce2050845c4b866c37. --- Jenkinsfile | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 752d3d358c..a7a143ae64 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -25,12 +25,8 @@ def getChangedDrivers() { } def get_region() { - def url = env.JENKINS_URL?.trim() - if (url?.endsWith('/')) { - url = url[0..-2] - } - - def region = url?.endsWith('.cn') ? 'cn' : 'global' + def uri = new URI(env.JENKINS_URL) + def region = uri.host.endsWith('.cn') ? 'cn' : 'global' return region } @@ -42,7 +38,7 @@ def getDockerCredentialId() { return 'artifactory-credentials' } else { - return '' + return 'artifactory' } } // Gate RegistryUrl for prod nodes in cn due to a docker authentication error arising in that environment From 31ae9704b30ac681d97200bda06795fbbcbf413c Mon Sep 17 00:00:00 2001 From: cjswedes Date: Thu, 6 Aug 2026 11:08:28 -0500 Subject: [PATCH 2/2] Revert "Branching registryCredentialsId and registryURL based off region and nodeLabel" This reverts commit 4026115e52a2ceb27b03dde8c31fe3e14480cb00. --- Jenkinsfile | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index a7a143ae64..425da986db 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -24,42 +24,11 @@ def getChangedDrivers() { return drivers } -def get_region() { - def uri = new URI(env.JENKINS_URL) - def region = uri.host.endsWith('.cn') ? 'cn' : 'global' - return region -} - -// Gate artifactory-credentials for prod nodes in cn due to a docker authentication error arising in that environment -def getDockerCredentialId() { - def nodeLabel = params.NODE_LABEL ?: 'production' - def region = get_region() - if (nodeLabel == 'production' && region == 'cn') { - return 'artifactory-credentials' - } - else { - return 'artifactory' - } -} -// Gate RegistryUrl for prod nodes in cn due to a docker authentication error arising in that environment -def getRegistryUrl() { - def nodeLabel = params.NODE_LABEL ?: 'production' - def region = get_region() - if (nodeLabel == 'production' && region == 'cn') { - return 'https://registry.artifactoryedge.streleng.cn' - } else { - // Default - return '' - } -} - pipeline { agent { docker { image 'python:3.10' label "${params.NODE_LABEL ?: 'production'}" - registryUrl getRegistryUrl() - registryCredentialsId getDockerCredentialId() args '--entrypoint= -u 0:0' } }