Skip to content

Commit

Permalink
Test again
Browse files Browse the repository at this point in the history
  • Loading branch information
akondur committed Oct 24, 2024
1 parent 52ce30c commit 05400a3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 16 deletions.
9 changes: 1 addition & 8 deletions .github/workflows/build-test-push-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,9 @@ jobs:
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1
- name: Make Splunk Operator Image
- name: Build and push Splunk Operator Image
run: |
make docker-buildx IMG=${{ secrets.ECR_REPOSITORY }}/${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:$GITHUB_SHA
- name: Push Splunk Operator Image to ECR
run: |
echo "Uploading Image to ECR:: ${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:$GITHUB_SHA"
make docker-push IMG=${{ secrets.ECR_REPOSITORY }}/${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:${{ github.sha }}
- name: Sign Splunk Operator image with a key
run: |
cosign sign --yes --key env://COSIGN_PRIVATE_KEY ${{ secrets.ECR_REPOSITORY }}/${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:${{ github.sha }}
Expand Down Expand Up @@ -258,9 +254,6 @@ jobs:
run: |
docker tag ${{ env.SPLUNK_ENTERPRISE_IMAGE }} ${{ secrets.ECR_REPOSITORY }}/${{ env.SPLUNK_ENTERPRISE_IMAGE }}
docker push ${{ secrets.ECR_REPOSITORY }}/${{ env.SPLUNK_ENTERPRISE_IMAGE }}
- name: Pull Splunk Operator Image Locally
run: |
docker pull ${{ secrets.ECR_REPOSITORY }}/${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:$GITHUB_SHA
- name: Create EKS cluster
run: |
export EKS_CLUSTER_K8_VERSION=${{ steps.dotenv.outputs.EKS_CLUSTER_K8_VERSION }}
Expand Down
10 changes: 2 additions & 8 deletions test/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,17 @@ if [ -n "${PRIVATE_REGISTRY}" ]; then

PRIVATE_SPLUNK_OPERATOR_IMAGE=${PRIVATE_REGISTRY}/${SPLUNK_OPERATOR_IMAGE}
PRIVATE_SPLUNK_ENTERPRISE_IMAGE=${PRIVATE_REGISTRY}/${SPLUNK_ENTERPRISE_IMAGE}
echo "docker images -q ${PRIVATE_SPLUNK_OPERATOR_IMAGE}"
echo "Checking to see if image exists, docker images -q ${PRIVATE_SPLUNK_OPERATOR_IMAGE}"
# Don't pull splunk operator if exists locally since we maybe building it locally
if [ -z $(docker images -q ${PRIVATE_SPLUNK_OPERATOR_IMAGE}) ]; then
echo "Doesn't exist, pulling ${PRIVATE_SPLUNK_OPERATOR_IMAGE}..."
docker pull ${PRIVATE_SPLUNK_OPERATOR_IMAGE}
if [ $? -ne 0 ]; then
echo "Unable to pull ${SPLUNK_OPERATOR_IMAGE}. Exiting..."
exit 1
fi
fi

#docker tag ${SPLUNK_OPERATOR_IMAGE} ${PRIVATE_SPLUNK_OPERATOR_IMAGE}
#docker push ${PRIVATE_SPLUNK_OPERATOR_IMAGE}
#if [ $? -ne 0 ]; then
# echo "Unable to push ${PRIVATE_SPLUNK_OPERATOR_IMAGE}. Exiting..."
# exit 1
#fi

# Always attempt to pull splunk enterprise image
docker pull ${SPLUNK_ENTERPRISE_IMAGE}
if [ $? -ne 0 ]; then
Expand Down

0 comments on commit 05400a3

Please sign in to comment.