-
-
Save TaKO8Ki/8c74bedbf0ddde9b2c0a0e7688446a4c to your computer and use it in GitHub Desktop.
Path filtering example
This file contains 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
version: 2.1 | |
setup: true | |
orbs: | |
path-filtering: circleci/[email protected] | |
workflows: | |
setup-workflow: | |
jobs: | |
- path-filtering/filter: | |
base-revision: main | |
config-path: .circleci/continue-config.yml | |
mapping: | | |
project1/.* project-one true | |
project2/.* project-two true | |
project3/.* project-three true | |
shared-things/.* run-them-all true |
This file contains 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
version: 2.1 | |
executors: | |
base: | |
docker: | |
- image: cimg/base:stable | |
parameters: | |
project-one: | |
type: boolean | |
default: false | |
project-two: | |
type: boolean | |
default: false | |
project-three: | |
type: boolean | |
default: false | |
run-them-all: | |
type: boolean | |
default: false | |
jobs: | |
project_one: | |
executor: base | |
steps: | |
- run: | |
command: | | |
echo "project one" | |
project_two: | |
executor: base | |
steps: | |
- run: | |
command: | | |
echo "project two" | |
project_three: | |
executor: base | |
steps: | |
- run: | |
command: | | |
echo "project three" | |
all_projects: | |
executor: base | |
steps: | |
- run: | |
command: | | |
echo "all" | |
workflows: | |
build-1: | |
when: | |
or: | |
- << pipeline.parameters.project-one >> | |
- << pipeline.parameters.run-them-all >> | |
jobs: | |
- project_one | |
build-2: | |
when: | |
or: | |
- << pipeline.parameters.project-two >> | |
- << pipeline.parameters.run-them-all >> | |
jobs: | |
- project_two | |
build-3: | |
when: | |
or: | |
- << pipeline.parameters.project-three >> | |
- << pipeline.parameters.run-them-all >> | |
jobs: | |
- project_three | |
build-shared-other: | |
when: << pipeline.parameters.run-them-all >> | |
jobs: | |
- all_projects |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment