CircleCI-Public / orb-tools-orb

Various tools for authoring and publishing CircleCI orbs
https://circleci.com/orbs/registry/orb/circleci/orb-tools
MIT License
50 stars 74 forks source link

Default parameter not used for executor in orb-tools/pack #192

Closed rprince-anduril closed 1 year ago

rprince-anduril commented 1 year ago

Orb version:

11.6.1

What happened:

Error: Error calling job: 'my-test'
Cannot find a definition for executor named TEST_STRING

for job with:

parameters:
  executor:
    description: >
      CCI executor to run tests on
    type: string
    default: my-executor

executor: <<parameters.executor>>

where my-executor is a valid executor, but the default was apparently not used.

Expected behavior:

The default value of a parameter is validated instead of TEST_STRING

Additional Information:

I worked around this by using an enum, but we will likely add additional executors for cosuming projects that I don't want to force an orb update for.

KyleTryon commented 1 year ago

The pack job requires certain tools embedded in the docker image for the job. The pack job does not have a parameterizable executor for this reason. If you are interested in a custom executor, I recommend creating a custom job and using the CircleCI CLI within your custom job. You will need an image with the CLI pre-installed, or install it at run-time.