Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
a3ccdbb
misc: gradle mirror
0marperez Jan 6, 2025
3f70567
fix: use different gradle versions
0marperez Jan 6, 2025
2c4b6c1
fix: only use mirror in ci
0marperez Jan 7, 2025
f3b4700
fix: use public gradle distro url when not in ci
0marperez Jan 7, 2025
4a48e1d
fix: use proper working dir in CI
0marperez Jan 7, 2025
083a903
fix: avoid configuring working-directory where not needed
0marperez Jan 7, 2025
49527a1
fix: left over working dir config from codebuild ci
0marperez Jan 7, 2025
8febb3b
fix: pull request feedback
0marperez Jan 7, 2025
4117e05
misc: possible fix
0marperez Jan 10, 2025
a7f56ee
misc: pwd && ls becasue action can't be found
0marperez Jan 10, 2025
6e86682
misc: add working dir to test
0marperez Jan 10, 2025
53bbeb0
pwd and ls again
0marperez Jan 10, 2025
8aefd49
fix: use working directory
0marperez Jan 10, 2025
d63c671
fix: possible fixes
0marperez Jan 10, 2025
18e7f96
Merge branch 'main' of https://github.com/awslabs/aws-sdk-kotlin into…
0marperez Jan 10, 2025
5736050
possible fix for lint & adding custom URL to service check batch
0marperez Jan 10, 2025
55735e8
misc: use path in lint workflow
0marperez Jan 10, 2025
ad67c6b
fix: use working dir in ktlint workflow
0marperez Jan 10, 2025
1342474
fix: use working dir in codebuild CI
0marperez Jan 10, 2025
9ecf72c
Trigger CI
0marperez Jan 10, 2025
6f9e46b
fix: use checkout sources v4 in codebuild CI
0marperez Jan 10, 2025
6c00a70
fix: configure path when checking out in codebuild CI
0marperez Jan 10, 2025
053fe7a
fix: use working dir for every run
0marperez Jan 10, 2025
271ed74
Revert "fix: use working dir for every run"
0marperez Jan 15, 2025
2670696
Revert "fix: configure path when checking out in codebuild CI"
0marperez Jan 15, 2025
6f1e46e
Revert "fix: use checkout sources v4 in codebuild CI"
0marperez Jan 15, 2025
2a28159
misc: hardcode configure gradle task
0marperez Jan 15, 2025
c4e11d5
fix: add working directories
0marperez Jan 15, 2025
b52f293
fix: add missing working directory
0marperez Jan 15, 2025
beafa42
Merge branch 'main' of https://github.com/awslabs/aws-sdk-kotlin into…
0marperez Jan 15, 2025
5093d3e
Merge branch 'main' of https://github.com/awslabs/aws-sdk-kotlin into…
0marperez Jan 15, 2025
4ced053
misc: trigger CI
0marperez Jan 15, 2025
0c0cd7d
feat: use action
0marperez Jan 17, 2025
f1c6672
fix: remove wrapper changes
0marperez Jan 17, 2025
b39f377
fix: pr feedback
0marperez Jan 17, 2025
5c98b5e
Merge branch 'main' of https://github.com/awslabs/aws-sdk-kotlin into…
0marperez Feb 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/codebuild-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ jobs:
with:
role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }}
aws-region: us-west-2
- name: Configure Gradle
run: gradle wrapper --gradle-distribution-url ${{ secrets.CUSTOM_GRADLE_DISTRIBUTION_URL }}/gradle-8.5-bin.zip
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: All this repetition means we'll have to update the version number in a bunch of places. This seems like a good candidate for either a custom action or possibly integrating into our common build setup.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even better, add the custom action to aws-kotlin-repo-tools like I did for kat

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would hamper our ability to upgrade Gradle versions independently across the repos. Couldn't that also cause issues that wouldn't be caught until the next run of CI?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great suggestion, thanks

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be caught when you go to upgrade the version of aws-kotlin-repo-tools you're using

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I can turn it into an action with inputs to specify the gradle version we want to use. That way we can move it to repo tools

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Specify the Gradle version where? In each action that uses Gradle? Doesn't that defeat the goal of commonizing the version in a single place?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh you're right, nvm

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: Why make the distribution URL a secret?

Copy link
Contributor Author

@0marperez 0marperez Jan 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think someone could use it and possibly perform some sort of attack. I doubt someone will but theoretically they could take down our CI or just run up our AWS bill

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the full command (and the Gradle distribution URL) will still be visible in the CI's logs

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see it hidden as ***

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moving conversation offline.

- name: Run Service Check Batch and Calculate Artifact Size Metrics
id: svc-check-batch
run: |
Expand Down Expand Up @@ -210,6 +212,8 @@ jobs:
with:
role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }}
aws-region: us-west-2
- name: Configure Gradle
run: gradle wrapper --gradle-distribution-url ${{ secrets.CUSTOM_GRADLE_DISTRIBUTION_URL }}/gradle-8.5-bin.zip
- name: Calculate Artifact Size Metrics
id: svc-check-batch
run: |
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ jobs:
path: 'aws-sdk-kotlin'
- name: Setup Build
uses: ./aws-sdk-kotlin/.github/actions/setup-build
- name: Configure Gradle
working-directory: ./aws-sdk-kotlin
run: gradle wrapper --gradle-distribution-url ${{ secrets.CUSTOM_GRADLE_DISTRIBUTION_URL }}/gradle-8.5-bin.zip
- name: Test
working-directory: ./aws-sdk-kotlin
shell: bash
Expand All @@ -54,6 +57,9 @@ jobs:
path: 'aws-sdk-kotlin'
- name: Setup Build
uses: ./aws-sdk-kotlin/.github/actions/setup-build
- name: Configure Gradle
working-directory: ./aws-sdk-kotlin
run: gradle wrapper --gradle-distribution-url ${{ secrets.CUSTOM_GRADLE_DISTRIBUTION_URL }}/gradle-8.5-bin.zip
- name: Build smithy-kotlin
working-directory: ./smithy-kotlin
shell: bash
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/kat-transform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ jobs:
role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }}
aws-region: us-west-2

- name: Configure Gradle
working-directory: ./aws-sdk-kotlin
run: gradle wrapper --gradle-distribution-url ${{ secrets.CUSTOM_GRADLE_DISTRIBUTION_URL }}/gradle-8.5-bin.zip

- name: Setup kat
uses: awslabs/aws-kotlin-repo-tools/.github/actions/setup-kat@main

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Configure Gradle
run: gradle wrapper --gradle-distribution-url ${{ secrets.CUSTOM_GRADLE_DISTRIBUTION_URL }}/gradle-8.5-bin.zip
- name: Lint ${{ env.PACKAGE_NAME }}
run: |
./gradlew ktlint
2 changes: 2 additions & 0 deletions .github/workflows/update-release-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ jobs:
distribution: 'corretto'
java-version: 17
cache: 'gradle'
- name: Configure Gradle
run: gradle wrapper --gradle-distribution-url ${{ secrets.CUSTOM_GRADLE_DISTRIBUTION_URL }}/gradle-8.5-bin.zip
- name: Check merge base
shell: bash
run: |
Expand Down
2 changes: 1 addition & 1 deletion examples/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: Why standardize on 8.5? Why not use the latest release, 8.12?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Iirc there are some soon to be deprecated features we're using. I'll try using 8.12 and see if everything works okay

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like it works👍

zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading