adds auth to docker login
This commit is contained in:
11
Jenkinsfile
vendored
11
Jenkinsfile
vendored
@@ -25,16 +25,23 @@ def runOneRegression(String suite, String preset, String simulatorPath) {
|
||||
}
|
||||
|
||||
def resolveImageCommit(String image) {
|
||||
sh(
|
||||
|
||||
withCredentials([usernamePassword(
|
||||
credentialsId: gitea-jenkins,
|
||||
usernameVariable: 'REGISTRY_USER',
|
||||
passwordVariable: 'REGISTRY_PASS'
|
||||
)]) {
|
||||
return sh(
|
||||
script: """
|
||||
set -eu
|
||||
docker login
|
||||
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 parallelTasks = [:]
|
||||
|
||||
Reference in New Issue
Block a user