diff --git a/Jenkinsfile b/Jenkinsfile index 996ab6d..1eb40c8 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -26,8 +26,8 @@ pipeline { withCredentials([string(credentialsId: 'ACR_PASSWORD', variable: 'ACR_PASS')]) { script { def fullImage = "${ACR_REGISTRY}/${ACR_NAMESPACE}/${IMAGE_NAME}:${params.IMAGE_TAG}" - sh """ - docker login ${ACR_REGISTRY} -u ${ACR_USERNAME} -p \${ACR_PASS} + bat """ + docker login ${ACR_REGISTRY} -u ${ACR_USERNAME} -p %ACR_PASS% docker build -t ${fullImage} . docker push ${fullImage} docker rmi ${fullImage} @@ -43,11 +43,8 @@ pipeline { withCredentials([sshUserPrivateKey(credentialsId: 'PROD_SSH_KEY', keyFileVariable: 'SSH_KEY')]) { script { def fullImage = "${ACR_REGISTRY}/${ACR_NAMESPACE}/${IMAGE_NAME}:${params.IMAGE_TAG}" - sh """ - ssh -i \${SSH_KEY} -o StrictHostKeyChecking=no ${PROD_USER}@${PROD_HOST} \ - "docker pull ${fullImage} && \ - docker compose -f ${COMPOSE_FILE} up -d --no-deps web && \ - docker image prune -f" + bat """ + ssh -i "%SSH_KEY%" -o StrictHostKeyChecking=no ${PROD_USER}@${PROD_HOST} "docker pull ${fullImage} && docker compose -f ${COMPOSE_FILE} up -d --no-deps web && docker image prune -f" """ } }