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 Semaphore 2.0 Support #473

Merged
merged 1 commit into from
Aug 10, 2021
Merged

Add Semaphore 2.0 Support #473

merged 1 commit into from
Aug 10, 2021

Conversation

thewatts
Copy link
Contributor

@thewatts thewatts commented Aug 3, 2021

This adds support for Semaphore’s internal ENV vars used for specifying the current git branch and git sha.

To note: In the instance of a PR, the SEMAPHORE_GIT_PR_BRANCH variable has the expected branch name, whereas if code is being run against a branch directly (ie: main), SEMAPHORE_GIT_BRANCH is where it can be found.

Given how the findVar code works - SEMAPHORE_GIT_BRANCH will function as a fallback for SEMAPHORE_GIT_PR_BRANCH.

This adds support for [Semaphore’s internal ENV vars](http://ttps://docs.semaphoreci.com/ci-cd-environment/environment-variables/) used for specifying the current git branch and git sha.

To note: In the instance of a PR,  the `SEMAPHORE_GIT_PR_BRANCH` variable has the expected branch name, whereas if code is being run against a branch directly (ie: `main`), `SEMAPHORE_GIT_BRANCH` is where it can be found.

Given how the `findVar` code works - `SEMAPHORE_GIT_BRANCH` will function as a fallback for `SEMAPHORE_GIT_PR_BRANCH`.
@CLAassistant
Copy link

CLAassistant commented Aug 3, 2021

CLA assistant check
All committers have signed the CLA.

@f-moya f-moya self-requested a review August 10, 2021 19:01
@f-moya f-moya merged commit b2fe8e1 into codeclimate:master Aug 10, 2021
@f-moya
Copy link
Contributor

f-moya commented Aug 10, 2021

@thewatts released ! 👏🏼

@thewatts
Copy link
Contributor Author

Thank you!!!

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