NOTE: this is not a BUG report, but just to clarify the behaviour of specific commands.
Meta:
CircleCI CLI Version:
$ circleci version
0.1.23489+901243e (homebrew)
Operating System:
Mac M1 (Ventura)
CircleCI CLI Diagnostic:
$ circleci diagnostic
---
CircleCI CLI Diagnostics
---
Debugger mode: false
Config found: /Users/kelvin/.circleci/cli.yml
API host: https://circleci.com
API endpoint: graphql-unstable
OK, got a token.
Trying an introspection query on API...
Ok.
Hello, Kelvin Tay.
Current behavior:
I'd like to just confirm/clarify, if both circleci config validate and circleci orb validate will validate steps even if the job steps is not supposed to run (e.g, condition: false).
Given the following file contents:
# .circleci/config.yml
version: 2.1
orbs:
jira: circleci/jira@1.3.1
jobs:
build:
parallelism: 25
docker:
- image: cimg/base:current
resource_class: small
steps:
- when:
# NOTE: condition set to false, so the steps below would never run effectively
condition: false
steps:
- jira/notify:
# jira/notify only accepts certain values for environment_type, and "invalid" is not allowed
environment_type: invalid
I think this is expected behaviour;
I believe the validation will check ALL steps, even if the condition may evaluate to false.
I am trying to confirm if this is the case, on behalf of a customer :)
When did this begin / Was this previously working?:
Hey @kelvintaywl , I just got confirmation that steps are checked for any condition value. I close the issue but don't hesitate if you have any other question
NOTE: this is not a BUG report, but just to clarify the behaviour of specific commands.
Meta:
CircleCI CLI Version:
Operating System:
Mac M1 (Ventura)
CircleCI CLI Diagnostic:
Current behavior:
I'd like to just confirm/clarify, if both
circleci config validate
andcircleci orb validate
will validate steps even if the job steps is not supposed to run (e.g,condition: false
).Given the following file contents:
When we run validation checks:
The same can be seen for orb configs:
When running validation checks:
Expected behavior:
I think this is expected behaviour; I believe the validation will check ALL steps, even if the condition may evaluate to false. I am trying to confirm if this is the case, on behalf of a customer :)
When did this begin / Was this previously working?:
Additional Information: