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?
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.