fix(ci): fix base64 portability (remove -w 0 flag) and add REGISTRY debug output
This commit is contained in:
@@ -439,8 +439,10 @@ jobs:
|
||||
|
||||
# Execute remote commands
|
||||
# Write docker credentials to a temp file on local, scp it, then use it on remote
|
||||
B64_AUTH=$(printf '%s:%s' "$REGISTRY_USER" "$REGISTRY_PASS" | base64 -w 0)
|
||||
printf '{"auths":{"git.infra.mintel.me":{"auth":"%s"}}}' "$B64_AUTH" > /tmp/docker_creds.json
|
||||
echo "DEBUG: REGISTRY_USER=${REGISTRY_USER}, REGISTRY_PASS length=${#REGISTRY_PASS}"
|
||||
B64_AUTH=$(printf '%s:%s' "${REGISTRY_USER}" "${REGISTRY_PASS}" | base64 | tr -d '\n')
|
||||
echo "DEBUG: B64_AUTH length=${#B64_AUTH}"
|
||||
printf '{"auths":{"git.infra.mintel.me":{"auth":"%s"}}}' "${B64_AUTH}" > /tmp/docker_creds.json
|
||||
scp /tmp/docker_creds.json root@alpha.mintel.me:/tmp/docker_creds.json
|
||||
rm /tmp/docker_creds.json
|
||||
ssh root@alpha.mintel.me "mkdir -p ~/.docker && cp /tmp/docker_creds.json ~/.docker/config.json && rm /tmp/docker_creds.json && cd $SITE_DIR && docker compose -p '${{ needs.prepare.outputs.project_name }}' --env-file '$ENV_FILE' pull && docker compose -p '${{ needs.prepare.outputs.project_name }}' --env-file '$ENV_FILE' up -d --remove-orphans"
|
||||
|
||||
Reference in New Issue
Block a user