How to use Pipeline Parameter value as context name?

Hi,

I have my config as this. I am trying use pipeline parameter value as context name in workflow definition. is that possible ? It not working for me. And also context with that parameter name already exist in circleci organisation already




version: 2.1
orbs:
  jq: circleci/jq@2.2.0
parameters:
  clientcode:
    type: string
    default: ""
  environment:
    type: string
    default: ""
executors:
  my-executor-terraform:
    docker:
      - image: docker.mirror.hashicorp.services/hashicorp/terraform:light
    working_directory: /home/circleci/workingfiles
  my-executor-createcicontext:
    docker: 
      - image: cimg/base:2022.05      
    working_directory: /home/circleci/workingfiles
jobs:
  
  file-transform:
    executor: my-executor-createcicontext
    steps:
      - checkout
      - jq/install
      - run:
          command: |
            bash ./scripts/abtransform.sh
      - persist_to_workspace:
          root: /home/circleci/workingfiles
          paths:
            - terraform.tfvars.json        


workflows:
  orp-azure-infra-workflow:
    jobs:    
      - file-transform:
         context:
           - Common
           - <<pipeline.parameters.clientcode>>

Please suggest

Its working as intended after having Polling for two min between jobs

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