Skip to content

Commit e2d5b9f

Browse files
authored
kn: upgrade to latest version of aws-kotlin-repo-tools (#1648)
1 parent 3fce507 commit e2d5b9f

File tree

284 files changed

+141342
-33359
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

284 files changed

+141342
-33359
lines changed

.brazil-1.x.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"dependencies": {
3+
"org.jetbrains.kotlin:kotlin-gradle-plugin:2.*": "KotlinGradlePlugin-2.x",
4+
"org.jetbrains.kotlin:kotlin-stdlib-common:2.*.*": "KotlinStdlibCommon-2.x",
5+
"org.jetbrains.kotlin:kotlin-stdlib-jdk8:2.*.*": "KotlinStdlibJdk8-2.x",
6+
"org.jetbrains.kotlin:kotlin-stdlib:2.*.*": "KotlinStdlib-2.x",
7+
"org.jetbrains.kotlinx:atomicfu:0.*.*": "Atomicfu-0.x",
8+
"org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.*": "KotlinxCoroutinesCoreJvm-1.x",
9+
"org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:1.*": "KotlinxCoroutinesJdk8-1.x",
10+
"com.google.devtools.ksp:symbol-processing-api:2.*": "Maven-com-google-devtools-ksp_symbol-processing-api-2.x",
11+
"com.google.devtools.ksp:symbol-processing-gradle-plugin:2.*": "Maven-com-google-devtools-ksp_symbol-processing-gradle-plugin-2.x"
12+
},
13+
"packageHandlingRules": {
14+
"versioning": {
15+
"defaultVersionLayout": "{MAJOR}.x"
16+
},
17+
"ignore": [
18+
"aws.sdk.kotlin:bom",
19+
"aws.sdk.kotlin:testing",
20+
"aws.sdk.kotlin:version-catalog"
21+
],
22+
"resolvesConflictDependencies": {
23+
"org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.*" : ["KotlinxCoroutinesCoreJvm-1.x"],
24+
"org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:1.*": ["KotlinxCoroutinesJdk8-1.x"],
25+
"aws.smithy.kotlin:aws-event-stream:1.*": ["KotlinxCoroutinesCoreJvm-1.x"]
26+
}
27+
}
28+
}

.github/scripts/run-codebuild-batch-job.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ START_RESULT=$(
9494
aws codebuild start-build-batch \
9595
--project-name ${PROJECT_NAME} \
9696
--source-version $SOURCE_VERSION \
97-
--environment-variables-override file:///tmp/gh_env_vars.json
97+
--environment-variables-override file:///tmp/gh_env_vars.json \
98+
--source-location-override "https://github.com/awslabs/$GITHUB_REPOSITORY_NO_ORG.git"
9899
)
99100

100101
if [ "$?" != "0" ]; then

.github/workflows/api-compat-verification.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ on:
77
- main
88
- '*-main'
99

10+
permissions: { }
11+
1012
jobs:
1113
api-compat-verification:
1214
runs-on: ubuntu-latest
Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Changelog verification
22

3+
permissions:
4+
id-token: write
5+
36
on:
47
pull_request:
58
types: [ opened, synchronize, reopened, labeled, unlabeled ]
@@ -11,16 +14,11 @@ jobs:
1114
changelog-verification:
1215
runs-on: ubuntu-latest
1316
steps:
14-
- uses: actions/checkout@v4
15-
- name: Check for changelog entry
16-
if: ${{ !contains(github.event.pull_request.labels.*.name, 'no-changelog') }}
17-
run: |
18-
git fetch origin ${{ github.base_ref }} --depth 1 && \
19-
git diff remotes/origin/${{ github.base_ref }} --name-only | grep -P "\.changes/[0-9a-f-]+\.json"
20-
- name: Error message
21-
if: ${{ failure() }}
22-
run: |
23-
echo "::error ::No new/updated changelog entry found in /.changes directory. Please either:"
24-
echo "::error ::* Add a changelog entry (see CONTRIBUTING.md for instructions) –or–"
25-
echo "::error ::* Add the 'no-changelog' label to this PR (in rare cases not warranting a changelog entry)"
26-
exit 1
17+
- name: Configure AWS Credentials
18+
uses: aws-actions/configure-aws-credentials@v4
19+
with:
20+
role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }}
21+
aws-region: us-west-2
22+
23+
- name: Verify changelog
24+
uses: awslabs/aws-kotlin-repo-tools/.github/actions/changelog-verification@main

.github/workflows/closed-issue-message.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
name: Closed Issue Message
2+
23
on:
34
issues:
45
types: [closed]
6+
7+
permissions:
8+
issues: write
9+
510
jobs:
611
auto_comment:
712
runs-on: ubuntu-latest

.github/workflows/continuous-integration.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on:
44
pull_request:
55
workflow_dispatch:
66

7+
permissions: { }
8+
79
# Allow one instance of this workflow per pull request, and cancel older runs when new changes are pushed
810
concurrency:
911
group: ci-pr-${{ github.ref }}

.github/workflows/issue-regression-labeler.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: issue-regression-label
33
on:
44
issues:
55
types: [opened, edited]
6+
permissions: { }
67
jobs:
78
add-regression-label:
89
runs-on: ubuntu-latest

.github/workflows/lint.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ on:
1212
- '*-main'
1313
workflow_dispatch:
1414

15+
permissions:
16+
contents: read
17+
1518
env:
1619
PACKAGE_NAME: aws-sdk-kotlin
1720

.github/workflows/merge-main.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,14 @@ on:
44
branches: [ main ]
55
workflow_dispatch:
66

7+
permissions: { }
8+
79
jobs:
810
merge:
911
runs-on: ubuntu-latest
1012
steps:
1113
- name: Merge main
1214
uses: awslabs/aws-kotlin-repo-tools/.github/actions/merge-main@main
1315
with:
16+
ci-user-pat: ${{ secrets.CI_USER_PAT }}
1417
exempt-branches: # Add any if required
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: Release readiness (snapshot dependency)
2+
description: >
3+
Makes sure that we aren't relying on SNAPSHOT/dev versions of smithy-kotlin before merging
4+
otherwise we could forget because the rest of CI is masking it.
5+
6+
on:
7+
pull_request:
8+
types: [ opened, synchronize, reopened, labeled, unlabeled ]
9+
branches: [ main ]
10+
11+
permissions: { }
12+
13+
jobs:
14+
release-readiness:
15+
if: ${{ !contains(github.event.pull_request.labels.*.name, 'ready-for-release') }}
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout SDK
19+
uses: actions/checkout@v4
20+
with:
21+
path: 'aws-sdk-kotlin'
22+
23+
- name: Configure Gradle
24+
uses: awslabs/aws-kotlin-repo-tools/.github/actions/configure-gradle@main
25+
with:
26+
working-directory: ./aws-sdk-kotlin
27+
28+
- name: Build SDK
29+
working-directory: ./aws-sdk-kotlin
30+
run: ./gradlew test jvmTest
31+
32+
- name: Build SDK client
33+
working-directory: ./aws-sdk-kotlin
34+
run: |
35+
./gradlew -Paws.kotlin.native=false -Paws.services=s3 bootstrap
36+
./gradlew -Paws.kotlin.native=false build
37+
38+
- name: Checkout smithy-kotlin
39+
uses: awslabs/aws-kotlin-repo-tools/.github/actions/checkout-head@main
40+
with:
41+
path: 'smithy-kotlin'
42+
repository: 'smithy-lang/smithy-kotlin'
43+
44+
- name: Check for smithy-kotlin unreleased changes
45+
run: |
46+
echo "aws-sdk-kotlin branch: $GITHUB_HEAD_REF"
47+
48+
cd smithy-kotlin
49+
SMITHY_KOTLIN_BRANCH=$(git branch --show-current)
50+
echo "smithy-kotlin branch: $SMITHY_KOTLIN_BRANCH"
51+
52+
if [ "$GITHUB_HEAD_REF" == "$SMITHY_KOTLIN_BRANCH" ]; then
53+
cd ../aws-sdk-kotlin
54+
git fetch origin
55+
56+
DIFF=$(git diff origin/main -- gradle/libs.versions.toml | grep '^[-+][^-+]'; exit 0)
57+
SMITHY_KOTLIN_VERSION_BUMP=$(echo "$DIFF" | grep "smithy-kotlin-runtime-version =\|smithy-kotlin-codegen-version ="; exit 0)
58+
59+
if [ -z "$SMITHY_KOTLIN_VERSION_BUMP" ]; then
60+
echo "::error::Matching smithy-kotlin and aws-sdk-kotlin branches but no smithy-kotlin version bump"
61+
exit 1
62+
else
63+
echo "Matching smithy-kotlin and aws-sdk-kotlin branches with smithy-kotlin version bump detected"
64+
fi
65+
fi
66+
67+
- name: Emit error message
68+
if: ${{ failure() }}
69+
run: |
70+
echo "::error::Did you forget to release smithy-kotlin and bump the dependency version?"
71+
exit 1

0 commit comments

Comments
 (0)