Skip to content

Commit

Permalink
Fix enterprise image
Browse files Browse the repository at this point in the history
  • Loading branch information
akondur committed Nov 24, 2024
1 parent 469576d commit 10ab4bf
Showing 1 changed file with 21 additions and 10 deletions.
31 changes: 21 additions & 10 deletions test/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,27 @@ if [ -n "${PRIVATE_REGISTRY}" ]; then
fi

# Always attempt to pull splunk enterprise image
docker pull ${SPLUNK_ENTERPRISE_IMAGE}
if [ $? -ne 0 ]; then
echo "Unable to pull ${SPLUNK_ENTERPRISE_IMAGE}. Exiting..."
exit 1
fi
docker tag ${SPLUNK_ENTERPRISE_IMAGE} ${PRIVATE_SPLUNK_ENTERPRISE_IMAGE}
docker push ${PRIVATE_SPLUNK_ENTERPRISE_IMAGE}
if [ $? -ne 0 ]; then
echo "Unable to push ${PRIVATE_SPLUNK_ENTERPRISE_IMAGE}. Exiting..."
exit 1
echo "check if image exists, docker manifest inspect $PRIVATE_SPLUNK_ENTERPRISE_IMAGE"
if docker manifest inspect "$PRIVATE_SPLUNK_ENTERPRISE_IMAGE" > /dev/null 2>&1; then
echo "Image $PRIVATE_SPLUNK_ENTERPRISE_IMAGE exists on the remote repository."
docker pull ${PRIVATE_SPLUNK_ENTERPRISE_IMAGE}
if [ $? -ne 0 ]; then
echo "Unable to pull ${PRIVATE_SPLUNK_ENTERPRISE_IMAGE}. Exiting..."
exit 1
fi
else
echo "Image $PRIVATE_SPLUNK_ENTERPRISE_IMAGE does not exist on the remote repository."
docker pull ${SPLUNK_ENTERPRISE_IMAGE}
if [ $? -ne 0 ]; then
echo "Unable to pull ${SPLUNK_ENTERPRISE_IMAGE}. Exiting..."
exit 1
fi
docker tag ${SPLUNK_ENTERPRISE_IMAGE} ${PRIVATE_SPLUNK_ENTERPRISE_IMAGE}
docker push ${PRIVATE_SPLUNK_ENTERPRISE_IMAGE}
if [ $? -ne 0 ]; then
echo "Unable to push ${PRIVATE_SPLUNK_ENTERPRISE_IMAGE}. Exiting..."
exit 1
fi
fi

# Output
Expand Down

0 comments on commit 10ab4bf

Please sign in to comment.