Skip to content

Commit

Permalink
Update 2.7.0 branch for gitlab testig needs.
Browse files Browse the repository at this point in the history
  • Loading branch information
akondur committed Dec 9, 2024
1 parent 0e066ac commit 7f9b715
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 11 deletions.
2 changes: 1 addition & 1 deletion config/default/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ patches:
- name: WATCH_NAMESPACE
value: WATCH_NAMESPACE_VALUE
- name: RELATED_IMAGE_SPLUNK_ENTERPRISE
value: docker.io/splunk/splunk:9.3.2
value: SPLUNK_ENTERPRISE_IMAGE
- name: OPERATOR_NAME
value: splunk-operator
- name: POD_NAME
Expand Down
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 7f9b715

Please sign in to comment.