This commit is contained in:
Nana Janashia
2020-12-05 16:07:04 +01:00
parent 3559bee477
commit b52b845526

2
Jenkinsfile vendored
View File

@@ -38,7 +38,7 @@ pipeline {
echo "building the docker image..." echo "building the docker image..."
withCredentials([usernamePassword(credentialsId: 'ecr-credentials', passwordVariable: 'PASS', usernameVariable: 'USER')]) { withCredentials([usernamePassword(credentialsId: 'ecr-credentials', passwordVariable: 'PASS', usernameVariable: 'USER')]) {
sh "docker build -t ${IMAGE_REPO}:${IMAGE_NAME} ." sh "docker build -t ${IMAGE_REPO}:${IMAGE_NAME} ."
sh "echo $PASS | docker login -u $USER --password-stdin ${IMAGE_REPO}" sh "echo $PASS | docker login -u $USER --password-stdin ${ECR_REPO_URL}"
sh "docker push ${IMAGE_REPO}:${IMAGE_NAME}" sh "docker push ${IMAGE_REPO}:${IMAGE_NAME}"
} }
} }