diff --git a/.circleci/test-deploy.yml b/.circleci/test-deploy.yml index cab7350..eaa147e 100644 --- a/.circleci/test-deploy.yml +++ b/.circleci/test-deploy.yml @@ -16,6 +16,7 @@ jobs: - path-filtering/set-parameters: mapping: | src/.* test-changes true + src/examples/.* string-example "value" - path-filtering/set-parameters: config-path: ".circleci/test-deploy.yml" mapping: | diff --git a/src/commands/set-parameters.yml b/src/commands/set-parameters.yml index 43b7eb4..9481431 100644 --- a/src/commands/set-parameters.yml +++ b/src/commands/set-parameters.yml @@ -1,6 +1,6 @@ description: > Generates a set of pipeline parameters from `mapping` at - `output-path`. + `output-path`. Python is required to run this command. parameters: base-revision: @@ -16,6 +16,7 @@ parameters: Mapping of path regular expressions to pipeline parameters and values. One mapping per line, whitespace-delimited. If duplicate parameter keys are found, the last matching pattern will apply. + String values must be double-quoted. output-path: type: string default: "/tmp/pipeline-parameters.json" diff --git a/src/examples/example.yml b/src/examples/path_filtering.yml similarity index 92% rename from src/examples/example.yml rename to src/examples/path_filtering.yml index 9f96d06..9cd1c9c 100755 --- a/src/examples/example.yml +++ b/src/examples/path_filtering.yml @@ -5,7 +5,7 @@ usage: version: 2.1 setup: true orbs: - path-filtering: circleci/path-filtering@0.0.1 + path-filtering: circleci/path-filtering@0.1.7 workflows: generate-config: jobs: @@ -15,6 +15,7 @@ usage: mapping: | src/.* build-code true doc/.* build-docs true + src/tests/.* string-parameter "value" - path-filtering/filter: base-revision: main # This config-path file will only be used to continue the Pipeline if none of the changes diff --git a/src/jobs/filter.yml b/src/jobs/filter.yml index ef654bf..7d478e9 100644 --- a/src/jobs/filter.yml +++ b/src/jobs/filter.yml @@ -29,7 +29,7 @@ parameters: description: > Mapping of path regular expressions to pipeline parameters and values. If the value is a file, then it will be loaded from the disk. - One mapping per line, whitespace-delimited. + One mapping per line, whitespace-delimited. String values must be double-quoted. config-path: type: string default: ".circleci/continue_config.yml"