This commit is contained in:
Alejandro Sarmiento
2024-03-11 20:05:12 +01:00
parent 7cd542306f
commit 22f43a196f

View File

@@ -32,9 +32,9 @@ pipeline {
// Iniciar sesi<73>n en el Docker Registry y subir la imagen
withCredentials([string(credentialsId: 'docker-registry-url', variable: 'DOCKER_REGISTRY_URL'),
usernamePassword(credentialsId: 'docker-registry-creds', usernameVariable: 'DOCKER_REGISTRY_USER', passwordVariable: 'DOCKER_REGISTRY_PASSWORD')]) {
usernamePassword(credentialsId: 'dockerregistryalexdev', usernameVariable: 'DOCKER_REGISTRY_USER', passwordVariable: 'DOCKER_REGISTRY_PASSWORD')]) {
def fullImageName = "${DOCKER_REGISTRY_URL}/${imageName}"
docker.withRegistry("${DOCKER_REGISTRY_URL}", 'docker-registry-creds') {
docker.withRegistry("${DOCKER_REGISTRY_URL}", 'dockerregistryalexdev') {
sh "docker tag ${imageName} ${fullImageName}"
sh "docker push ${fullImageName}"
}