-
Notifications
You must be signed in to change notification settings - Fork 49
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
feat: kat
in CI
#1443
Merged
Merged
feat: kat
in CI
#1443
Changes from 24 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
71ae22d
Test
lauzadis 64f3cbf
Add setup-kat action
lauzadis b1f13e7
revert
lauzadis a6036d4
Add kat-verification CI
lauzadis 98bcf05
Only on PRs
lauzadis 2be5aeb
Specify when to run the workflow
lauzadis 92ce3aa
Change concurrency group
lauzadis 5fbdd2e
Pass ARN role as environment variable
lauzadis bdd0ad2
Update how AWS creds are resolved
lauzadis 0b1fc67
get caller identity
lauzadis 3be316a
Update the way PATH is set
lauzadis d58c4af
Break out `transform` into a new step
lauzadis c51ea05
End early
lauzadis 0130a71
Remove `cd`
lauzadis 87b9542
Remove debug and make unzip quiet
lauzadis 5cef456
kat bump-version
lauzadis ac7e0bf
Verify import manifest exists
lauzadis 235771f
Newline
lauzadis e99f0b0
Simplify PATH
lauzadis 5a960e3
Simplify PATH the other way
lauzadis 02a8b7c
Need both, optimizing PATH not possible
lauzadis 5fcc95e
transform
lauzadis 93dfe42
Use the shared action script
lauzadis e639719
Delete setup-kat
lauzadis f0707ad
Fix error message
lauzadis 293e2f2
Remove branch name
lauzadis c754068
Add `@main` branch name
lauzadis 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,66 @@ | ||
name: Kat Transform | ||
|
||
on: | ||
pull_request: | ||
types: [ opened, synchronize, reopened, labeled, unlabeled ] | ||
branches: [ main ] | ||
|
||
# Allow one instance of this workflow per pull request, and cancel older runs when new changes are pushed | ||
concurrency: | ||
group: kat-pr-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
id-token: write | ||
contents: read | ||
|
||
env: | ||
RUN: ${{ github.run_id }}-${{ github.run_number }} | ||
GRADLE_OPTS: "-Dorg.gradle.daemon=false -Dkotlin.incremental=false" | ||
|
||
jobs: | ||
verify-transform: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v4 | ||
with: | ||
path: 'aws-sdk-kotlin' | ||
|
||
- name: Setup Build | ||
uses: ./aws-sdk-kotlin/.github/actions/setup-build | ||
|
||
- name: Configure AWS Credentials | ||
uses: aws-actions/configure-aws-credentials@v4 | ||
with: | ||
role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }} | ||
aws-region: us-west-2 | ||
|
||
- name: Setup kat | ||
uses: awslabs/aws-kotlin-repo-tools/.github/actions/setup-kat@kat-ci | ||
|
||
- name: Build | ||
working-directory: ./aws-sdk-kotlin | ||
shell: bash | ||
run: | | ||
pwd | ||
ls -lsa | ||
kat bump-version # Bump from `vNext-SNAPSHOT` to `vNext`. kat transform only works on non-SNAPSHOT versions | ||
./gradlew build | ||
./gradlew publishAllPublicationsToTestLocalRepository | ||
|
||
- name: Transform | ||
working-directory: ./aws-sdk-kotlin | ||
shell: bash | ||
run: | | ||
pwd | ||
ls -lsa | ||
kat brazil transform -i ./build/m2 -o ./transformed -t .brazil.json -v live -m ./codegen/sdk/packages.json | ||
|
||
# Check for manifest file | ||
if [ ! -f "./transformed/brazil-import-manifest.json" ]; then | ||
echo "Error: manifest.json not found in the transformed artifact" | ||
exit 1 | ||
fi | ||
|
||
echo "Transformation succeeded!" |
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.
Note: This
@kat-ci
is the branch name in aws-kotlin-repo-tools, will be removed once that PR is merged