Skip to content
This repository was archived by the owner on Jul 19, 2025. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants