Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: create release builds that validate on multiple JDKs #148

Merged
merged 13 commits into from
Jul 26, 2021
Merged

Conversation

texastony
Copy link
Contributor

@texastony texastony commented Jun 30, 2021

Issue #, if available: N/A

Description of changes: Test Release and Prod Release will validate a release on 4 different Java SDKs

I highly recommend a Squash and Merge approach.

Final commit message should be: ci: test against multiple JDKs

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Check any applicable:

  • Were any files moved? Moving files changes their URL, which breaks all hyperlinks to the files.

codebuild/release/validate-prod.yml Show resolved Hide resolved
@@ -0,0 +1,87 @@
version: 0.2
# 'release-prod' is an AWS::CodeBuild::Project that Releases from CodeArtifact to Sonatype and then validates the release with 'validate-prod'
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this actually grabbing the jar in CodeArtifact and releasing that through Sonatype? It doesn't look like release-prod depends on any codeartifact token.

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 you are correct. It does not... Which raises the question if it should. I guess not, since previous MCMs do not. Will correct.

mvn verify \
-Pcodeartifact \
-Dcheckstyle.skip \
-Desdk.version=$VERSION \
Copy link
Contributor

@lavaleri lavaleri Jul 6, 2021

Choose a reason for hiding this comment

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

This (sorry, should just be pointing to L26) shouldn't be needed, as we are verifying the examples pom in this same repo, which should already be updated with the version we want to test under.

Maybe this means that in the release codebuild that we should check the examples depends on the expected VERSION? Alternatively we could keep this in and update the examples pom to allow taking in a version like this (see what we do for busy-engineers-guide [1])

[1] https://github.com/aws-samples/busy-engineers-document-bucket/blob/master/exercises/java/encryption-context-complete/pom.xml#L19

codebuild/release/validate-staging.yml Show resolved Hide resolved
pre_build:
commands:
- git checkout $COMMIT_ID
- FOUND_VERSION=$(grep version pom.xml | head -n 2 | sed -n 's/[ \t]*<version>\(.*\)<\/version>/\1/p')
Copy link
Contributor

Choose a reason for hiding this comment

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

So the DDBEC is structured a bit weirdly in that the version we want to actually check is at sdk1/pom.xml

There is a top level pom (it's intention was to de-dupe configuration between sdk1 and sdk2 poms when that was under development. The in progress sdk2 work was ripped out, but the pom structure stayed.), but it never gets packaged itself as a jar and released.

pre_build:
commands:
- git checkout $COMMIT_ID
- FOUND_VERSION=$(grep version pom.xml | head -n 2 | sed -n 's/[ \t]*<version>\(.*\)<\/version>/\1/p')
Copy link
Contributor

@lavaleri lavaleri Jul 6, 2021

Choose a reason for hiding this comment

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

Same here we need to check sdk1/pom.xml

codebuild/release/validate-staging.yml Show resolved Hide resolved
@texastony texastony requested a review from lavaleri July 15, 2021 20:57
- |
mvn deploy \
-Ppublishing \
-Pfast-tests-only \
Copy link
Contributor

Choose a reason for hiding this comment

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

This can be removed. This is a profile that exists in the ESDK that only runs unit tests. DDBEC doesn't have the equivalent profile, so it will just run through all it's unit/integration tests.

lavaleri
lavaleri previously approved these changes Jul 21, 2021
farleyb-amazon
farleyb-amazon previously approved these changes Jul 21, 2021
@texastony texastony dismissed stale reviews from farleyb-amazon and lavaleri via cdf1557 July 21, 2021 04:21
@texastony texastony force-pushed the improve_ci branch 3 times, most recently from 615298c to a0ae62c Compare July 23, 2021 18:42
@texastony
Copy link
Contributor Author

Fudge... I was really hoping that by Forcing the branch back to the valid commit that had been approved, a0ae62c, GitHub would automatically re-apply @farleyb-amazon and @lavaleri approval. I am really surprised it did not...

@texastony texastony merged commit 86d821e into master Jul 26, 2021
@texastony texastony deleted the improve_ci branch July 26, 2021 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants