Ask A Question

View Question

Hello--

I'm trying to solve an issue with deploying to multiple servers in a server role. The issue is represented under the following circumstances:

Build Plan (pseudo-code):
1) On Server: Buildmaster, execute command, git clone $repo
2) Build Artifact
3) Deploy Artifact

Deploy to: web12 (web1, web2 servers);

What ends up happening is that Buildmaster is able to successfully execute the above plan from start to finish for web1, but upon attempting the git clone again for web2, the job fails since git clone requires an empty directory.

This issue emerges since build plans linked in pipelines are implicitly inside of a: for server in $pipeline_stage block, and the git clone is then executed twice in the same temporary directory.

I'm wondering:

  1. can buildmaster use a different temporary directory for each server?
    or 2) can buildmaster clear the temporary directory for each successful server build
    or 3) can I ask buildmaster to execute a build action outside of the server block loop

Any insight into this issue would be appreciated!

Product: BuildMaster
Version: 5.6.11

Hello Jason,

I would suggest making two plans, one with the first two pseudo-code steps and a second with just the third step. Then, use pipeline stages to run the build stage once on the BuildMaster server and the deploy stage on both web servers after the artifact is built.

You can set the build stage to automatically advance to the deploy stage when it succeeds.

Hi Ben--

This is a fantastic solution, and suits the situation perfectly.
Thank you!

Answer Question