Skip to content

Commit

Permalink
Add continuation (#6)
Browse files Browse the repository at this point in the history
* Add continuation

* Fix parameter name

* Fix typo

* Update continuation config
  • Loading branch information
bufferings authored Jul 20, 2022
1 parent 6b56ac6 commit edb6e2e
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/@orb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ description: >
display:
home_url: https://github.com/bufferings/orb-split-config
source_url: https://github.com/bufferings/orb-split-config

orbs:
continuation: circleci/[email protected]
26 changes: 26 additions & 0 deletions src/jobs/generate-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,25 @@ parameters:
description: >
A file path for the generated config file.
continuation:
type: boolean
default: true
description: >
Whether to continue the execution with the generated config or not.
continuation-circleci_domain:
type: string
default: circleci.com
description: >
The domain of the CircleCI installation - defaults to circleci.com.
(Only necessary for CircleCI Server users)
continuation-parameters:
type: string
default: "{}"
description: >
The parameters used for the pipeline. This can either be a JSON object containing
parameters or a path to a file containing a JSON object with parameters
steps:
- checkout
- when:
Expand All @@ -44,3 +63,10 @@ steps:
- generate-config:
config-list-path: << parameters.config-list-path >>
generated-config-path: << parameters.generated-config-path >>
- when:
condition: << parameters.continuation >>
steps:
- continuation/continue:
configuration_path: << parameters.generated-config-path >>
circleci_domain: << parameters.continuation-circleci_domain >>
parameters: << parameters.continuation-parameters >>

0 comments on commit edb6e2e

Please sign in to comment.