I have a plan that consists of two jobs, the first running on Linux, the second on Windows. The second job needs the artifact created by the first job.
Right now my Windows job has 3 tasks: remove all files ("del *.tar.gz"), download the artifact, then a script do its real work. I would like to combine those into 1 script task (because I have dozens of plans like these, and I'm tired of maintaining them all separately in Bamboo). That means I need to somehow grab the artifact in my script.
Is there a way to do this? Can a URL for the artifact be passed to the script or something?
Failing that, perhaps I can keep the artifact-download task in Bamboo, and then my script can delete all files except that artifact, but that requires knowing what that artifact file is called, something I'm not seeing a variable for.
Another solution would be to click the "Clean working directory after each build" box for this stage, but I don't like that because I often have to go look at the directory after a failed build and figure out what went wrong. I wish there were a "Clean working directory before each build" option.
I'm running Bamboo version 5.12.2 build 51212, if there's something in a more recent version of Bamboo that would help, we're open to upgrading.