Skip to content

Commit

Permalink
dry run applies to login
Browse files Browse the repository at this point in the history
Signed-off-by: Vitor Bandeira <vvbandeira@precisioninno.com>
  • Loading branch information
Vitor Bandeira committed Jul 4, 2024
1 parent 7659edb commit 807ee98
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions etc/DockerHelper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,11 @@ _push() {
_help
fi

${DOCKER_CMD} login --username "${username}" --password "${password}"
if [[ "${dryRun}" == 1 ]]; then
echo "Skipping docker login"
else
${DOCKER_CMD} login --username "${username}" --password "${password}"
fi

if [[ "${tag}" == "" ]]; then
tag=$(./etc/DockerTag.sh -dev)
Expand All @@ -127,7 +131,9 @@ _push() {
2>&1 | tee build/create-${os}-${target}-${tag}.log

${DOCKER_CMD} tag ${org}/flow-${os}-builder:${imageTag} ${org}/orfs:${tag}
if [[ "${dryRun}" != 1 ]]; then
if [[ "${dryRun}" == 1 ]]; then
echo "[DRY-RUN] ${DOCKER_CMD} push ${org}/orfs:${tag}"
else
${DOCKER_CMD} push ${org}/orfs:${tag}
fi
fi
Expand Down

0 comments on commit 807ee98

Please sign in to comment.