I am working on updating the config on our monorepo using dynamic config and a custom orb based on the existing path-filtering. It works great until I try to trigger the pipeline via curl, I get a Conflicting pipeline parameters
as a response from the continuation API call, which doesn’t happen if I default the same parameter to true
on the config itself. I’ll be sharing a shortened version of my config here
version: 2.1
setup: true
parameters:
run-webshop:
type: boolean
default: false
run-docs:
type: boolean
default: false
force-workflows:
type: boolean
default: false
workflows:
setup:
jobs:
- path-filtering/filter:
force-workflows: << pipeline.parameters.force-workflows >>
mapping: |
^((?!docs/).)*$ run-webshop false
docs/.* run-docs true
orbs:
path-filtering:
orbs:
continuation: circleci/continuation@0.2.0
commands:
set-parameters:
parameters:
force-workflows:
default: false
type: boolean
mapping:
default: ""
type: string
steps:
- run:
command: # very similar to path-filtering that skips filtering if force-workflows is true and set this parameter on json file
environment:
MAPPING: << parameters.mapping >>
OUTPUT_PATH: /tmp/pipeline-parameters.json
FORCE_WORKFLOWS: << parameters.force-workflows >>
name: Set parameters
shell: /usr/bin/env python3
executors:
default:
docker:
- image: cimg/python:3.8
jobs:
filter:
executor: default
parameters:
force-workflows:
default: false
type: boolean
mapping:
default: ""
type: string
resource_class: small
steps:
- checkout
- set-parameters:
mapping: << parameters.mapping >>
force-workflows: << parameters.force-workflows >>
- continuation/continue:
configuration_path: .circleci/continue_config.yml
parameters: /tmp/pipeline-parameters.json
Since the continuation works if force-workflows
is set to true by default and only fails via curl, I’d like to know if there’s something missing in my curl for me to receive this response. Can’t find another issue with the same error message.
curl -X POST --url https://circleci.com/api/v2/project/gh/<Organization>/<repository>/pipeline\
--header "Circle-Token: <token>" \
--header "content-type: application/json" \
--data '{"branch":"'$(git symbolic-ref HEAD 2>/dev/null | cut -d"/" -f 3,4)'","parameters":{"force-workflows":true}}'
Thanks!