My environment:
I have a build with multiple stages. Only the first stage requires the source repository (it does the build). After that artifacts are used to share the build output with the other stages.
My assumptions/understanding:
1. If a source repository is specified (i.e. Use Plan's Repository) then it will check out all the source.
2. Without a source repository the revision number variable isn't set (${bamboo.repository.revision.number})
My problem:
In my final stage I want to copy the artifact files to a folder that has the revision number in its name. However to use the revision number I seem to need to have the repository set, which then checks out the source, even though I don't need it.
My thoughts/questions:
Is there some way the revision is accessible across the whole plan?
Is it possible to specify a repository without it being checked out?
I took the approach suggested by Renjith V [NSN], and after a bit of tinkering with powershell was able to use the contents of a file from stage 1 as arguments in stage 3.
You should be able to artifact in the first stage itself using the version number also and then in the third stage copy the artifact from 1st stage to 3rd stage. Feasible?
http://confluence.atlassian.com/display/BAMBOO/Configuring+Artifact+Sharing+between+Jobs
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Oh! Guess that may not be directly possible, but I am not sure. A simple workaround will be to touch a file with the version number in stage 1, make that an artifact and pass that artifact to stage 3, and it will contain the version number.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is what I am doing and it is working as far as making the artifacts available in stage 3.
However what I want to do in stage 3 is use the version number as a variable in a command task, and at the moment doing so results in dummyVcsKey. The reason I do this in stage 3 is I only want to run the command if the tests (stage 2) have succeeded.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can't put it into a variable. But, if you use a script task instead of a command task, you can pretty easily read the artifact content into a script variable (well, at least on Unix) and pass it to a command you want to run.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
But without getting the repository checked out how are you able to get the artifact files, are they not dependent on the files coming from the source files?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I only need repository checked out for the first stage, but these tasks are in the third stage where they use the artifact generated by the first stage.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.