-
Notifications
You must be signed in to change notification settings - Fork 4
V3 #17
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
Merged
Merged
V3 #17
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
42c06e8
Intrapipeline Queueing (#16)
promiseofcake a33c5d0
Job, Command, Renames / Recontextulization (#18)
promiseofcake b9763ce
Validate Queue Behavior (#19)
promiseofcake 4466452
feat: update documentation
promiseofcake e131089
Update src/jobs/global-queue.yml
promiseofcake 933a202
Update src/commands/global_block.yml
promiseofcake File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| test-global-queue: | ||
| ./src/scripts/test.sh global-queue.sh | ||
|
|
||
| test-pipeline-queue: | ||
| ./src/scripts/test.sh pipeline-queue.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| description: > | ||
| When used, this command blocks the assigned workflow from running until all previous (global) workflows have completed. | ||
| This ensures only one instance of a given workflow is running at a time across all defined branches. | ||
| parameters: | ||
| debug: | ||
| type: boolean | ||
| default: false | ||
| description: "When enabled, additional debug logging with be output." | ||
| time: | ||
| type: string | ||
| default: "10" | ||
| description: "Number of minutes to wait for a lock before giving up." | ||
| dont-quit: | ||
| type: boolean | ||
| default: false | ||
| description: "If true, forces the job through once time expires instead of failing." | ||
| only-on-branch: | ||
| type: string | ||
| default: "*" | ||
| description: "Only queue on specified branch" | ||
| confidence: | ||
| type: string | ||
| default: "1" | ||
| description: > | ||
| Due to concurrency issues, the number of times should we requery the pipeline list to ensure previous jobs are "pending", | ||
| but not yet active. This number indicates the threshold for API returning no previous pending pipelines. | ||
| Default is `1` confirmation, increase if you see issues. | ||
| ignored-workflows: | ||
| type: string | ||
| default: "" | ||
| description: Comma separated list of workflow names to ignore as blocking workflows for the global queue. | ||
| include-on-hold: | ||
| type: boolean | ||
| default: false | ||
| description: Consider `on-hold` workflows waiting for approval as running and include them in the queue. | ||
|
|
||
| steps: | ||
| - run: | ||
| name: Block execution until the current workflow is at the front of the line | ||
| environment: | ||
| CONFIG_DEBUG_ENABLED: "<< parameters.debug >>" | ||
| CONFIG_TIME: "<< parameters.time >>" | ||
| CONFIG_DONT_QUIT: "<< parameters.dont-quit >>" | ||
| CONFIG_ONLY_ON_BRANCH: "<< parameters.only-on-branch >>" | ||
| CONFIG_CONFIDENCE: "<< parameters.confidence >>" | ||
| CONFIG_IGNORED_WORKFLOWS: "<< parameters.ignored-workflows >>" | ||
| CONFIG_INCLUDE_ON_HOLD: " << parameters.include-on-hold >>" | ||
| command: <<include(scripts/global-queue.sh)>> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| description: > | ||
| This command blocks execution of a workflow within the context of a given pipeline. | ||
|
|
||
| parameters: | ||
| debug: | ||
| type: boolean | ||
| default: false | ||
| description: "When enabled, additional debug logging with be output." | ||
| confidence: | ||
| type: string | ||
| default: "1" | ||
| description: > | ||
| Due to concurrency issues, the number of times should we requery the pipeline list to ensure previous jobs are "pending", | ||
| but not yet active. This number indicates the threshold for API returning no previous pending pipelines. | ||
| Default is `1` confirmation, increase if you see issues. | ||
|
|
||
| steps: | ||
| - run: | ||
| name: Blocking execution until the current workflow is the last to run in the given pipeline. | ||
| environment: | ||
| CONFIG_DEBUG_ENABLED: "<< parameters.debug >>" | ||
| CONFIG_CONFIDENCE: "<< parameters.confidence >>" | ||
| command: <<include(scripts/pipeline-queue.sh)>> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| description: > | ||
| This job ensures only a single defined global workflow is running at a given point in time. | ||
|
|
||
| docker: | ||
| - image: cimg/base:stable | ||
| resource_class: small | ||
|
|
||
| parameters: | ||
| debug: | ||
| type: boolean | ||
| default: false | ||
| description: "When enabled, additional debug logging with be output." | ||
| time: | ||
| type: string | ||
| default: "10" | ||
| description: "Number of minutes to wait for a lock before giving up." | ||
| dont-quit: | ||
| type: boolean | ||
| default: false | ||
| description: "If true, forces the job through once time expires instead of failing." | ||
| only-on-branch: | ||
| type: string | ||
| default: "*" | ||
| description: "Only queue on specified branch" | ||
| confidence: | ||
| type: string | ||
| default: "1" | ||
| description: > | ||
| Due to concurrency issues, the number of times should we requery the pipeline list to ensure previous jobs are "pending", | ||
| but not yet active. This number indicates the threshold for API returning no previous pending pipelines. | ||
| Default is `1` confirmation, increase if you see issues. | ||
| ignored-workflows: | ||
| type: string | ||
| default: "" | ||
| description: Comma separated list of workflow names to ignore as blocking workflows for the global queue. | ||
| include-on-hold: | ||
| type: boolean | ||
| default: false | ||
| description: Consider `on-hold` workflows waiting for approval as running and include them in the queue. | ||
|
|
||
| steps: | ||
| - global_block: | ||
| debug: << parameters.debug >> | ||
| time: << parameters.time >> | ||
| dont-quit: << parameters.dont-quit >> | ||
| only-on-branch: << parameters.only-on-branch >> | ||
| confidence: << parameters.confidence >> | ||
| ignored-workflows: << parameters.ignored-workflows >> | ||
| include-on-hold: << parameters.include-on-hold >> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| description: > | ||
| This job prevents a workflow within a given pipeline from running until all previous workflows have completed. | ||
|
|
||
| docker: | ||
| - image: cimg/base:stable | ||
| resource_class: small | ||
|
|
||
| parameters: | ||
| debug: | ||
| type: boolean | ||
| default: false | ||
| description: "If enabled, DEBUG messages will be logged." | ||
| confidence: | ||
| type: string | ||
| default: "1" | ||
| description: > | ||
| Due to concurrency issues, how many times should we requery the pipeline list to ensure previous jobs are "pending", | ||
| but not yet active. This number indicates the threshold for API returning no previous pending pipelines. | ||
| Default is one confirmation, increase if you see issues. | ||
|
|
||
| steps: | ||
| - pipeline_block: | ||
| debug: <<parameters.debug>> | ||
| confidence: <<parameters.confidence>> |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.