Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login

    Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

    If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

    Problem with deploying to server role

    Scheduled Pinned Locked Moved Support
    deployment-plansbuildmaster
    3 Posts 2 Posters 11 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ? This user is from outside of this forum
      Guest
      last edited by

      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

      1 Reply Last reply Reply Quote 0
      • benB Offline
        ben inedo-engineer
        last edited by

        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.

        1 Reply Last reply Reply Quote 0
        • ? This user is from outside of this forum
          Guest
          last edited by

          Hi Ben--

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

          1 Reply Last reply Reply Quote 0

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • 1 / 1
          • First post
            Last post
          Inedo Website Home • Support Home • Code of Conduct • Forums Guide • Documentation