I set up a GoCD-Pipeline to build a Docker container, create an artifact from it and push it to a registry. I use the Docker Registry Artifact plugin for this.
Now, what I want to do is:
- create a version number in a task of the pipeline (I do this with gitversion)
- use this version number as tag for the creation of the container artefact
I just can't get this done. I tried to put this version string into en environment variable in the gitversion task, but it seems the environment variable is gone, when the artifact is created (probably because GoCD is creating another independent shell for that).
So, what are the possible workarounds to get this done?