-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Production and testing diff output #2373
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
ac137b1
Production and testing diff output
ben851 27f2ef5
Production and testing diff output
ben851 1c29e99
action run conditions
ben851 d0b8cdb
action run conditions
ben851 2d1ba11
action run conditions
ben851 40c8d61
debug
ben851 5baa840
debug
ben851 26ec569
debug
ben851 212e43a
debug
ben851 1eae13d
debug
ben851 eae35c2
debug
ben851 ea8f91e
Helmfile diff comments working!
ben851 d71e15c
removing garbago on nginx
ben851 c81a7df
testing tee
ben851 412b78b
no tee
ben851 f9bea24
missed prod
ben851 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Production - Helmfile Apply | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- "VERSION" | ||
|
||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
HELMFILE_FILE_PATH: ${{ github.workspace }}/helmfile | ||
PRODUCTION_AWS_ACCOUNT: ${{ secrets.PRODUCTION_AWS_ACCOUNT }} | ||
|
||
jobs: | ||
helmfile-apply: | ||
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_apply | ||
uses: helmfile/[email protected] | ||
with: | ||
helmfile-args: apply --environment production |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: Production - Helmfile Diff | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- "VERSION" | ||
|
||
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: Setup helmfile | ||
uses: mamezou-tech/[email protected] | ||
with: | ||
install-kubectl: no | ||
install-helm: yes | ||
- name: Helmfile Diff | ||
id: helmfile_diff | ||
run: | | ||
echo 'var<<EOF' >> $GITHUB_OUTPUT | ||
helmfile --environment staging diff >> $GITHUB_OUTPUT | ||
echo 'EOF' >> $GITHUB_OUTPUT | ||
- name: Helmfile Diff Comment | ||
uses: mshick/add-pr-comment@v2 | ||
with: | ||
message: | | ||
${{join(steps.helmfile_diff.outputs.*, '\n')}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,13 +35,19 @@ jobs: | |
- name: Load EnvVars | ||
run: | | ||
./helmfile/getContext.sh true | ||
- name: Run helmfile | ||
id: helmfile_diff | ||
uses: helmfile/[email protected] | ||
- name: Setup helmfile | ||
uses: mamezou-tech/[email protected] | ||
with: | ||
helmfile-args: diff --environment staging | ||
install-kubectl: no | ||
install-helm: yes | ||
- name: Helmfile Diff | ||
id: helmfile_diff | ||
run: | | ||
echo 'var<<EOF' >> $GITHUB_OUTPUT | ||
helmfile --environment staging diff >> $GITHUB_OUTPUT | ||
echo 'EOF' >> $GITHUB_OUTPUT | ||
- name: Helmfile Diff Comment | ||
uses: mshick/add-pr-comment@v2 | ||
with: | ||
message: | | ||
Placeholder for helm diff once the output from GA works. | ||
${{join(steps.helmfile_diff.outputs.*, '\n')}} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh that is the working diff here I assume? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You got it! |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh interesting stuff going on here with the
insteadOf
instruction!There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a copy paste from our other GA's!