Pass cut string into environment variable?

116 views Asked by At

I'm trying to cut my git tag and pass this as an environment variable so other parts of my circle ci build know which directory to look at. How do I go about doing this?

  run-terraform:
    docker:
      - image: cimg/python:3.8.6-node
    environment:
      DEPLOY_STAGE: <<pipeline.git.tag>> | cut -f1 -d'/'
some-step:
    steps:
      - run:
          name: "Do thing."
          command: |
            do thing --arg $DEPLOY_STAGE-rest-of-string

Is this possible?

1

There are 1 answers

0
yaningo On

I'm pretty sure this is not possible.

But what you could do is implement a "setup workflow" to set the value of a pipeline parameter declared in the "continuation" workflow.