Skip to content

Production and testing diff output #1

Production and testing diff output

Production and testing diff output #1

name: Production - Helmfile Diff
on:
- pull_request
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HELMFILE_FILE_PATH: ${{ github.workspace }}/helmfile
PRODUCTION_AWS_ACCOUNT: ${{ secrets.PRODUCTION_AWS_ACCOUNT }}
jobs:
helmfile-diff:
runs-on: ubuntu-latest
steps:
- name: Inject token authentication
run: |
git config --global url."https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/".insteadOf "https://github.com/"
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@5fd3084fc36e372ff1fff382a39b10d03659f355 # v2.2.0
id: awsconfig
with:
aws-access-key-id: ${{ secrets.PRODUCTION_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.PRODUCTION_AWS_SECRET_ACCESS_KEY }}
aws-region: ca-central-1
- name: Checkout
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
# Fetches entire history, so we can analyze commits since last tag
fetch-depth: 0
- name: Configure kubeconfig
run: |
aws eks update-kubeconfig --name notification-canada-ca-production-eks-cluster
kubectl config rename-context arn:aws:eks:ca-central-1:$PRODUCTION_AWS_ACCOUNT:cluster/notification-canada-ca-production-eks-cluster production
- name: Load EnvVars
run: |
./helmfile/getContext.sh true
- name: Run helmfile
id: helmfile_diff
uses: helmfile/[email protected]
with:
helmfile-args: diff --environment production
- name: Helmfile Diff Comment
uses: mshick/add-pr-comment@v2
with:
message: |
Placeholder for helm diff once the output from GA works.