-
Notifications
You must be signed in to change notification settings - Fork 31
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
Automatically update bootstrap template #897
base: dev
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #897 +/- ##
===========================================
+ Coverage 38.75% 62.78% +24.02%
===========================================
Files 282 282
Lines 10922 10922
Branches 1517 1517
===========================================
+ Hits 4233 6857 +2624
+ Misses 6382 3526 -2856
- Partials 307 539 +232 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
generate change file use v8 use release workflow secret
fe544a9
to
bfced26
Compare
uses: aws-actions/aws-secretsmanager-get-secrets@v2 | ||
with: | ||
secret-ids: | | ||
AWS_SECRET, ${{ secrets.RELEASE_WORKFLOW_ACCESS_TOKEN_NAME }} |
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.
reusing the same token that sync-dev main workflow uses because thats the easiest
|
||
jobs: | ||
detect-cdk-bootstrap-changes: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
steps: | ||
- uses: actions/checkout@v3 |
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.
There's a v4 version available now. COuld you use that an pin it to a commit id?
ref: dev | ||
|
||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v3 |
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.
There's a v4 version available now. COuld you use that an pin it to a commit id?
sudo wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 | ||
sudo chmod +x /usr/local/bin/yq |
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.
why do you need to install this now? It was natively available in the old version.
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.
was just a precaution. ill remove it
echo "current-version=$(yq '.Resources.CdkBootstrapVersion.Properties.Value' 'src/AWS.Deploy.Orchestration/CDK/CDKBootstrapTemplate.yaml')" >> $GITHUB_OUTPUT | ||
- name: Fail If CDK Bootstrap Template Changes Detected | ||
if: steps.currentBootstrapVersion.outputs.current-version != steps.latestBootstrapVersion.outputs.latest-version | ||
dotnet tool install -g autover |
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.
pin to a specific version
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.
updated and also pinned rest of versions
env: | ||
NEW_VERSION: ${{ steps.check_version.outputs.new_version }} | ||
run: | | ||
dotnet tool install -g autover |
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.
pin to a specific version
|
||
- name: Create Pull Request | ||
if: steps.check_version.outputs.version_changed == 'true' | ||
uses: peter-evans/create-pull-request@v5 |
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.
use the GitHub CLI to create a PR instead of this action.
This PR automatically updates the CDK bootstrap template to version ${{ steps.check_version.outputs.new_version }}. | ||
- Updates template to latest version | ||
- Maintains DeletePolicy and UpdateReplacePolicy as "Delete" for StagingBucket | ||
- Adds change file for version tracking |
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.
nit: i'd remove this entry.
src/AWS.Deploy.Orchestration/CDK/CDKBootstrapTemplate.yaml | ||
.autover/ | ||
|
||
- name: Cleanup |
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.
nit: this step is unnecessary. The container gets deleted when the workflow is done.
Issue #, if available:
Description of changes:
https://github.com/aws/aws-dotnet-deploy/pull/898/files. This was an old one that was made before i made more updates. I have to wait for a new version to be released to finally test.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.