bvsdrtg
This commit is contained in:
@@ -30,13 +30,13 @@ pipeline {
|
|||||||
// Usando withCredentials para manejar el REGISTRY_URL
|
// Usando withCredentials para manejar el REGISTRY_URL
|
||||||
withCredentials([string(credentialsId: 'docker-registry-url', variable: 'REGISTRY_URL')]) {
|
withCredentials([string(credentialsId: 'docker-registry-url', variable: 'REGISTRY_URL')]) {
|
||||||
// Aqu<71> usamos env.REGISTRY_URL para asegurarnos de que estamos usando la variable de entorno correcta
|
// Aqu<71> usamos env.REGISTRY_URL para asegurarnos de que estamos usando la variable de entorno correcta
|
||||||
def fullImageName = "${env.REGISTRY_URL}/${imageName}"
|
def fullImageName = "https://dockerregistry.alexdev.es/${imageName}"
|
||||||
|
|
||||||
// Construir la imagen
|
// Construir la imagen
|
||||||
sh "docker build --build-arg ENVIRONMENT=${env.ASP_ENVIRONMENT} -t ${imageName} ./CleanArchitecture/"
|
sh "docker build --build-arg ENVIRONMENT=${env.ASP_ENVIRONMENT} -t ${imageName} ./CleanArchitecture/"
|
||||||
|
|
||||||
// Iniciar sesi<73>n y subir la imagen
|
// Iniciar sesi<73>n y subir la imagen
|
||||||
docker.withRegistry(env.REGISTRY_URL, 'dockerregistryalexdev') {
|
docker.withRegistry('https://dockerregistry.alexdev.es', 'dockerregistryalexdev') {
|
||||||
echo "Vamos a ejecutar el docker tag"
|
echo "Vamos a ejecutar el docker tag"
|
||||||
sh "docker tag ${imageName} ${fullImageName}"
|
sh "docker tag ${imageName} ${fullImageName}"
|
||||||
echo "Vamos a ejecutar el docker push"
|
echo "Vamos a ejecutar el docker push"
|
||||||
|
|||||||
Reference in New Issue
Block a user