Commit 34779f7d authored by Adrian Sutton's avatar Adrian Sutton Committed by GitHub

ci: Add param to allow manually running develop-fault-proof task against other branches (#9654)

* ci: Add param to allow manually running develop-fault-proof task against other branches

* ci: Don't run main workflow when manually triggered

* ci: Run main workflow by default when manually triggered but allow it to be disabled
parent 8ea7b4bd
...@@ -7,6 +7,19 @@ parameters: ...@@ -7,6 +7,19 @@ parameters:
base_image: base_image:
type: string type: string
default: default default: default
# The dispatch parameters are used to manually dispatch pipelines that normally only run post-merge on develop
# from the CircleCI UI. Example configuration:
# when:
# or:
# - equal: [ "develop", <<pipeline.git.branch>> ]
# - equal: [ true, <<pipeline.parameters.main_dispatch>> ]
# Add a new `*_dispatch` parameter for any pipeline you want manual dispatch for.
main_dispatch:
type: boolean
default: true # default to running main in case the manual run cancelled an automatic run
fault_proofs_dispatch:
type: boolean
default: false
orbs: orbs:
go: circleci/go@1.8.0 go: circleci/go@1.8.0
...@@ -851,11 +864,6 @@ jobs: ...@@ -851,11 +864,6 @@ jobs:
docker: docker:
- image: <<pipeline.parameters.ci_builder_image>> - image: <<pipeline.parameters.ci_builder_image>>
resource_class: xlarge resource_class: xlarge
# Note: Tests are split between runs manually.
# Tests default to run on the first executor but can be moved to the second with:
# InitParallel(t, UseExecutor(1))
# Any tests assigned to an executor greater than the number available automatically use the last executor.
# Executor indexes start from 0
parallelism: <<parameters.parallelism>> parallelism: <<parameters.parallelism>>
steps: steps:
- checkout - checkout
...@@ -1461,8 +1469,11 @@ jobs: ...@@ -1461,8 +1469,11 @@ jobs:
workflows: workflows:
main: main:
when: when:
not: or:
equal: [ scheduled_pipeline, << pipeline.trigger_source >> ] # Trigger on new commits
- equal: [ webhook, << pipeline.trigger_source >> ]
# Trigger on manual triggers if explicitly requested
- equal: [ true, << pipeline.parameters.main_dispatch >> ]
jobs: jobs:
- pnpm-monorepo: - pnpm-monorepo:
name: pnpm-monorepo name: pnpm-monorepo
...@@ -2011,7 +2022,9 @@ workflows: ...@@ -2011,7 +2022,9 @@ workflows:
develop-fault-proofs: develop-fault-proofs:
when: when:
and: and:
- or:
- equal: [ "develop", <<pipeline.git.branch>> ] - equal: [ "develop", <<pipeline.git.branch>> ]
- equal: [ true, <<pipeline.parameters.fault_proofs_dispatch>> ]
- not: - not:
equal: [ scheduled_pipeline, << pipeline.trigger_source >> ] equal: [ scheduled_pipeline, << pipeline.trigger_source >> ]
jobs: jobs:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment