Hi,
I'm automating the build of an android application with bamboo and I have trouble archiving the resulting .apk-files in a webserver directory.
The code is hosted in a bitbucket git repository with multiple branches which bamboo recognizes and builds different apks for each branch.
Once the build is complete the apk file should be copied to a webserver directory, so I added a script task with the following content:
dir="/var/www/android/${bamboo.repository.git.branch}/" mkdir -p $dir cp bin/appname.apk $dir/appname_b${bamboo.buildNumber}.apk
The result for build 45 in the branch "foo" should be a file in
/var/www/android/foo/appname_b45.apk
The problem is, that the file is copied to the same folder for all branches:
/var/www/android/master/appname_b45.apk
i.e. the variable pointing to the branch is always master and I would assume it should be foo in this case?
I stripped my configuration to the minimum:
Thanks,
Kai
The answer is:
a) Don't use bamboo.repository.git if you are using bitbucket
b) use bamboo.repository.branch.name if you are using version 4.4.5
No problem. Glad to hear that you've resolved the issue. :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
thanks for the reply.
I checked all the information and realized it was due to me not using git directly, but via bitbuchet which apparently does not set the git-variables although it's using git ;-)
However I found bamboo.repository.branch.name which is working in my 4.4.5 version so sorry for your time ;-)
Regards,
Kai
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kai,
Can you tell something more about your setup? I'm particularly interested in:
* your plan->configuration->repository configuration (how is your 'default' repository configured - can you for example attach screenshot here of that configuration?)
* how is your plan-branch configured - can you tell me if you're using some Bamboo built-in 'merging' strategy like Gatekeeper or Updater?
* how is repository override configured in your plan-branch (foo)? (branch->configuration->repository settings) - can you attach a screenshot here?
I think that {bamboo.repository.git.branch} should work for your case, but I'm worried that some corner-case kicks in and overrides the branch name with the plan's default repository settings. Above informations could shed some light on that hyphothesis. Oh, and BTW: which Bamboo version are you running?
regards,
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.