adds auth to docker login

This commit is contained in:
2026-03-31 17:20:09 +02:00
parent 6b16e22ba6
commit 0e0ad03e63

25
Jenkinsfile vendored
View File

@@ -25,15 +25,22 @@ def runOneRegression(String suite, String preset, String simulatorPath) {
} }
def resolveImageCommit(String image) { def resolveImageCommit(String image) {
sh(
script: """ withCredentials([usernamePassword(
set -eu credentialsId: gitea-jenkins,
docker login usernameVariable: 'REGISTRY_USER',
docker pull "${image}" >/dev/null passwordVariable: 'REGISTRY_PASS'
docker image inspect --format='{{ index .Config.Labels "git-commit" }}' "${image}" )]) {
""", return sh(
returnStdout: true script: """
).trim() 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) { def runRegressionLane(String image, String simulatorPath, boolean allowFailure) {