Deployments using Bitbucket Pipelines

Issue #12844 resolved
Mythili_Premkumar
created an issue

We do deployment of code from Bitbucket repository to different environments.

I think the following features are required in Bitbucket Pipelines when deploying: 1) A flag which controls/triggers the deployment of code as soon as someone commit the code to branch. I do not want deployment to happen as soon as someone commits the code to the repo. 2) Scheduling the deployment. 3) A button click to trigger the deployment ( as it was in Bamboo cloud). I feel that this is the much required feature as we can do deployments whenever we need it.

Official response

  • Aneita Yang staff

    Hi everyone!

    Super excited to let you know that Bitbucket Deployments is now available to all Bitbucket Pipelines users. With Bitbucket Deployments, you can track the deployments you execute through Pipelines giving your team visibility over what's available in each environment, as well as the status of each deployment.

    To configure deployments tracking, add deployment: test to the step which deploys to your test environment in your bitbucket-pipelines.yml file. We also support tracking deployments to the staging and production environment. Note that if you would like your deployment step to be a manual step, you can add trigger: manual to the step configuration.

    If you do have a manual deployment of an artifact from one environment to the next, you will see a promotion button on the Deployments dashboard. The promotion button displays the number of commits that will be deployed and when clicked, launches a dialog showing you the exact commits that will be deployed, along with a detailed file diff so that you can review the code changes.

    promotions.png

    Bitbucket Deployments also shows you a history of tracked deployments in your repository and a summary of the deployment including when it was deployed, and by whom.

    We've already received some suggestions to improve Bitbucket Deployments:

    • Supporting flexible deployment environments - #15362
    • Limiting deployment concurrency - #12821
    • Pipelines / Deployments integration with Jira - #13129
    • Restricting who can run deployment steps - #13676
    • Detailed Slack / Hipchat deployment notifications - #13816

    I encourage you to vote for those issues and add a comment explaining your use case for the request if they are things that you would like to see. If you have any other feedback on Bitbucket Deployments, I ask that you please raise a new issue so that we can track it separately to the work being tracked here.

    We hope you enjoy this addition to Bitbucket!

    Aneita

Comments (21)

  1. CarePay Limited

    We use the 'default' config for running a build including unit tests, but not deploy. Whenever a feature or bugfix branch is created and committed to, the normal build runs. However, for the 'develop' branch we build and deploy. This way, we have Continuous Delivery for our main branch, and we use AWS ElasticBeanStalk to deploy from test to the other environments (acceptance, production).

    Having said this, it would be nice to be able to specify for that a 'step' is 'Manual'. This would allow testers to decide when to hit the button and trigger the deployment.

    For instance:

    pipelines:
      default:
        - step:
            name: Build
            script:
              - ./gradlew --console=plain build
        - step:
            name: Deploy
            type: manual
            script:
              - ./gradlew --console=plain deploy
    
  2. Ben Madore

    I fully agree with this - without the ability to decouple builds from deployments this will never be a usable product for me. I need to be able to fully automate build & deploy to say, the DEV environment, but hten after testing promote that same binary to the QA environment. It took bamboo a LONG time to come up with a good distinction between Build & Deployment... i'm hoping pipelines can do it in much less time...

  3. Alex Soto

    @Ben Madore

    Just curious, I'm also transitioning from bamboo cloud. Is Bamboo's model sufficient for you or is it lacking anything for you?

    What platform(s) technologies are you using/deploying to (java, other)? I'm using Heroku for mostly ruby based apps. I think I've come up with a way to do it with pipelines using a branch per environment method, just wondering what you're doing.

  4. Ben Madore

    @Alex Soto The Bamboo Model is sufficient because it decouples artifact generation and artifact deployment. We're using compiled / JVM languages and I don't necessarily want to have to have to model my runtime environments as git branches - I would also prefer not to rebuild artifacts for each environment, and want to be able to generate the artifacts once, test them, and then promote through different environments.

  5. Jerônimo Lopes

    That would be awesome. Our deployment system is asynchronous with pushes to master and versions generations. We generally deploy the our system after 'work time', when our clients are not using the system.

  6. Matt Ryall staff

    Hi folks,

    I have some good news and I need your help. First, the good news - we have manual steps in development now, hot on the heels of launching multiple steps this week. Expect to see that appearing for customers in the Pipelines alpha program later in October, for general launch later in the year.

    Now, where you come in. We're starting to design our next iteration of deployment tracking in Bitbucket Pipelines, which we think will be extremely helpful for teams deploying to cloud environments. Here is one of our mockups, showing the status of environments and a history of deployments:

    Pipelines deployments mockup

    If this looks interesting and you can spare 30-60 mins to discuss your deployment workflow with us, please shoot me an email with the following:

    • your name, organisation and team size
    • which location/time zone you're in
    • a two sentence summary of your tech stack and deployment process (how often, environments, current tooling, etc.)

    From this, we'd like to line up some quick interviews in the next two weeks to road test our designs against your real world environments. We expect it to evolve rapidly.

    Thanks,
    Matt

  7. Sergey Bezkostnyi

    Hi,

    Manual steps look very interesting, but according to documentation anyone with "write" access to repository can run these steps. What if I want only some users to be able to run manual steps? For example, I don't want to allow everyone to deploy to production. I think there should be some permissions configuration, ideally for each step separately (so I can allow deployment to staging for everyone, but only specific users would be able to deploy to production).

    Thanks.

  8. Aneita Yang staff

    Hi everyone,

    We're excited to let you know that manual steps is now available to all Bitbucket users! Manual steps is a stepping stone towards supporting deployments within Bitbucket Pipelines. To configure a step in your pipeline as manual, add trigger: manual to the step in your bitbucket-pipelines.yml file. For more information on manual steps and how to configure them, check out our documentation.

    If you have any feedback on manual steps, I ask that you please raise a new issue so that we can track it separately to the deployments work being tracked here.

    Thanks,
    Aneita

  9. Aneita Yang staff

    Hi everyone!

    Super excited to let you know that Bitbucket Deployments is now available to all Bitbucket Pipelines users. With Bitbucket Deployments, you can track the deployments you execute through Pipelines giving your team visibility over what's available in each environment, as well as the status of each deployment.

    To configure deployments tracking, add deployment: test to the step which deploys to your test environment in your bitbucket-pipelines.yml file. We also support tracking deployments to the staging and production environment. Note that if you would like your deployment step to be a manual step, you can add trigger: manual to the step configuration.

    If you do have a manual deployment of an artifact from one environment to the next, you will see a promotion button on the Deployments dashboard. The promotion button displays the number of commits that will be deployed and when clicked, launches a dialog showing you the exact commits that will be deployed, along with a detailed file diff so that you can review the code changes.

    promotions.png

    Bitbucket Deployments also shows you a history of tracked deployments in your repository and a summary of the deployment including when it was deployed, and by whom.

    We've already received some suggestions to improve Bitbucket Deployments:

    • Supporting flexible deployment environments - #15362
    • Limiting deployment concurrency - #12821
    • Pipelines / Deployments integration with Jira - #13129
    • Restricting who can run deployment steps - #13676
    • Detailed Slack / Hipchat deployment notifications - #13816

    I encourage you to vote for those issues and add a comment explaining your use case for the request if they are things that you would like to see. If you have any other feedback on Bitbucket Deployments, I ask that you please raise a new issue so that we can track it separately to the work being tracked here.

    We hope you enjoy this addition to Bitbucket!

    Aneita

  10. Log in to comment