Hello there!
I’m currently changing our CCI setup to be triggered by a GitHub Action, so that we can exclude system tests from PRs that don’t need them. For this I am using the default GitHub Action from circleCi, and have adapted our config.yml for circle ci to only run when triggered by the action itself.
According to the documentation, I can do this:
workflows:
project_cicd:
when:
and:
- equal: ["default", << pipeline.parameters.target_workflow >>]
- equal: ["cci_system_tests", << pipeline.parameters.GHA_Action >>]
jobs:
- build
- system_test:
requires:
- build
So basically, check if the GHA_action name matches. But this fails, and upon going to the requested URL, it returns a 404 with the following warnings:
{
"id" : "c1ceff62-1ad3-4c65-aed6-7e75eca5bc96",
"errors" : [ {
"type" : "config",
"message" : "ERROR IN CONFIG FILE:"
}, {
"type" : "config",
"message" : "[#/workflows/concretedirect_cicd] only 1 subschema matches out of 2"
}, {
"type" : "config",
"message" : "1. [#/workflows/concretedirect_cicd/when] 0 subschemas matched instead of one"
}, {
"type" : "config",
"message" : "| 1. [#/workflows/concretedirect_cicd/when] no subschema matched out of the total 4 subschemas"
}, {
"type" : "config",
"message" : "| | A boolean or a pipeline parameter evaluating to a boolean"
}, {
"type" : "config",
"message" : "| | 1. [#/workflows/concretedirect_cicd/when] expected type: Boolean, found: Mapping"
}, {
"type" : "config",
"message" : "| | | SCHEMA:"
}, {
"type" : "config",
"message" : "| | | {}"
}, {
"type" : "config",
"message" : "| | | INPUT:"
}, {
"type" : "config",
"message" : "| | | equal:"
}, {
"type" : "config",
"message" : "| | | - default"
}, {
"type" : "config",
"message" : "| | | - << pipeline.parameters.target_workflow >>"
}, {
"type" : "config",
"message" : "| | | not_present:"
}, {
"type" : "config",
"message" : "| | | - default"
}, {
"type" : "config",
"message" : "| | | - << pipeline.parameters.target_workflow >>"
}, {
"type" : "config",
"message" : "| | 2. [#/workflows/concretedirect_cicd/when] expected type: Number, found: Mapping"
}, {
"type" : "config",
"message" : "| | | SCHEMA:"
}, {
"type" : "config",
"message" : "| | | {}"
}, {
"type" : "config",
"message" : "| | | INPUT:"
}, {
"type" : "config",
"message" : "| | | equal:"
}, {
"type" : "config",
"message" : "| | | - default"
}, {
"type" : "config",
"message" : "| | | - << pipeline.parameters.target_workflow >>"
}, {
"type" : "config",
"message" : "| | | not_present:"
}, {
"type" : "config",
"message" : "| | | - default"
}, {
"type" : "config",
"message" : "| | | - << pipeline.parameters.target_workflow >>"
}, {
"type" : "config",
"message" : "| | 3. [#/workflows/concretedirect_cicd/when] expected type: String, found: Mapping"
}, {
"type" : "config",
"message" : "| | | SCHEMA:"
}, {
"type" : "config",
"message" : "| | | {}"
}, {
"type" : "config",
"message" : "| | | INPUT:"
}, {
"type" : "config",
"message" : "| | | equal:"
}, {
"type" : "config",
"message" : "| | | - default"
}, {
"type" : "config",
"message" : "| | | - << pipeline.parameters.target_workflow >>"
}, {
"type" : "config",
"message" : "| | | not_present:"
}, {
"type" : "config",
"message" : "| | | - default"
}, {
"type" : "config",
"message" : "| | | - << pipeline.parameters.target_workflow >>"
}, {
"type" : "config",
"message" : "| | 4. [#/workflows/concretedirect_cicd/when] expected type: String, found: Mapping"
}, {
"type" : "config",
"message" : "| | | SCHEMA:"
}, {
"type" : "config",
"message" : "| | | {}"
}, {
"type" : "config",
"message" : "| | | INPUT:"
}, {
"type" : "config",
"message" : "| | | equal:"
}, {
"type" : "config",
"message" : "| | | - default"
}, {
"type" : "config",
"message" : "| | | - << pipeline.parameters.target_workflow >>"
}, {
"type" : "config",
"message" : "| | | not_present:"
}, {
"type" : "config",
"message" : "| | | - default"
}, {
"type" : "config",
"message" : "| | | - << pipeline.parameters.target_workflow >>"
}, {
"type" : "config",
"message" : "| 2. [#/workflows/concretedirect_cicd/when] 2 schema violations found"
}, {
"type" : "config",
"message" : "| | This is the object that represents the logical/comparison operators"
}, {
"type" : "config",
"message" : "| | 1. [#/workflows/concretedirect_cicd/when] extraneous key [not_present] is not permitted"
}, {
"type" : "config",
"message" : "| | | This is the object that represents the logical/comparison operators"
}, {
"type" : "config",
"message" : "| | | Permitted keys:"
}, {
"type" : "config",
"message" : "| | | - and"
}, {
"type" : "config",
"message" : "| | | - or"
}, {
"type" : "config",
"message" : "| | | - not"
}, {
"type" : "config",
"message" : "| | | - equal"
}, {
"type" : "config",
"message" : "| | | - matches"
}, {
"type" : "config",
"message" : "| | | Passed keys:"
}, {
"type" : "config",
"message" : "| | | - equal"
}, {
"type" : "config",
"message" : "| | | - not_present"
}, {
"type" : "config",
"message" : "| | 2. [#/workflows/concretedirect_cicd/when] maximum size: [1], found: [2]"
}, {
"type" : "config",
"message" : "| | | This is the object that represents the logical/comparison operators"
}, {
"type" : "config",
"message" : "| | | SCHEMA:"
}, {
"type" : "config",
"message" : "| | | maxProperties: 1"
}, {
"type" : "config",
"message" : "| | | INPUT:"
}, {
"type" : "config",
"message" : "| | | equal:"
}, {
"type" : "config",
"message" : "| | | - default"
}, {
"type" : "config",
"message" : "| | | - << pipeline.parameters.target_workflow >>"
}, {
"type" : "config",
"message" : "| | | not_present:"
}, {
"type" : "config",
"message" : "| | | - default"
}, {
"type" : "config",
"message" : "| | | - << pipeline.parameters.target_workflow >>"
}, {
"type" : "config",
"message" : "| 3. [#/workflows/concretedirect_cicd/when/equal] subject must not be valid against schema {\"pattern\":\"^(and|or|not|equal|matches)$\"}"
}, {
"type" : "config",
"message" : "| | SCHEMA:"
}, {
"type" : "config",
"message" : "| | not:"
}, {
"type" : "config",
"message" : "| | pattern: ^(and|or|not|equal|matches)$"
}, {
"type" : "config",
"message" : "| | INPUT:"
}, {
"type" : "config",
"message" : "| | - default"
}, {
"type" : "config",
"message" : "| | - << pipeline.parameters.target_workflow >>"
} ],
I’m not quite understanding how this can happen; nothing of what is returned here is even present in the config.yml file.