Skip to content

Detect CI builds and enable errorprone by default for those CI builds#890

Merged
uschindler merged 3 commits intoapache:mainfrom
uschindler:dev/detect-ci-builds
May 14, 2022
Merged

Detect CI builds and enable errorprone by default for those CI builds#890
uschindler merged 3 commits intoapache:mainfrom
uschindler:dev/detect-ci-builds

Conversation

@uschindler
Copy link
Contributor

This detects CI builds (Github and Jenkins) using existence of some environment variables. There is a new ext property project.ext.isCIBuild.

The ext property is used to enable errorprone on thse builds. You can still enable just errorprone on local builds with: -Perrorprone.enabled=true

We can use the new project property to enable other expensive checks by default for CI builds.

…ally enable it with -Perrorprone.enabled=true
@uschindler uschindler force-pushed the dev/detect-ci-builds branch from 191cc82 to c082464 Compare May 14, 2022 11:09
Copy link
Contributor

@dweiss dweiss left a comment

Choose a reason for hiding this comment

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

LGTM, Uwe.

@uschindler
Copy link
Contributor Author

uschindler commented May 14, 2022

I renamed the project property to "validation.errorprone" to be in line with other optional checks (like owasp).

Maybe we should run owasp checker also automatically in CI mode?

@uschindler uschindler force-pushed the dev/detect-ci-builds branch from aea820d to 36cadf4 Compare May 14, 2022 18:38
@uschindler uschindler self-assigned this May 14, 2022
@uschindler
Copy link
Contributor Author

The owasp check currently fails because of vulns in Jetty. We should upgrade (that's a separate task).

@uschindler uschindler merged commit 7a8071c into apache:main May 14, 2022
@uschindler uschindler deleted the dev/detect-ci-builds branch May 14, 2022 18:49
Copy link
Contributor

@dweiss dweiss left a comment

Choose a reason for hiding this comment

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

Yup, that's nicer (property name).

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