Environment Variable not being set

Hello,

Code:

machine: pre: - curl -sSL https://s3.amazonaws.com/circle-downloads/install-circleci-docker.sh | bash -s -- 1.10.0 services: - docker environment: IMAGE_VERSION: $(git describe --abbrev=0 --tags)

When using the variable in test and deployment I can not get its value.
I have tried a string and that works with no problem.

when is the repo pulled down? during which stage?

checkout: Which I think runs after machine:

Probably echo’ing that into .circlerc as part of checkout: post: would work better.

Make sure you append it though, overwriting that file will completely break your build.

Thanks, that did the trick.

1 Like