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 support for Semaphore 2.0 #92

Merged
merged 1 commit into from
Aug 23, 2019
Merged

Add support for Semaphore 2.0 #92

merged 1 commit into from
Aug 23, 2019

Conversation

toastercup
Copy link
Contributor

This adds support for the new count/index environment variables used in Semaphore 2.0's jobs (previously, "threads"), per https://docs.semaphoreci.com/article/50-pipeline-yaml#parallelism

@ArturT I've left CHANGELOG.md untouched - let me know if you'd like me to append to it prior to merge, or if that's something you'd rather handle.

Thanks!

@ArturT
Copy link
Member

ArturT commented Aug 22, 2019

Thanks @toastercup for PR. It looks good. I will take care of changelog.

I will have to update also KnapsackPro/knapsack_pro-ruby#77 as back then when I added support for Semaphore CI 2.0 the SEMAPHORE_JOB_COUNT and SEMAPHORE_JOB_INDEX were not available.

I will try to merge this PR soon.

@ArturT
Copy link
Member

ArturT commented Aug 22, 2019

BTW this is something you may find interesting how to split tests in a dynamic way with Queue Mode in knapsack_pro gem on Semaphore 2.0
https://docs.knapsackpro.com/2019/run-parallel-jobs-on-semaphore-ci-2-0-to-get-faster-ci-build-time

There is also example of how to use it with CodeClimate
https://docs.knapsackpro.com/2019/how-to-merge-codeclimate-reports-for-parallel-jobs-ci-nodes

@toastercup
Copy link
Contributor Author

@ArturT That's quite nifty - thank you!

@ArturT ArturT merged commit c30f4bf into KnapsackPro:master Aug 23, 2019
@ArturT
Copy link
Member

ArturT commented Aug 23, 2019

I've released a new version of knapsack 1.18.0. :)

@ArturT
Copy link
Member

ArturT commented Aug 23, 2019

I also updated each client for Knapsack Pro to support Semaphore 2.0 parallelism property and ENVs.
https://docs.knapsackpro.com/integration/

All examples for Ruby & JS were updated in article https://docs.knapsackpro.com/2019/run-parallel-jobs-on-semaphore-ci-2-0-to-get-faster-ci-build-time

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.

None yet

2 participants