Debug Jenkins
This commit is contained in:
parent
9a8f8b770b
commit
df34ebbc1f
1 changed files with 17 additions and 2 deletions
19
Jenkinsfile
vendored
19
Jenkinsfile
vendored
|
|
@ -4,7 +4,7 @@ pipeline {
|
||||||
environment {
|
environment {
|
||||||
REGISTRY = 'codeberg.org'
|
REGISTRY = 'codeberg.org'
|
||||||
IMAGE_NAME = "${REGISTRY}/lvl0/incr"
|
IMAGE_NAME = "${REGISTRY}/lvl0/incr"
|
||||||
DOCKER_CREDENTIALS_ID = 'codeberg-registry' // Jenkins credential ID
|
DOCKER_CREDENTIALS_ID = 'codeberg-registry' // Jenkins credentials ID
|
||||||
}
|
}
|
||||||
|
|
||||||
stages {
|
stages {
|
||||||
|
|
@ -34,4 +34,19 @@ pipeline {
|
||||||
stage('Push to Registry') {
|
stage('Push to Registry') {
|
||||||
steps {
|
steps {
|
||||||
echo "📤 Pushing Docker image: ${IMAGE_NAME}:${GIT_TAG}"
|
echo "📤 Pushing Docker image: ${IMAGE_NAME}:${GIT_TAG}"
|
||||||
withCredentials([usernamePassword(credentialsId: "${DOCKER_CREDENTIALS_ID}", usernam]()
|
withCredentials([
|
||||||
|
usernamePassword(
|
||||||
|
credentialsId: DOCKER_CREDENTIALS_ID,
|
||||||
|
usernameVariable: 'USERNAME',
|
||||||
|
passwordVariable: 'PASSWORD'
|
||||||
|
)
|
||||||
|
]) {
|
||||||
|
sh """
|
||||||
|
echo "${PASSWORD}" | docker login ${REGISTRY} -u "${USERNAME}" --password-stdin
|
||||||
|
docker push ${IMAGE_NAME}:${GIT_TAG}
|
||||||
|
"""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue