Commit bef9679
authored
feat!: use toolkit-lib for diff (corymhall#125) (corymhall#142)
This PR refactors the diff and assembly processing to use the new
`@aws-cdk/toolkit-lib` library.
This allows us to greatly simplify the logic that we have to maintain
and offload more work to the core library.
For example, this allows us to use the default CDK authentication
instead of trying to replicate it ourselves (see corymhall#62).
Couple of other changes that I've included in this PR since v2 allows me
a chance to make breaking changes.
BREAKING CHANGE: several breaking changes with details below
There are several breaking changes in this release.
1. Replace `noDiffForStages` with `stackSelectionStrategy` &
`stackSelectorPatterns`
This uses the native selection stack filtering capability of
`toolkit-lib` and should be a more robust option for users to filter
stacks. `stackSelectorPatterns` also uses a multi-line input instead of
a comma delimited string input. To migrate from `noDiffForStages` to
`stackSelectorPatterns` you can do this:
```yaml
# from this
- name: Diff
uses: corymhall/cdk-diff-action@v1
with:
noDiffForStages: "Stage1,Stage2"
githubToken: ${{ secrets.GITHUB_TOKEN }}
# to this
- name: Diff
uses: corymhall/cdk-diff-action@v2-beta
with:
stackSelectorPatterns: |
!Stage1/*
!Stage2/*
githubToken: ${{ secrets.GITHUB_TOKEN }}
```
2. The default `diffMethod` is changed to `change-set` to match the cdk
default behavior. This also changes the IAM Role used for diff from the
`lookup-role` to the `deploy-role`. To keep the old behavior you can
specify `diffMethod: template-only`
3. `allowDestroyTypes` and `noFailOnDestructiveChanges` input types were
changed from a comma delimited string to a multi-line string.
```yaml
# from this
- name: Diff
uses: corymhall/cdk-diff-action@v1
with:
noFailOnDestructiveChanges: "Stage1,Stage2"
githubToken: ${{ secrets.GITHUB_TOKEN }}
# to this
- name: Diff
uses: corymhall/cdk-diff-action@v2-beta
with:
noFailOnDestructiveChanges: |
Stage1
Stage2
githubToken: ${{ secrets.GITHUB_TOKEN }}
```
Closes corymhall#44
Fixes corymhall#62
---------
Signed-off-by: github-actions <github-actions@github.com>
Co-authored-by: github-actions <github-actions@github.com>Fixes #48 files changed
Lines changed: 380481 additions & 81405 deletions
File tree
- .github/workflows
- .projen
- dist
- bin
- projenrc
- src
- test
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments