From 71ae22df08cc2bc30ec93fb2a9814ca510af4f70 Mon Sep 17 00:00:00 2001 From: Matas Lauzadis Date: Wed, 16 Oct 2024 13:48:11 -0400 Subject: [PATCH 01/27] Test --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cdf7ea5eb4d..2743d780a6a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# AWS SDK for Kotlin +AWS SDK for Kotlin [![Apache 2 licensed][apache-badge]][apache-url] [![Maven][maven-badge]][maven-url] [apache-badge]: https://img.shields.io/badge/license-APACHE2-blue.svg From 64f3cbfe5e746659fae8f7a90226ca1e1e304a6d Mon Sep 17 00:00:00 2001 From: Matas Lauzadis Date: Thu, 17 Oct 2024 10:51:35 -0400 Subject: [PATCH 02/27] Add setup-kat action --- .github/actions/setup-kat/action.yml | 38 ++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/actions/setup-kat/action.yml diff --git a/.github/actions/setup-kat/action.yml b/.github/actions/setup-kat/action.yml new file mode 100644 index 00000000000..93a62124ac3 --- /dev/null +++ b/.github/actions/setup-kat/action.yml @@ -0,0 +1,38 @@ +name: Setup Kat +description: > + Prepare kat tool for use in CI + +runs: + using: composite + steps: + - 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: Install AWS CLI + shell: bash + run: | + sudo apt-get update + sudo apt-get install -y awscli + - name: Set up kat + shell: bash + run: | + kat_version=$(aws s3 ls s3://kotlin-sdk-build-tools/kat-releases/ | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | sort -V | tail -n 1) + + if [ -z "$kat_version" ]; then + echo "No versions of kat were found" + exit 1 + fi + echo "Downloading kat version $kat_version" + + aws s3 cp s3://kotlin-sdk-build-tools/kat-releases/$kat_version/kat-$kat_version.zip ./kat.zip + + unzip ./kat.zip kat + cd kat/kat-$kat_version/bin + + kat_binary_path=kat/kat-$kat_version/bin + export PATH="$kat_binary_path:$PATH" + echo $kat_binary_path >> $GITHUB_PATH + + echo "Installed kat version $(kat version)" \ No newline at end of file From b1f13e7c211cdf27ef88af379a51af42833a5baa Mon Sep 17 00:00:00 2001 From: Matas Lauzadis Date: Thu, 17 Oct 2024 10:52:00 -0400 Subject: [PATCH 03/27] revert --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2743d780a6a..cdf7ea5eb4d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -AWS SDK for Kotlin +# AWS SDK for Kotlin [![Apache 2 licensed][apache-badge]][apache-url] [![Maven][maven-badge]][maven-url] [apache-badge]: https://img.shields.io/badge/license-APACHE2-blue.svg From a6036d40cc185e0617eec07ea330784482428a02 Mon Sep 17 00:00:00 2001 From: Matas Lauzadis Date: Thu, 17 Oct 2024 10:55:08 -0400 Subject: [PATCH 04/27] Add kat-verification CI --- .github/workflows/kat-verification.yml | 36 ++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/kat-verification.yml diff --git a/.github/workflows/kat-verification.yml b/.github/workflows/kat-verification.yml new file mode 100644 index 00000000000..56e16f99a22 --- /dev/null +++ b/.github/workflows/kat-verification.yml @@ -0,0 +1,36 @@ +name: Kat Verification + +on: + pull_request: + workflow_dispatch: + +# Allow one instance of this workflow per pull request, and cancel older runs when new changes are pushed +concurrency: + group: ci-pr-${{ github.ref }} + cancel-in-progress: true + +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: Setup kat + uses: ./aws-sdk-kotlin/.github/actions/setup-kat + - name: Verify + working-directory: ./aws-sdk-kotlin + shell: bash + run: | + pwd + ls -lsa + ./gradlew build + ./gradlew publishAllPublicationsToTestLocalRepository + kat brazil transform -i ./build/m2 -o ./transformed -t .brazil.json -v live -m ./codegen/sdk/packages.json \ No newline at end of file From 98bcf05922e0c3e0d6b1ab163972bb5d573c2b15 Mon Sep 17 00:00:00 2001 From: Matas Lauzadis Date: Thu, 17 Oct 2024 10:55:18 -0400 Subject: [PATCH 05/27] Only on PRs --- .github/workflows/kat-verification.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/kat-verification.yml b/.github/workflows/kat-verification.yml index 56e16f99a22..0339c0fe9f9 100644 --- a/.github/workflows/kat-verification.yml +++ b/.github/workflows/kat-verification.yml @@ -2,7 +2,6 @@ name: Kat Verification on: pull_request: - workflow_dispatch: # Allow one instance of this workflow per pull request, and cancel older runs when new changes are pushed concurrency: From 2be5aebf16af8fa9bb217fa936a6f33c981e0262 Mon Sep 17 00:00:00 2001 From: Matas Lauzadis Date: Thu, 17 Oct 2024 10:57:52 -0400 Subject: [PATCH 06/27] Specify when to run the workflow --- .github/workflows/kat-verification.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/kat-verification.yml b/.github/workflows/kat-verification.yml index 0339c0fe9f9..a9e369fc180 100644 --- a/.github/workflows/kat-verification.yml +++ b/.github/workflows/kat-verification.yml @@ -2,6 +2,8 @@ name: Kat Verification 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: From 92ce3aa87b675417887a59a82aafccebac3cf8a8 Mon Sep 17 00:00:00 2001 From: Matas Lauzadis Date: Thu, 17 Oct 2024 10:58:46 -0400 Subject: [PATCH 07/27] Change concurrency group --- .github/workflows/kat-verification.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/kat-verification.yml b/.github/workflows/kat-verification.yml index a9e369fc180..5b9dd6bb496 100644 --- a/.github/workflows/kat-verification.yml +++ b/.github/workflows/kat-verification.yml @@ -7,7 +7,7 @@ on: # Allow one instance of this workflow per pull request, and cancel older runs when new changes are pushed concurrency: - group: ci-pr-${{ github.ref }} + group: kat-pr-${{ github.ref }} cancel-in-progress: true env: From 5fbdd2e59bc846400cd4a1e49f3d896bea01ecac Mon Sep 17 00:00:00 2001 From: Matas Lauzadis Date: Thu, 17 Oct 2024 11:08:09 -0400 Subject: [PATCH 08/27] Pass ARN role as environment variable --- .github/actions/setup-kat/action.yml | 4 ++-- .github/workflows/kat-verification.yml | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/actions/setup-kat/action.yml b/.github/actions/setup-kat/action.yml index 93a62124ac3..34be4667338 100644 --- a/.github/actions/setup-kat/action.yml +++ b/.github/actions/setup-kat/action.yml @@ -8,7 +8,7 @@ runs: - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v4 with: - role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }} + role-to-assume: $CI_AWS_ROLE_ARN aws-region: us-west-2 - name: Install AWS CLI shell: bash @@ -28,7 +28,7 @@ runs: aws s3 cp s3://kotlin-sdk-build-tools/kat-releases/$kat_version/kat-$kat_version.zip ./kat.zip - unzip ./kat.zip kat + unzip ./kat.zip -d kat cd kat/kat-$kat_version/bin kat_binary_path=kat/kat-$kat_version/bin diff --git a/.github/workflows/kat-verification.yml b/.github/workflows/kat-verification.yml index 5b9dd6bb496..4f8dfa254df 100644 --- a/.github/workflows/kat-verification.yml +++ b/.github/workflows/kat-verification.yml @@ -26,6 +26,8 @@ jobs: uses: ./aws-sdk-kotlin/.github/actions/setup-build - name: Setup kat uses: ./aws-sdk-kotlin/.github/actions/setup-kat + env: + CI_AWS_ROLE_ARN: ${{ secrets.CI_AWS_ROLE_ARN }} - name: Verify working-directory: ./aws-sdk-kotlin shell: bash From bdd0ad2ba6bddc1e17840f2d4a6eb310dc009ae6 Mon Sep 17 00:00:00 2001 From: Matas Lauzadis Date: Thu, 17 Oct 2024 11:48:37 -0400 Subject: [PATCH 09/27] Update how AWS creds are resolved --- .github/actions/setup-kat/action.yml | 5 ----- .github/workflows/kat-verification.yml | 15 +++++++++++++-- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/actions/setup-kat/action.yml b/.github/actions/setup-kat/action.yml index 34be4667338..251b23428e0 100644 --- a/.github/actions/setup-kat/action.yml +++ b/.github/actions/setup-kat/action.yml @@ -5,11 +5,6 @@ description: > runs: using: composite steps: - - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v4 - with: - role-to-assume: $CI_AWS_ROLE_ARN - aws-region: us-west-2 - name: Install AWS CLI shell: bash run: | diff --git a/.github/workflows/kat-verification.yml b/.github/workflows/kat-verification.yml index 4f8dfa254df..1eaf2390e4d 100644 --- a/.github/workflows/kat-verification.yml +++ b/.github/workflows/kat-verification.yml @@ -10,6 +10,10 @@ 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" @@ -22,12 +26,19 @@ jobs: 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: ./aws-sdk-kotlin/.github/actions/setup-kat - env: - CI_AWS_ROLE_ARN: ${{ secrets.CI_AWS_ROLE_ARN }} + - name: Verify working-directory: ./aws-sdk-kotlin shell: bash From 0b1fc678bd2f35c6daac54fed64b8ce61a574f72 Mon Sep 17 00:00:00 2001 From: Matas Lauzadis Date: Thu, 17 Oct 2024 14:53:06 -0400 Subject: [PATCH 10/27] get caller identity --- .github/actions/setup-kat/action.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/actions/setup-kat/action.yml b/.github/actions/setup-kat/action.yml index 251b23428e0..e0ca5b8f8b0 100644 --- a/.github/actions/setup-kat/action.yml +++ b/.github/actions/setup-kat/action.yml @@ -13,6 +13,8 @@ runs: - name: Set up kat shell: bash run: | + aws sts get-caller-identity + kat_version=$(aws s3 ls s3://kotlin-sdk-build-tools/kat-releases/ | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | sort -V | tail -n 1) if [ -z "$kat_version" ]; then From 3be316a25992f0e807f5986f73847bf9ebb6b87f Mon Sep 17 00:00:00 2001 From: Matas Lauzadis Date: Thu, 17 Oct 2024 17:29:32 -0400 Subject: [PATCH 11/27] Update the way PATH is set --- .github/actions/setup-kat/action.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/actions/setup-kat/action.yml b/.github/actions/setup-kat/action.yml index e0ca5b8f8b0..c733afc6cb0 100644 --- a/.github/actions/setup-kat/action.yml +++ b/.github/actions/setup-kat/action.yml @@ -12,9 +12,7 @@ runs: sudo apt-get install -y awscli - name: Set up kat shell: bash - run: | - aws sts get-caller-identity - + run: | kat_version=$(aws s3 ls s3://kotlin-sdk-build-tools/kat-releases/ | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | sort -V | tail -n 1) if [ -z "$kat_version" ]; then @@ -28,8 +26,13 @@ runs: unzip ./kat.zip -d kat cd kat/kat-$kat_version/bin - kat_binary_path=kat/kat-$kat_version/bin + kat_binary_path="$PWD/kat/kat-$kat_version/bin" export PATH="$kat_binary_path:$PATH" - echo $kat_binary_path >> $GITHUB_PATH - + echo "$kat_binary_path" >> $GITHUB_PATH + + # Debug + echo "Current PATH: $PATH" + ls -l "$kat_binary_path" + + echo "Installed kat version $(kat version)" \ No newline at end of file From d58c4af0e06fb986c7dbf91c62acf61d01d7a73f Mon Sep 17 00:00:00 2001 From: Matas Lauzadis Date: Thu, 17 Oct 2024 17:30:58 -0400 Subject: [PATCH 12/27] Break out `transform` into a new step --- .github/actions/setup-kat/action.yml | 1 - .github/workflows/kat-verification.yml | 12 ++++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/actions/setup-kat/action.yml b/.github/actions/setup-kat/action.yml index c733afc6cb0..9d1bb432b41 100644 --- a/.github/actions/setup-kat/action.yml +++ b/.github/actions/setup-kat/action.yml @@ -34,5 +34,4 @@ runs: echo "Current PATH: $PATH" ls -l "$kat_binary_path" - echo "Installed kat version $(kat version)" \ No newline at end of file diff --git a/.github/workflows/kat-verification.yml b/.github/workflows/kat-verification.yml index 1eaf2390e4d..c268eef00fa 100644 --- a/.github/workflows/kat-verification.yml +++ b/.github/workflows/kat-verification.yml @@ -39,7 +39,7 @@ jobs: - name: Setup kat uses: ./aws-sdk-kotlin/.github/actions/setup-kat - - name: Verify + - name: Build working-directory: ./aws-sdk-kotlin shell: bash run: | @@ -47,4 +47,12 @@ jobs: ls -lsa ./gradlew build ./gradlew publishAllPublicationsToTestLocalRepository - kat brazil transform -i ./build/m2 -o ./transformed -t .brazil.json -v live -m ./codegen/sdk/packages.json \ No newline at end of file + + - 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 + echo "Transformation succeeded!" \ No newline at end of file From c51ea057d59b99084a2cbedd29b6cb7088ff0c0a Mon Sep 17 00:00:00 2001 From: Matas Lauzadis Date: Thu, 17 Oct 2024 17:36:06 -0400 Subject: [PATCH 13/27] End early --- .github/actions/setup-kat/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/setup-kat/action.yml b/.github/actions/setup-kat/action.yml index 9d1bb432b41..cf69b1114e6 100644 --- a/.github/actions/setup-kat/action.yml +++ b/.github/actions/setup-kat/action.yml @@ -34,4 +34,4 @@ runs: echo "Current PATH: $PATH" ls -l "$kat_binary_path" - echo "Installed kat version $(kat version)" \ No newline at end of file + echo "Installed kat version $(kat version)" || (echo "Failed to execute kat command" && exit 1) \ No newline at end of file From 0130a713a4aa830f8691eed19fe90b53551830be Mon Sep 17 00:00:00 2001 From: Matas Lauzadis Date: Thu, 17 Oct 2024 17:39:52 -0400 Subject: [PATCH 14/27] Remove `cd` --- .github/actions/setup-kat/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/setup-kat/action.yml b/.github/actions/setup-kat/action.yml index cf69b1114e6..0e4be3c3f52 100644 --- a/.github/actions/setup-kat/action.yml +++ b/.github/actions/setup-kat/action.yml @@ -23,8 +23,8 @@ runs: aws s3 cp s3://kotlin-sdk-build-tools/kat-releases/$kat_version/kat-$kat_version.zip ./kat.zip + echo "Unzipping kat tool" unzip ./kat.zip -d kat - cd kat/kat-$kat_version/bin kat_binary_path="$PWD/kat/kat-$kat_version/bin" export PATH="$kat_binary_path:$PATH" From 87b9542a873ec0f0b0ba4086941e44c7ce9d3482 Mon Sep 17 00:00:00 2001 From: Matas Lauzadis Date: Thu, 17 Oct 2024 17:45:52 -0400 Subject: [PATCH 15/27] Remove debug and make unzip quiet --- .github/actions/setup-kat/action.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/actions/setup-kat/action.yml b/.github/actions/setup-kat/action.yml index 0e4be3c3f52..565618f8ba8 100644 --- a/.github/actions/setup-kat/action.yml +++ b/.github/actions/setup-kat/action.yml @@ -24,14 +24,10 @@ runs: aws s3 cp s3://kotlin-sdk-build-tools/kat-releases/$kat_version/kat-$kat_version.zip ./kat.zip echo "Unzipping kat tool" - unzip ./kat.zip -d kat + unzip -qq ./kat.zip -d kat kat_binary_path="$PWD/kat/kat-$kat_version/bin" export PATH="$kat_binary_path:$PATH" echo "$kat_binary_path" >> $GITHUB_PATH - # Debug - echo "Current PATH: $PATH" - ls -l "$kat_binary_path" - echo "Installed kat version $(kat version)" || (echo "Failed to execute kat command" && exit 1) \ No newline at end of file From 5cef4567a3fb7d24e282764b24ed097ac46da3bb Mon Sep 17 00:00:00 2001 From: Matas Lauzadis Date: Thu, 17 Oct 2024 17:48:08 -0400 Subject: [PATCH 16/27] kat bump-version --- .github/workflows/kat-verification.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/kat-verification.yml b/.github/workflows/kat-verification.yml index c268eef00fa..14d138eccdb 100644 --- a/.github/workflows/kat-verification.yml +++ b/.github/workflows/kat-verification.yml @@ -45,6 +45,7 @@ jobs: 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 From ac7e0bf568fa74ca087b3acb2dbd9076e54675a5 Mon Sep 17 00:00:00 2001 From: Matas Lauzadis Date: Thu, 17 Oct 2024 17:58:02 -0400 Subject: [PATCH 17/27] Verify import manifest exists --- .github/workflows/kat-verification.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/kat-verification.yml b/.github/workflows/kat-verification.yml index 14d138eccdb..5252d8bdeeb 100644 --- a/.github/workflows/kat-verification.yml +++ b/.github/workflows/kat-verification.yml @@ -56,4 +56,11 @@ jobs: 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!" \ No newline at end of file From 235771ff92d21809454c838bd00e9813deaa42f5 Mon Sep 17 00:00:00 2001 From: Matas Lauzadis Date: Thu, 17 Oct 2024 18:01:43 -0400 Subject: [PATCH 18/27] Newline --- .github/workflows/kat-verification.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/kat-verification.yml b/.github/workflows/kat-verification.yml index 5252d8bdeeb..0ee12d4e8b7 100644 --- a/.github/workflows/kat-verification.yml +++ b/.github/workflows/kat-verification.yml @@ -63,4 +63,4 @@ jobs: exit 1 fi - echo "Transformation succeeded!" \ No newline at end of file + echo "Transformation succeeded!" From e99f0b0b50e6b8ede3ebf0bff7469eac53b4a0b4 Mon Sep 17 00:00:00 2001 From: Matas Lauzadis Date: Thu, 17 Oct 2024 18:09:27 -0400 Subject: [PATCH 19/27] Simplify PATH --- .github/actions/setup-kat/action.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/actions/setup-kat/action.yml b/.github/actions/setup-kat/action.yml index 565618f8ba8..9c129a764cb 100644 --- a/.github/actions/setup-kat/action.yml +++ b/.github/actions/setup-kat/action.yml @@ -27,7 +27,6 @@ runs: unzip -qq ./kat.zip -d kat kat_binary_path="$PWD/kat/kat-$kat_version/bin" - export PATH="$kat_binary_path:$PATH" echo "$kat_binary_path" >> $GITHUB_PATH echo "Installed kat version $(kat version)" || (echo "Failed to execute kat command" && exit 1) \ No newline at end of file From 5a960e3a3c3400cdf1ec8b74dfdb0a62ef4655d3 Mon Sep 17 00:00:00 2001 From: Matas Lauzadis Date: Thu, 17 Oct 2024 18:11:54 -0400 Subject: [PATCH 20/27] Simplify PATH the other way --- .github/actions/setup-kat/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/setup-kat/action.yml b/.github/actions/setup-kat/action.yml index 9c129a764cb..e2aef4c025b 100644 --- a/.github/actions/setup-kat/action.yml +++ b/.github/actions/setup-kat/action.yml @@ -27,6 +27,6 @@ runs: unzip -qq ./kat.zip -d kat kat_binary_path="$PWD/kat/kat-$kat_version/bin" - echo "$kat_binary_path" >> $GITHUB_PATH + export PATH="$kat_binary_path:$PATH" echo "Installed kat version $(kat version)" || (echo "Failed to execute kat command" && exit 1) \ No newline at end of file From 02a8b7c4ae3372b644696bdf5257016cdc8c4f12 Mon Sep 17 00:00:00 2001 From: Matas Lauzadis Date: Thu, 17 Oct 2024 18:18:09 -0400 Subject: [PATCH 21/27] Need both, optimizing PATH not possible --- .github/actions/setup-kat/action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/actions/setup-kat/action.yml b/.github/actions/setup-kat/action.yml index e2aef4c025b..565618f8ba8 100644 --- a/.github/actions/setup-kat/action.yml +++ b/.github/actions/setup-kat/action.yml @@ -28,5 +28,6 @@ runs: kat_binary_path="$PWD/kat/kat-$kat_version/bin" export PATH="$kat_binary_path:$PATH" + echo "$kat_binary_path" >> $GITHUB_PATH echo "Installed kat version $(kat version)" || (echo "Failed to execute kat command" && exit 1) \ No newline at end of file From 5fcc95e750b6b8247afe95a9764e15202a147e97 Mon Sep 17 00:00:00 2001 From: Matas Lauzadis Date: Thu, 17 Oct 2024 18:18:40 -0400 Subject: [PATCH 22/27] transform --- .github/workflows/{kat-verification.yml => kat-transform.yml} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename .github/workflows/{kat-verification.yml => kat-transform.yml} (98%) diff --git a/.github/workflows/kat-verification.yml b/.github/workflows/kat-transform.yml similarity index 98% rename from .github/workflows/kat-verification.yml rename to .github/workflows/kat-transform.yml index 0ee12d4e8b7..36f7e1181fe 100644 --- a/.github/workflows/kat-verification.yml +++ b/.github/workflows/kat-transform.yml @@ -1,4 +1,4 @@ -name: Kat Verification +name: Kat Transform on: pull_request: From 93dfe424965834421d0b026a918cf649ded49989 Mon Sep 17 00:00:00 2001 From: Matas Lauzadis Date: Fri, 18 Oct 2024 10:07:16 -0400 Subject: [PATCH 23/27] Use the shared action script --- .github/workflows/kat-transform.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/kat-transform.yml b/.github/workflows/kat-transform.yml index 36f7e1181fe..1bc54c39a21 100644 --- a/.github/workflows/kat-transform.yml +++ b/.github/workflows/kat-transform.yml @@ -37,7 +37,7 @@ jobs: aws-region: us-west-2 - name: Setup kat - uses: ./aws-sdk-kotlin/.github/actions/setup-kat + uses: awslabs/aws-kotlin-repo-tools/.github/actions/setup-kat@kat-ci - name: Build working-directory: ./aws-sdk-kotlin From e63971921ccb50295b4ec036d27e16ea182810a1 Mon Sep 17 00:00:00 2001 From: Matas Lauzadis Date: Fri, 18 Oct 2024 10:16:37 -0400 Subject: [PATCH 24/27] Delete setup-kat --- .github/actions/setup-kat/action.yml | 33 ---------------------------- 1 file changed, 33 deletions(-) delete mode 100644 .github/actions/setup-kat/action.yml diff --git a/.github/actions/setup-kat/action.yml b/.github/actions/setup-kat/action.yml deleted file mode 100644 index 565618f8ba8..00000000000 --- a/.github/actions/setup-kat/action.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: Setup Kat -description: > - Prepare kat tool for use in CI - -runs: - using: composite - steps: - - name: Install AWS CLI - shell: bash - run: | - sudo apt-get update - sudo apt-get install -y awscli - - name: Set up kat - shell: bash - run: | - kat_version=$(aws s3 ls s3://kotlin-sdk-build-tools/kat-releases/ | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | sort -V | tail -n 1) - - if [ -z "$kat_version" ]; then - echo "No versions of kat were found" - exit 1 - fi - echo "Downloading kat version $kat_version" - - aws s3 cp s3://kotlin-sdk-build-tools/kat-releases/$kat_version/kat-$kat_version.zip ./kat.zip - - echo "Unzipping kat tool" - unzip -qq ./kat.zip -d kat - - kat_binary_path="$PWD/kat/kat-$kat_version/bin" - export PATH="$kat_binary_path:$PATH" - echo "$kat_binary_path" >> $GITHUB_PATH - - echo "Installed kat version $(kat version)" || (echo "Failed to execute kat command" && exit 1) \ No newline at end of file From f0707ad2475c6499cb2e5dcdddd2551f29659c28 Mon Sep 17 00:00:00 2001 From: Matas Lauzadis Date: Fri, 18 Oct 2024 10:17:43 -0400 Subject: [PATCH 25/27] Fix error message --- .github/workflows/kat-transform.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/kat-transform.yml b/.github/workflows/kat-transform.yml index 1bc54c39a21..c7d0d9a96f7 100644 --- a/.github/workflows/kat-transform.yml +++ b/.github/workflows/kat-transform.yml @@ -59,7 +59,7 @@ jobs: # Check for manifest file if [ ! -f "./transformed/brazil-import-manifest.json" ]; then - echo "Error: manifest.json not found in the transformed artifact" + echo "Error: brazil-import-manifest.json not found in the transformed artifact" exit 1 fi From 293e2f2f9e39d411c5cad1bcf45522066b891528 Mon Sep 17 00:00:00 2001 From: Matas Lauzadis Date: Fri, 18 Oct 2024 12:16:05 -0400 Subject: [PATCH 26/27] Remove branch name --- .github/workflows/kat-transform.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/kat-transform.yml b/.github/workflows/kat-transform.yml index c7d0d9a96f7..77d4cebde9f 100644 --- a/.github/workflows/kat-transform.yml +++ b/.github/workflows/kat-transform.yml @@ -37,7 +37,7 @@ jobs: aws-region: us-west-2 - name: Setup kat - uses: awslabs/aws-kotlin-repo-tools/.github/actions/setup-kat@kat-ci + uses: awslabs/aws-kotlin-repo-tools/.github/actions/setup-kat - name: Build working-directory: ./aws-sdk-kotlin From c754068a895962df105af23742bb72762c3c827f Mon Sep 17 00:00:00 2001 From: Matas Lauzadis Date: Fri, 18 Oct 2024 12:25:12 -0400 Subject: [PATCH 27/27] Add `@main` branch name --- .github/workflows/kat-transform.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/kat-transform.yml b/.github/workflows/kat-transform.yml index 77d4cebde9f..6608dfae8b4 100644 --- a/.github/workflows/kat-transform.yml +++ b/.github/workflows/kat-transform.yml @@ -37,7 +37,7 @@ jobs: aws-region: us-west-2 - name: Setup kat - uses: awslabs/aws-kotlin-repo-tools/.github/actions/setup-kat + uses: awslabs/aws-kotlin-repo-tools/.github/actions/setup-kat@main - name: Build working-directory: ./aws-sdk-kotlin