Parameterization of executor fails to validate in circleci-cli

Hello!

Im trying to create an Orb where I have a few options for executors and you can choose one when running one of the steps:

parameters:
  executor:
    type: string
    default: default
    description: "Execution environment"

executor: <<parameters.executor>>

steps:
  - checkout
  ...

But while trying to build my orb, using the orb-tools orb, I get the following error

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

So I guess something in orb tools is doing some validation that fails?

This is my Circle yaml

version: 2.1

orbs:
  orb-tools: circleci/orb-tools@10.1.0

workflows:
  main_workflow:
    jobs:
      - orb-tools/lint
      - orb-tools/pack
      - orb-tools/publish-dev:
          orb-name: notrealname/orby-mcorbface
          context: orb-publishing
          requires:
            - orb-tools/lint
            - orb-tools/pack
      - orb-tools/dev-promote-prod-from-commit-subject:
          orb-name: notrealname/orby-mcorbface
          context: orb-publishing
          add-pr-comment: false
          fail-if-semver-not-indicated: true
          publish-version-tag: false
          requires:
            - orb-tools/publish-dev

I tracked it down further than orb-tools into the circleci-cli

Finally figured it out. Should be using type:executor not type:string

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.