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

Add maven option in build specs #3591

Merged
merged 1 commit into from
Dec 7, 2022
Merged

Conversation

joviegas
Copy link
Contributor

@joviegas joviegas commented Dec 6, 2022

Motivation and Context

  • Maven options are used from codebuild environment variable

Modifications

  • Add retry to
  • Integ test, Stability test and jdk8 builds.
  • Will add it to others if the retry mechanism works.

Testing

  • Ran check builds with these options

@joviegas joviegas requested a review from a team as a code owner December 6, 2022 01:16
@sonarcloud
Copy link

sonarcloud bot commented Dec 6, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@@ -7,9 +7,10 @@ phases:

build:
commands:
- mvn clean install -T1C
- mvn clean install -T1C $MAVEN_OPTIONS
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we specify MAVEN_OPTIONS as environment variable in this file?

Copy link
Contributor Author

@joviegas joviegas Dec 6, 2022

Choose a reason for hiding this comment

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

Not required , the codebuild will automatically fill-in for $MAVEN_OPTIONS from the Codebuild Environment Variables options defined for that build, if it doesnot exist then it put it as empty.
That way all the other codebuilds like checkbuilds or other non release builds will not fail even if the environment variable doesnot exist.
I have verified by observing the echo $MAVEN_OPTIONS at the end of the checksbuilds

Copy link
Contributor

Choose a reason for hiding this comment

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

Should we make it explicit though so that it's easier to troubleshoot? For instance, I'm not sure where we define maven options currently if we need to change it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The Maven options are defined in the CDK for the builds for which its currently supported.
That we keep centralized place where the option can be changed.
Also by providing this option we can give Start Build with Overrides and change the Env Variable in Codebuild without editing the buildspecs.

@joviegas joviegas merged commit df4fa6d into master Dec 7, 2022
@joviegas joviegas deleted the joviegas/maven_retry_option branch December 20, 2022 00:38
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.

None yet

2 participants