From 429ce15b6fc3e3042acca0b665f8a81225a0462e Mon Sep 17 00:00:00 2001 From: hdavidh Date: Thu, 8 May 2025 10:18:14 -0700 Subject: [PATCH 1/2] Separate migration tests from regular builds --- .../removal-AWSSDKforJavav2-c58118f.json | 6 ++++++ .github/workflows/codebuild-ci.yml | 14 ++++++++++++++ buildspecs/migration-test.yml | 18 ++++++++++++++++++ buildspecs/resources/ci.cloudformation.yml | 2 ++ pom.xml | 16 ++++++++++++++++ test/v2-migration-tests/pom.xml | 11 +++++++++++ 6 files changed, 67 insertions(+) create mode 100644 .changes/next-release/removal-AWSSDKforJavav2-c58118f.json create mode 100644 buildspecs/migration-test.yml diff --git a/.changes/next-release/removal-AWSSDKforJavav2-c58118f.json b/.changes/next-release/removal-AWSSDKforJavav2-c58118f.json new file mode 100644 index 000000000000..a1e3dd2970ab --- /dev/null +++ b/.changes/next-release/removal-AWSSDKforJavav2-c58118f.json @@ -0,0 +1,6 @@ +{ + "type": "removal", + "category": "AWS SDK for Java v2", + "contributor": "", + "description": "Separate migration tests from normal builds" +} diff --git a/.github/workflows/codebuild-ci.yml b/.github/workflows/codebuild-ci.yml index c99c8eae844f..749c2762b885 100644 --- a/.github/workflows/codebuild-ci.yml +++ b/.github/workflows/codebuild-ci.yml @@ -139,3 +139,17 @@ jobs: uses: aws-actions/aws-codebuild-run-build@v1 with: project-name: aws-sdk-java-v2-endpoints-test + migration-tests: + if: github.repository == 'aws/aws-sdk-java-v2' + runs-on: ubuntu-latest + steps: + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v1 + with: + role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }} + aws-region: us-west-2 + role-duration-seconds: 7200 + - name: Run migration test + uses: aws-actions/aws-codebuild-run-build@v1 + with: + project-name: aws-sdk-java-v2-migration-test diff --git a/buildspecs/migration-test.yml b/buildspecs/migration-test.yml new file mode 100644 index 000000000000..504cf4c1d074 --- /dev/null +++ b/buildspecs/migration-test.yml @@ -0,0 +1,18 @@ +version: 0.2 + +phases: + install: + runtime-versions: + java: "$JAVA_RUNTIME" + + build: + commands: + - mvn clean install -pl :v2-migration-tests,:bom-internal -am -P quick $MAVEN_OPTIONS + - mvn install -pl :v2-migration-tests -P migration-tests -T2C $MAVEN_OPTIONS + finally: + - mkdir -p codebuild-test-reports + - find ./ -name 'TEST-*.xml' -type f -exec cp {} codebuild-test-reports/ \; +reports: + IntegTests: + files: + - 'codebuild-test-reports/**/*' diff --git a/buildspecs/resources/ci.cloudformation.yml b/buildspecs/resources/ci.cloudformation.yml index 02adcf3a24c4..b1d978768b83 100644 --- a/buildspecs/resources/ci.cloudformation.yml +++ b/buildspecs/resources/ci.cloudformation.yml @@ -57,6 +57,7 @@ Resources: - !Sub arn:aws:codebuild:${ AWS::Region }:${ AWS::AccountId }:project/aws-sdk-java-v2-native-image-test - !Sub arn:aws:codebuild:${ AWS::Region }:${ AWS::AccountId }:project/aws-sdk-java-v2-sonar - !Sub arn:aws:codebuild:${ AWS::Region }:${ AWS::AccountId }:project/aws-sdk-java-v2-endpoints-test + - !Sub arn:aws:codebuild:${ AWS::Region }:${ AWS::AccountId }:project/aws-sdk-java-v2-migration-test - Effect: Allow Action: - logs:GetLogEvents @@ -69,6 +70,7 @@ Resources: - !Sub arn:aws:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/codebuild/aws-sdk-java-v2-native-image-test:* - !Sub arn:aws:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/codebuild/aws-sdk-java-v2-sonar:* - !Sub arn:aws:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/codebuild/aws-sdk-java-v2-endpoints-test:* + - !Sub arn:aws:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/codebuild/aws-sdk-java-v2-migration-test:* GithubOidc: Type: AWS::IAM::OIDCProvider diff --git a/pom.xml b/pom.xml index e33e7b823edd..87fb26060722 100644 --- a/pom.xml +++ b/pom.xml @@ -191,6 +191,7 @@ 2.1.0 ${skipTests} + true ${project.basedir}/src/it/java ${session.executionRootDirectory} https://github.com/aws/aws-sdk-java-v2 @@ -827,6 +828,21 @@ + + migration-tests + + false + + + false + true + true + true + true + true + + + integration-tests diff --git a/test/v2-migration-tests/pom.xml b/test/v2-migration-tests/pom.xml index 1d20e80d819b..74f2a3831e44 100644 --- a/test/v2-migration-tests/pom.xml +++ b/test/v2-migration-tests/pom.xml @@ -163,6 +163,17 @@ true + + maven-surefire-plugin + + + ${v2.migration.tests.skip} + + ${argLine} + false + 2 + + From db9916b0631f13350dee17f0c3f618f19aac4f63 Mon Sep 17 00:00:00 2001 From: David Ho <70000000+davidh44@users.noreply.github.com> Date: Thu, 8 May 2025 16:11:47 -0700 Subject: [PATCH 2/2] Remove changelog --- .changes/next-release/removal-AWSSDKforJavav2-c58118f.json | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 .changes/next-release/removal-AWSSDKforJavav2-c58118f.json diff --git a/.changes/next-release/removal-AWSSDKforJavav2-c58118f.json b/.changes/next-release/removal-AWSSDKforJavav2-c58118f.json deleted file mode 100644 index a1e3dd2970ab..000000000000 --- a/.changes/next-release/removal-AWSSDKforJavav2-c58118f.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "type": "removal", - "category": "AWS SDK for Java v2", - "contributor": "", - "description": "Separate migration tests from normal builds" -}