Run job on remote agent, but only for a specific branch

Hi all.

We have an iOS app project. For production releases we still have to build the app using iPhone SDK 6.0, that means we have to stick with Xcode 4 for a while.

So there's a Bamboo CI running on OSX 10.8 with Xcode 4 installed.
There's a plan that points to GitHub repo, picks up and builds the app, and it is set up to detect branches automatically.

Then we also start wroking on iOS 7 support and there's a separate branch for that (say merge-branch) in GitHub. However, for this branch Xcode 5 is used by developers, and there's a known problem - Interface Builder files are not backwards compatible. If an IB file is saved in Xcode 5, then Xcode 4 will fail to compile it. That means we have to build merge-branch using Xcode 5.

For that purpose I setup another Mac running OSX 10.9 with Xcode 5 installed; and I run a remote agent on that machine.

I know I could have 2 Xcodes installed on one machine then switch between environments, but that isn't really an easy task, afaik.

Now what I want to do is

  • To build master branch on Bamboo server machine (Xcode 4) using one of the local agents
  • To build merge-branch on remote agent (using Xcode 5)

The original plan is split in stages and jobs, like this

  • Build Stage
    • Build Job
  • Resign App Stage
    • Resign Job
  • Publish Build Results Stage
    • Publish Build Results Job
  • Update JIRA Stage
    • Update JIRA Job

So I want to run all the jobs for all branches using local agents, except Build Job for merge-branch, in this case I want to run the job on Remote Agent.

I know I could use custom agent capabilities to delegate the job to a specific agent, but this solution will build all branches on remote agent.

That means I want to configure required job capabilities differently for each branch, and that looks like somethign not possible yet.

What would be the best workaround so far?

I'm thinking to duplicate the whole plan and point it to the specific branch in repo, that in this new plan modify the build job and require custom capability to be sure it's always executed on remote agent; or even configure an agent as dedicated agent for this particular job.

1 answer

This is a very good question. I too would like to dedicate a Bamboo agent to a branch of a build plan.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Renan Battaglin
Published May 18, 2017 in Bamboo

FAQ: How to Upgrade Bamboo Server

Bamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...

1,321 views 0 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you