Set artifacts:name during script execution
It would be great if one could set the artifacts:name in the build script, i.e. by setting an environment variable and using that in the artifacts:name field, since the supplied predefined variables don't always cover exactly what I want.
I tried to do this on a windows cmd runner
script:
- for /f %%i in ('git describe --tags') do set GIT_DESC=%%i
artifacts:
name: Build_%GIT_DESC%
paths:
- somepath
and also tried putting it in after_script
script:
- do stuff
artifacts:
name: Build_%GIT_DESC%
paths:
- somepath
after_script:
- for /f %%i in ('git describe --tags') do set GIT_DESC=%%i
In both cases the variable is set correctly (as proved with set GIT_DESC), but the archive name is always Build_.zip.
Edited by Jason Yavorsky