I am trying to check whether I can run Continua CI on azure with build agents that are automatically started when a build needs to be started and stopped as soon as it is ready. For now my idea is to create 2 agents:
I use the cheapest option for the virtual machine running Continua CI, now named SERVER.
1) Build agent (BA1) on the SERVER which will have the only task to run a simple script. Each build will have a StartBuildAgent and StopBuildAgent task, so this workflow will exist:
StartBuildAgent => Initialize => Build => Test => Package => Deploy => StopBuildAgent
2) Build agent 2 (BA2) will be compatible with the rest of the stuff so Continua CI will automatically dispatch to the right agent to execute the following tasks:
Initialize => Build => Test => Package => Deploy
I want to implement the shutdown so I can get a faster machine that I only run when really needed to make sure the costs aren’t rising too fast. However… when a build fails, the build server won’t shut down because it will not get to the StopBuildAgent task.
What I need (and I have requested the same for github status updates) in an ideal situation are 3 events:
1) Build start request
2) Build success
3) Build error
No matter if I use the Stop build action or any other reason that a build has stopped, I need to know so I can shut down the build server. It would be even better if Continua CI would contain events like:
BuildAgentRequired => I can start azure here
BuildAgentDone => I can stop azure here
In this way, Continua CI knows if more builds are queued and can keep the build server running until no more builds are pending.
I know this might be a lot to digest, but I think this will really make the product future proof. It would also allow you in the future to provide cloud services with Continua CI so I don’t have to setup everything myself
Hi Geert
We do have a feature like this planned (EC2 and Azure agents), but it’s not high on the list right now. The new Build Event Hanlders feature in 1.5 is where this feature would sit (it’s also where the github status stuff has moved to). I had a quick chat with the team about this, there would need to be some changes to how agents are allocated, because it’s done based on requirements, but in your sitation you would obviously want to force the stage(s) to be run on a specific agent. It’s doable… the only issue right now is time and resources.
I will add the info you posted to the feature on our backlog so we remember to contact you when we get to implementing it.