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!

    [BM] Preventing Build from deploying into further stage based on variable

    Scheduled Pinned Locked Moved Support
    3 Posts 3 Posters 13 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.
    • A Offline
      andy222
      last edited by

      Hi,
      We have a requirement where we want to prevent deploying to stages based on build variables (OR by any other means) if possible.
      We have three stages: DEV, UA and PROD.
      I am creating a build from TeamCity using Buildmaster API. When creating a build, I am also creating a build variable called "ChannelName". Which contains values of either "alpha", "beta" or "stable".
      I want to stop at DEV stage if ChannelName is "alpha". We shouldn't be able to deploy in further stages..
      We want to stop at UA stage if channel name is "beta" (So deployment should happen only in DEV and UA only)
      channel with "stable" should be able to deploy in all three stages.
      Does Buildmaster has something I can achieve it with?

      OctopusDeploy achieves this with the help of LifeCycles and Channels.

      1 Reply Last reply Reply Quote 0
      • P Offline
        philippe.camelio_3885
        last edited by philippe.camelio_3885

        Hello @andy222
        One way is to use $PipelineStageName variable in your deployment script to block deployemnt at the required stage according your channelname var.
        The other way could be a stage requirement, but I haven't try this way.
        Best regards
        PhilippeC.

        1 Reply Last reply Reply Quote 0
        • rhessingerR Offline
          rhessinger inedo-engineer
          last edited by

          Hi @andy222,

          To expand on this further. If you are looking for it to just skip the stage based on that variable and proceed to the next stage, then I would also suggests @philippe-camelio_3885 method of checking in OtterScript using the $PipelinStageName. If you are looking to block going further in the pipeline and stopping at a specific step, I would suggest using the Pipeline Stage Requirements and setting a Require Variable automated check. That can block deployment to a stage unless a variable is set to a specific value.

          Thanks,
          Rich

          Products Engineer, Inedo

          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