Skip to content

Commit

Permalink
build changes to support 2 some changes
Browse files Browse the repository at this point in the history
Signed-off-by: vivekr-splunk <vivekr@splunk.com>
  • Loading branch information
vivekr-splunk committed Sep 29, 2023
1 parent 9bebc2c commit 7d622ed
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
3 changes: 2 additions & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ AZ_CLI_VERSION=2.30.0
EKSCTL_VERSION=v0.143.0
EKS_CLUSTER_K8_VERSION=1.26
SPLUNK_ENTERPRISE_RELEASE_IMAGE=docker.io/splunk/splunk:9.0.5
SPLUNK_RELEASE_IMAGE=[splunk:9.0.5, splunk:9.1.1]
SPLUNK_CURRENT_IMAGE=splunk/splunk:9.0.5
SPLUNK_PREVIOUS_IMAGE=splunk/splunk:9.1.1
ECR_REPOSITORY=docker.io
AWS_DEFAULT_REGION=us-west-2
SPLUNK_OPERATOR_IMAGE_NAME=splunk/splunk-operator
17 changes: 9 additions & 8 deletions .github/workflows/build-test-push-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ jobs:
strategy:
fail-fast: false
matrix:
splunk_version: [ splunk/splunk:9.0.5, splunk/splunk:9.1.1 ]
test: [
basic,
appframeworks1,
Expand All @@ -145,7 +146,7 @@ jobs:
env:
CLUSTER_NODES: 1
CLUSTER_WORKERS: 3
#SPLUNK_ENTERPRISE_IMAGE: ${{ steps.dotenv.outputs.SPLUNK_ENTERPRISE_IMAGE }}
SPLUNK_ENTERPRISE_IMAGE: ${{ matrix.splunk_version }}
#SPLUNK_ENTERPRISE_RELEASE_IMAGE: ${{ steps.dotenv.outputs.SPLUNK_ENTERPRISE_RELEASE_IMAGE }}
SPLUNK_OPERATOR_IMAGE_NAME: splunk/splunk-operator
SPLUNK_OPERATOR_IMAGE_FILENAME: splunk-operator
Expand Down Expand Up @@ -173,10 +174,10 @@ jobs:
- name: Dotenv Action
id: dotenv
uses: falti/dotenv-action@d4d12eaa0e1dd06d5bdc3d7af3bf4c8c93cb5359
- name: Change splunk enterprise to release image on main branches
if: github.ref == 'refs/heads/main'
run: |
echo "SPLUNK_ENTERPRISE_IMAGE=${{ steps.dotenv.outputs.SPLUNK_ENTERPRISE_RELEASE_IMAGE }}" >> $GITHUB_ENV
#- name: Change splunk enterprise to release image on main branches
# if: github.ref == 'refs/heads/main'
# run: |
# echo "SPLUNK_ENTERPRISE_IMAGE=${{ steps.dotenv.outputs.SPLUNK_ENTERPRISE_RELEASE_IMAGE }}" >> $GITHUB_ENV
- name: Install Kubectl
uses: Azure/setup-kubectl@v3
with:
Expand Down Expand Up @@ -219,7 +220,7 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN}}
- name: Pull Splunk Enterprise Image
run: docker pull ${{ steps.dotenv.outputs.SPLUNK_ENTERPRISE_IMAGE }}
run: docker pull ${{ matrix.splunk_version }}
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
Expand All @@ -231,8 +232,8 @@ jobs:
uses: aws-actions/amazon-ecr-login@v1
- name: Tag and Push Splunk Enterprise Image to ECR
run: |
docker tag ${{ steps.dotenv.outputs.SPLUNK_ENTERPRISE_IMAGE }} ${{ secrets.ECR_REPOSITORY }}/${{ steps.dotenv.outputs.SPLUNK_ENTERPRISE_IMAGE }}
docker push ${{ secrets.ECR_REPOSITORY }}/${{ steps.dotenv.outputs.SPLUNK_ENTERPRISE_IMAGE }}
docker tag ${{ matrix.splunk_version }} ${{ secrets.ECR_REPOSITORY }}/${{ matrix.splunk_version }}
docker push ${{ secrets.ECR_REPOSITORY }}/${{ matrix.splunk_version }}
- name: Pull Splunk Operator Image Locally
run: |
docker pull ${{ secrets.ECR_REPOSITORY }}/${{ steps.dotenv.outputs.SPLUNK_OPERATOR_IMAGE_NAME }}:$GITHUB_SHA
Expand Down

0 comments on commit 7d622ed

Please sign in to comment.