Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
6 changes: 6 additions & 0 deletions .changes/next-release/removal-AWSSDKforJavav2-c58118f.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"type": "removal",
Comment thread
davidh44 marked this conversation as resolved.
Outdated
"category": "AWS SDK for Java v2",
"contributor": "",
"description": "Separate migration tests from normal builds"
}
14 changes: 14 additions & 0 deletions .github/workflows/codebuild-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
18 changes: 18 additions & 0 deletions buildspecs/migration-test.yml
Original file line number Diff line number Diff line change
@@ -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/**/*'
2 changes: 2 additions & 0 deletions buildspecs/resources/ci.cloudformation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
16 changes: 16 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@
<s3accessgrants.version>2.1.0</s3accessgrants.version>

<skip.unit.tests>${skipTests}</skip.unit.tests>
<v2.migration.tests.skip>true</v2.migration.tests.skip>
<integTestSourceDirectory>${project.basedir}/src/it/java</integTestSourceDirectory>
<javadoc.resourcesDir>${session.executionRootDirectory}</javadoc.resourcesDir>
<scm.github.url>https://github.com/aws/aws-sdk-java-v2</scm.github.url>
Expand Down Expand Up @@ -827,6 +828,21 @@
</properties>
</profile>

<profile>
<id>migration-tests</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<properties>
<v2.migration.tests.skip>false</v2.migration.tests.skip>
<checkstyle.skip>true</checkstyle.skip>
<spotbugs.skip>true</spotbugs.skip>
<mdep.analyze.skip>true</mdep.analyze.skip>
<japicmp.skip>true</japicmp.skip>
<javadoc.skip>true</javadoc.skip>
</properties>
</profile>

<profile>
<id>integration-tests</id>
<activation>
Expand Down
11 changes: 11 additions & 0 deletions test/v2-migration-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,17 @@
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<!-- Separate Codebuild for migration tests -->
<skipTests>${v2.migration.tests.skip}</skipTests>
<!-- Sets the VM argument line used when migration tests are run. -->
<argLine>${argLine}</argLine>
<trimStackTrace>false</trimStackTrace>
<rerunFailingTestsCount>2</rerunFailingTestsCount>
</configuration>
</plugin>
</plugins>
</build>

Expand Down