Skip to content

Commit

Permalink
fix(run-test-workflow.sh): add check for docker command
Browse files Browse the repository at this point in the history
  • Loading branch information
violetbrina committed Jan 9, 2025
1 parent ba2abdb commit 005a23a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cpg_flow_test/run-test-workflow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,11 @@ fi

# Check that the docker image can be pulled
IMAGE="australia-southeast1-docker.pkg.dev/cpg-common/$IMAGE_TAG"
if docker manifest inspect "$IMAGE" > /dev/null 2>&1; then
if which docker && docker manifest inspect "$IMAGE" > /dev/null 2>&1; then
echo "Docker image $IMAGE exists."
elif ! which docker
then
echo "Docker is not installed. Skipping image check."
else
echo "Docker image $IMAGE does not exist. Please build the image before running this script."
exit 1
Expand Down

0 comments on commit 005a23a

Please sign in to comment.