fix: docker login on target host before compose pull (registry auth)
This commit is contained in:
@@ -68,7 +68,7 @@ steps:
|
|||||||
$SSH_USER@$SSH_HOST chmod +x /tmp/poc-deploy/deploy-compose
|
$SSH_USER@$SSH_HOST chmod +x /tmp/poc-deploy/deploy-compose
|
||||||
- |
|
- |
|
||||||
ssh -i /tmp/ssh/id_deploy -o StrictHostKeyChecking=accept-new \
|
ssh -i /tmp/ssh/id_deploy -o StrictHostKeyChecking=accept-new \
|
||||||
$SSH_USER@$SSH_HOST /tmp/poc-deploy/deploy-compose
|
$SSH_USER@$SSH_HOST /tmp/poc-deploy/deploy-compose registry.ci.poc.mehl.mx $ZOT_USERNAME $ZOT_PASSWORD
|
||||||
- |
|
- |
|
||||||
ssh -i /tmp/ssh/id_deploy -o StrictHostKeyChecking=accept-new \
|
ssh -i /tmp/ssh/id_deploy -o StrictHostKeyChecking=accept-new \
|
||||||
$SSH_USER@$SSH_HOST rm -f /tmp/poc-deploy/secrets.decrypted.env
|
$SSH_USER@$SSH_HOST rm -f /tmp/poc-deploy/secrets.decrypted.env
|
||||||
|
|||||||
@@ -2,14 +2,22 @@
|
|||||||
# Runs a Compose deployment on the target host. Invoked remotely via SSH
|
# Runs a Compose deployment on the target host. Invoked remotely via SSH
|
||||||
# after compose.yaml, release.env and secrets.decrypted.env have been
|
# after compose.yaml, release.env and secrets.decrypted.env have been
|
||||||
# transferred to the same directory as this script.
|
# transferred to the same directory as this script.
|
||||||
|
#
|
||||||
|
# Usage: deploy-compose <registry> <username> <password>
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
REGISTRY="$1"
|
||||||
|
ZOT_USERNAME="$2"
|
||||||
|
ZOT_PASSWORD="$3"
|
||||||
|
|
||||||
cd "$(dirname "$0")"
|
cd "$(dirname "$0")"
|
||||||
|
|
||||||
set -a
|
set -a
|
||||||
. ./release.env
|
. ./release.env
|
||||||
set +a
|
set +a
|
||||||
|
|
||||||
|
echo "$ZOT_PASSWORD" | docker login "$REGISTRY" -u "$ZOT_USERNAME" --password-stdin
|
||||||
|
|
||||||
docker compose \
|
docker compose \
|
||||||
--project-directory . \
|
--project-directory . \
|
||||||
-f compose.yaml \
|
-f compose.yaml \
|
||||||
|
|||||||
Reference in New Issue
Block a user