diff --git a/Jenkinsfile b/Jenkinsfile index 75c734a..6b0714a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -25,15 +25,22 @@ def runOneRegression(String suite, String preset, String simulatorPath) { } def resolveImageCommit(String image) { - sh( - script: """ - set -eu - docker login - docker pull "${image}" >/dev/null - docker image inspect --format='{{ index .Config.Labels "git-commit" }}' "${image}" - """, - returnStdout: true - ).trim() + + withCredentials([usernamePassword( + credentialsId: gitea-jenkins, + usernameVariable: 'REGISTRY_USER', + passwordVariable: 'REGISTRY_PASS' + )]) { + return sh( + script: """ + set -eu + echo "\$REGISTRY_PASS" | docker login "git.minres.com" -u "\$REGISTRY_USER" --password-stdin >/dev/null + docker pull "${image}" >/dev/null + docker image inspect --format='{{ index .Config.Labels "git-commit" }}' "${image}" + """, + returnStdout: true + ).trim() + } } def runRegressionLane(String image, String simulatorPath, boolean allowFailure) {