How to pass executor parameters in cypress orb

Hi, I could not find an example to override default parameter value in executors.
In the below example how can we override the default value for app_env parameter in base10 executor?

version: 2.1
orbs:
  cypress: cypress-io/cypress@1
parameters:
  app_env:
    type: string
    default: 'test'

executors:
  base10:
    parameters:
      app_env:
        type: string
        default: << pipeline.parameters.app_env >>
        description: application environment
    docker:
      - image: 'cypress/base:10'
    environment:
      CYPRESS_app_env: << parameters.app_env >>

The API’s build parameter is overriding only pipeline parameter but not executor parameter.

curl -u ${CIRCLECI_TOKEN}: -X POST --header "Content-Type: application/json" -d '{ 
  "build_parameters": {
    "app_env": "uat" 
  } 
}' https://circleci.com/api/v2/project/gh/etc/etc/pipeline

can anyone please help?

Found the solution, I need to pass parameter to executor like this -

workflows:
  build:
    jobs:
      - cypress/install:
          build: 'npm run build'
          executor: 
            name: base10
            api_server: << pipeline.parameters.app_env >>

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