I am trying to only trigger the workflow if jobs.json file has changed
Here is my config with path filtering orb. Taken pretty much verbatim from an example.
version: 2.1
# this allows you to use CircleCI's dynamic configuration feature
setup: true
# the path-filtering orb is required to continue a pipeline based on
# the path of an updated fileset
orbs:
path-filtering: circleci/path-filtering@0.1.0
workflows:
# the setup workflow is always triggered, regardless of the pipeline parameters.
setup:
jobs:
# the path-filtering/filter job determines which pipeline
# parameters to update.
- path-filtering/filter:
name: check-updated-files
# 3-column, whitespace-delimited mapping. One mapping per
# line:
# <regex path-to-test> <parameter-to-set> <value-of-pipeline-parameter>
mapping: |
jobs.json run-build true
base-revision: << pipeline.git.branch >>
# this is the path of the configuration we should trigger once
# path filtering and pipeline parameter value updates are
# complete. In this case, we are using the parent dynamic
# configuration itself.
config-path: .circleci/continue_config.yml
It seems to work fine. Here’s what I see in the log. It does pick up the next configuration and parameter does seem to be set properly.
{
"continuation-key": "************************************************************************************************************************************************************************************************************************************************************************************************************************",
"configuration": "version: 2.1\n\norbs:\n path-filtering: circleci/path-filtering@0.1.0\n aws-ecr: circleci/aws-ecr@7.2.0\n aws-cli: circleci/aws-cli@2.0.3\n\nparameters:\n run-build:\n type: boolean\n default: false\n\njobs:\n [redacted]",
"parameters": {
"run-build": true
}
}
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 3196 100 16 100 3180 313 62352 --:--:-- --:--:-- --:--:-- 62666
{"message":"OK"}
CircleCI received exit code 0
The problem is that nothing happens afterwards. No other workflows run. It should be triggering workflows (which work fine without this setup step) but it does not.
What am I doing wrong?
Thank you!