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

Support build scan link for CircleCI #31

Closed
wants to merge 1 commit into from

Conversation

shakuzen
Copy link
Contributor

Detects running on CircleCI and configures the build scan with a link to the CI build job URL.

private boolean isCircleCi() {
return this.env.containsKey("CIRCLECI");
}

private boolean isConcourse() {
return this.env.containsKey("CI");
Copy link
Contributor Author

Choose a reason for hiding this comment

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

CircleCI also sets an env var CI=true on its builds. I'm not sure if there is a more discerning env var for Concourse. Right now it is not practically an issue since CircleCI is checked before Concourse, but it does feel fragile to potential future changes in this code.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Concourse doesn't expose any environment variables by default. CI is something that we unimaginatively came up with ourselves and configure in our pipeline. We should change it to something more specific.

Copy link
Contributor

Choose a reason for hiding this comment

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

For other CI systems that we support in the Common Custom User Data Gradle plugin, we detect the presence of the URL environment variable like so: https://github.com/gradle/gradle-enterprise-build-config-samples/blob/master/common-custom-user-data-gradle-plugin/src/main/java/com/gradle/CustomBuildScanEnhancements.java#L175

Detects running on CircleCI and configures the build scan with a link to the CI build job URL.
@wilkinsona wilkinsona added this to the 0.0.8 milestone May 20, 2021
@wilkinsona wilkinsona added the type: enhancement A general enhancement label May 20, 2021
wilkinsona pushed a commit that referenced this pull request Jul 21, 2021
Detects running on CircleCI and configures the build scan with a link
to the CI build job URL.

See gh-31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants