Skip to content

Add support for CircleCI#449

Merged
TheSnoozer merged 2 commits intogit-commit-id:masterfrom
andrebrait:master
Nov 3, 2019
Merged

Add support for CircleCI#449
TheSnoozer merged 2 commits intogit-commit-id:masterfrom
andrebrait:master

Conversation

@andrebrait
Copy link
Copy Markdown
Contributor

Context

This adds support for CircleCI for this plugin. It's useful for getting branch name and revision number when running on CircleCI.

Contributor Checklist

  • [:x:] Added relevant integration or unit tests to verify the changes
  • [:heavy_check_mark:] Update the Readme or any other documentation (including relevant Javadoc)
  • [:heavy_check_mark:] Ensured that tests pass locally: mvn clean package
  • [:heavy_check_mark:] Ensured that the code meets the current checkstyle coding style definition: mvn clean verify -Pcheckstyle -Dmaven.test.skip=true -B

Notes

I couldn't find any tests that tested that sort of thing, hence why I didn't add any.

* @see <a href="https://docs.gitlab.com/ce/ci/variables/predefined_variables.html">GitlabCIVariables</a>
*/
public static boolean isActiveServer(Map<String, String> env) {
return env.containsKey("CI");
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

That's a good one! Thanks for the fix!

@TheSnoozer
Copy link
Copy Markdown
Collaborator

Hello,
thank you for your contribution and sorry for the delay (I was on a vacation).

Changes look good for me and thanks for the env.containsKey("CI") change since I would suspect many other CI environments might use this variable...

@TheSnoozer TheSnoozer merged commit ebb226d into git-commit-id:master Nov 3, 2019
@TheSnoozer TheSnoozer added this to the 4.0.0 milestone Nov 3, 2019
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.

2 participants