Skip to content

Document artifacts expansion behavior

Artifacts expansion is a bit weird and it's not really easily visible what variables and how they are expanded. From #29367 (comment 1344728478):

From my testing with versions throughout 15.5 - 15.10 the behavior of artifacts expansion is that

  • Variables exported through the script step. were never expanded in artifacts paths
  • As of the latest versions we expand CI variables in artifacts paths with the bash expansion syntax, e.g. $VARIABLE or ${VARIABLE}, that's regardless of OS, shell or whatever else, which brings confusion.
  • In the past (before 15.5) we used to expand using the job's shell, so even in Windows CMD the %VARIABLE% syntax would work in artifacts paths.

This behavior must be documented to stop the confusion which I initially also felt, even though I was a part of most of the MRs related to these changes one way or another.