I’m trying to create an orb with a job to which an executor could be passed using parameters, but I’m getting an “Unexpected executor invocation format” error when running orb validate command.
I was able to achieve what I desired in a different way by passing tag as an executor argument in workflow, however, doing so requires to also specify the executor name in the workflow which I’d like to avoid as I would like default to be used.
I’ve created the following example orb that has the issue I’m facing:
version: 2.1
executors:
php-executor:
parameters:
tag:
type: string
default: latest
docker:
- image: php:<< parameters.tag >>
jobs:
build:
parameters:
executor:
type: executor
default: php-executor
tag:
type: string
default: latest
executor:
name: << parameters.executor >>
tag: << parameters.tag >>
steps:
- checkout
The full error message:
$ circleci orb --skip-update-check validate orb.yml
Error: Error calling job: 'php-test'
Unexpected executor invocation format
The value of `name` must be a string
Examples of correct executor invocation:
executor: string-executor-name
executor: {name: string-executor-name}
executor: << parameters.executor-type-parameter >>