eddiewebb / circleci-queue

CircleCI orb to block/queue jobs to enforce max concurrency limits
MIT License
74 stars 75 forks source link

[Merged by Bors] - Allow job_regex as additional paramter [semver:minor] #78

Closed jonesie100 closed 2 years ago

jonesie100 commented 2 years ago

Checklist

Motivation, issues

I wan to queue multiple jobs with different names. In the case of using CircleCI matrix we cannot change the name that is given to the job. This is a blocker since we have to use matrix and queue/until_front_of_line is not queuing across job names.

Description

Add job-regex paramter. This allows us to use regex to match what jobs you want to queue on

eddiewebb commented 2 years ago

Wicked smart idea!!!

eddiewebb commented 2 years ago

This looks good, i'll need some tests to validate but I understand if your not jumping into BATS and mock API calls.

However, can you update the new variable name in consistent format with the rest ${JOB_NAME} - its a nit but it helps.

functions snake_case and variables ALL_CAPS but with brackets {}.

jonesie100 commented 2 years ago

I updated the variable name respectively. I am not familiar with BATS and the way tests are setup. If you could add those tests for me i would appreciate it. I would give it a shot but i'm not set up to run the tests and I feel like my test wouldn't be up to standards.

Thank you

eddiewebb commented 2 years ago

Yeop no worries @jonesie100 - can you hit this setting and I'll add the approproate tests

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork

jonesie100 commented 2 years ago

The setting is changed. Thank you

eddiewebb commented 2 years ago

bors try

bors[bot] commented 2 years ago

try

Build failed:

eddiewebb commented 2 years ago

not sure why one test is failing locally, trying again

bors try

bors[bot] commented 2 years ago

try

Build failed:

eddiewebb commented 2 years ago

bors merge

Was missing the config file to drive the test 🤦 , should be all set now.

bors[bot] commented 2 years ago

Build failed:

eddiewebb commented 2 years ago

tests passing, issues releasing, bors changes its merge syntax so just moving tonuse pipeline # t publish dev versions.

bors merge

bors[bot] commented 2 years ago

Build failed:

eddiewebb commented 2 years ago

take 297

bors merge

bors[bot] commented 2 years ago

Pull request successfully merged into main.

Build succeeded:

eddiewebb commented 2 years ago

@jonesie100 this is live as 1.7.0 https://circleci.com/developer/orbs/orb/eddiewebb/queue