Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/CSPL-2725' into release/2.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
akondur committed Jul 16, 2024
2 parents f687858 + afe85a2 commit a8afe56
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 2 deletions.
19 changes: 18 additions & 1 deletion .github/workflows/automated-release-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ jobs:
pull-requests: write
if: github.ref == 'refs/heads/main'
steps:
- name: Set up cosign
uses: sigstore/cosign-installer@main

- name: Checkout code
uses: actions/checkout@v2

Expand Down Expand Up @@ -87,4 +90,18 @@ jobs:
- name: Push Release Image
run: |
docker push splunk/splunk-operator:${{ github.event.inputs.operator_image_tag }}
docker push splunk/splunk-operator:${{ github.event.inputs.operator_image_tag }}
- name: Sign Splunk Operator image with a key
run: |
cosign sign --yes --key env://COSIGN_PRIVATE_KEY splunk/splunk-operator:${{ github.event.inputs.operator_image_tag }}
env:
COSIGN_PRIVATE_KEY: ${{ secrets.COSIGN_PRIVATE_KEY }}
COSIGN_PASSWORD: ${{ secrets.COSIGN_PASSWORD }}

- name: Verify Splunk Operator image with a key
run: |
cosign verify --key env://COSIGN_PUBLIC_KEY splunk/splunk-operator:${{ github.event.inputs.operator_image_tag }}
env:
COSIGN_PUBLIC_KEY: ${{ secrets.COSIGN_PUBLIC_KEY }}

16 changes: 16 additions & 0 deletions .github/workflows/build-test-push-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ jobs:
ECR_REPOSITORY: ${{ secrets.ECR_REPOSITORY }}
S3_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
steps:
- name: Set up cosign
uses: sigstore/cosign-installer@main

- uses: actions/checkout@v2
- name: Dotenv Action
id: dotenv
Expand Down Expand Up @@ -97,6 +100,12 @@ jobs:
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 }}
env:
COSIGN_PRIVATE_KEY: ${{ secrets.COSIGN_PRIVATE_KEY }}
COSIGN_PASSWORD: ${{ secrets.COSIGN_PASSWORD }}
vulnerability-scan:
permissions:
actions: read
Expand All @@ -111,6 +120,8 @@ jobs:
S3_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
IMAGE_NAME: ${{ secrets.ECR_REPOSITORY }}/splunk/splunk-operator:${{ github.sha }}
steps:
- name: Set up cosign
uses: sigstore/cosign-installer@main
- uses: actions/checkout@v2
- name: Dotenv Action
id: dotenv
Expand All @@ -129,6 +140,11 @@ jobs:
- name: Pull Splunk Operator Image Locally
run: |
docker pull ${{ env.IMAGE_NAME }}
- name: Verify Signed Splunk Operator image
run: |
cosign verify --key env://COSIGN_PUBLIC_KEY ${{ env.IMAGE_NAME }}
env:
COSIGN_PUBLIC_KEY: ${{ secrets.COSIGN_PUBLIC_KEY }}
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
Expand Down
16 changes: 15 additions & 1 deletion .github/workflows/nightly-int-test-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,8 @@ jobs:
SPLUNK_OPERATOR_IMAGE_NAME: splunk/splunk-operator
TAG: edge
steps:
- name: Set up cosign
uses: sigstore/cosign-installer@main
- uses: actions/checkout@v2
with:
ref: develop
Expand Down Expand Up @@ -235,4 +237,16 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PUSH_TOKEN}}
- name: Push Splunk Operator Image to Docker Hub
run: docker push ${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:${{ env.TAG }}
run: docker push ${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:${{ env.TAG }}
- 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 }}
env:
COSIGN_PRIVATE_KEY: ${{ secrets.COSIGN_PRIVATE_KEY }}
COSIGN_PASSWORD: ${{ secrets.COSIGN_PASSWORD }}
- name: Verify Signed Splunk Operator image
run: |
cosign verify --key env://COSIGN_PUBLIC_KEY ${{ secrets.ECR_REPOSITORY }}/${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:${{ github.sha }}
env:
COSIGN_PUBLIC_KEY: ${{ secrets.COSIGN_PUBLIC_KEY }}

0 comments on commit a8afe56

Please sign in to comment.