Skip to content
This repository was archived by the owner on Jan 10, 2023. It is now read-only.

Updates Semaphore CI Service for 2.0#132

Merged
eddiemoore merged 2 commits intocodecov:masterfrom
ChristianJacobsen:master
Jun 6, 2019
Merged

Updates Semaphore CI Service for 2.0#132
eddiemoore merged 2 commits intocodecov:masterfrom
ChristianJacobsen:master

Conversation

@ChristianJacobsen
Copy link
Copy Markdown
Contributor

Semaphore launched their 2.0 on November 6th 2018. The current Semaphore Service is using environment variables no longer present with Semaphore 2.0. I've purposefully removed the build and slug tags from the generated config as there is no good equivalent with Semaphore 2.0 anymore. List of 'git env vars' can be found here.

If the build and/or slug tag is needed, I will find a suitable way of extracting them from the environment variables provided.

Semaphore launched their 2.0 on November 6th 2018. The current Semaphore
Service is using environment variables no longer present with Semaphore
2.0. I've purposefully removed the `build` and `slug` tags from the
generated config as there is no good equivalent with Semaphore 2.0
anymore. List of 'git env vars' can be found at
https://docs.semaphoreci.com/article/12-environment-variables
@codecov
Copy link
Copy Markdown

codecov bot commented Jun 6, 2019

Codecov Report

Merging #132 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #132   +/-   ##
=======================================
  Coverage   89.36%   89.36%           
=======================================
  Files          21       21           
  Lines         329      329           
  Branches       80       80           
=======================================
  Hits          294      294           
  Misses         35       35
Impacted Files Coverage Δ
lib/services/semaphore.js 100% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e98d176...b1eb25f. Read the comment docs.

@eddiemoore
Copy link
Copy Markdown
Collaborator

@ChristianJacobsen Perhaps the SEMAPHORE_JOB_ID would be a good candidate for the build?

@ChristianJacobsen
Copy link
Copy Markdown
Contributor Author

@eddiemoore The SEMAPHORE_JOB_ID will change from, let's say, Install Deps to Lint and Test to Build in a single workflow. 'Jobs' are the steps in a CI process for Semaphore. I think the SEMAPHORE_WORKFLOW_ID could possibly work, as that one is unique per process/run through the pipeline.

@eddiemoore
Copy link
Copy Markdown
Collaborator

Yeah that would probably work.

As requested, the `build` tag has been added back to the config and will
now be read from the `SEMAPHORE_WORKFLOW_ID` as it's unique per 'run
through the CI pipeline'.
@ChristianJacobsen
Copy link
Copy Markdown
Contributor Author

@eddiemoore Think that did the trick! 😄

Copy link
Copy Markdown
Collaborator

@eddiemoore eddiemoore left a comment

Choose a reason for hiding this comment

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

LGTM

@eddiemoore eddiemoore merged commit 6167aa8 into codecov:master Jun 6, 2019
@fabiendem
Copy link
Copy Markdown
Contributor

Hey all, thanks for this change.
What would it take for this to be part of a new release with a new version number (3.6.0 or 3.5.1?). At the moment it's only on master on this repo I think.

Am using Semaphore 2.0 and would benefit from this change 🙏

Am wondering though, this change would break retro-compatibility with Semaphore 1.x no?

@ChristianJacobsen
Copy link
Copy Markdown
Contributor Author

@fabiendem, yes this would break Semaphore 1.x compatibility.
I do believe people have had enough time to transition to Semaphore 2.x though, as it was released late 2018. Optionally we could add Semaphore 1.x back and detect which one to use based on the set ENV vars.

@fabiendem
Copy link
Copy Markdown
Contributor

I gave a go at the retro compat issue, in case this is what's preventing the publication of "Updates Semaphore CI Service for 2.0" #132 on npm

See Add retro-compatibility for Semaphore 1.x and maintain support for 2.x #145

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