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!

    How to re-deploy using the API endpoint?

    Scheduled Pinned Locked Moved Support
    apibuildmaster
    4 Posts 2 Posters 6 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.
    • D Offline
      dwynn_6489
      last edited by

      I'm trying to use the endpoint "api/releases/packages/deploy" to deploy a release to an environment that has already received the deployment (analogous to "Re-deploy to Stage" option available via the screens), but I'm getting an error

      Invoke-WebRequest : 2627141Builds_PromoteBuild28`Violation of UNIQUE KEY constraint 'UQ__BuildPromotions'. Cannot insert duplicate key in object 'dbo.BuildPromotions'. The
      duplicate key value is (84564, Stage).

      Is there a different endpoint for re-deployment?

      Note that in this scenario, we don't need to rebuild the package, we just need to re-release the code.

      Product: BuildMaster
      Version: 5.6.8

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

        This appears to be a bug I've filed a fix here: https://inedo.myjetbrains.com/youtrack/issue/BM-3109

        1 Reply Last reply Reply Quote 0
        • D Offline
          dwynn_6489
          last edited by

          Thanks Tod. The bug ticket sounds like it will just prevent the error. Are there plans to create an API that will actually re-deploy to a stage?

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

            It's just an unfortunate mix of terminology in "promotion" vs "deployment" vs "execution". A "promotion" is simply allowing a package to be deployed to the stage and should only happen once per release. A "deployment" can happen anywhere but may be restricted by pipeline settings depending on if the package was previously promoted, and an "execution" is essentially the worker that performs the deployment (and there could be many per deployment).

            The fix will make it perform a deployment instead of a promotion then a deployment, so it will work as you're expecting.

            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