Issue #15943 resolved
Jonathan Martz created an issue

Deployment of Pipelines could be much easier ...

To improve the Workflow you should add a Buttons to the deployment page, to deploy a pipeline with a simple click.

Comments (5)

  1. Matt Ryall

    Hey @Jonathan Martz - can you tell us more about your pipeline is structured, and what kind of deployment you want to kick off from the deployment page?

    There is already a "promote" button on the deployment page, but how it works maybe isn't so obvious. If your pipeline has an automated deployment step (e.g. to the test environment) followed by a manual deployment step (e.g. to staging/production), you will get a button with an arrow and number of commits shown on the deployment dashboard. It currently looks like this:

    promote-button-old.png

    Because the button isn't particularly obvious, we're redesigning it to be more visible. In a few days, you'll see our new design which has a clearer "Promote" button:

    promote-button-new.png

    But in some cases the button won't appear at all, based on how your pipeline is structured.

    If you can provide an example of how your pipeline works, and what step you'd like to run from the deployment page, we can look at how we might make that work for you.

    Cheers,
    Matt

  2. Jonathan Martz reporter
    pipelines:
      custom:
        stage:
          - step:
              name: "Install Requirements"
              script:
                - echo "Install requirements"
                - touch install-reqs.txt
                - ls -la
          - step:
              name: "Composer Install"
              script:
                - echo "Composer Install"
                - touch composer-install.txt
                - ls -la
          - step:
              name: "Npm Install"
              script:
                - echo "Npm Install"
                - touch npm-instal.txt
                - ls -la
    
          - step:
                name: "Gulp Compile"
                script:
                   - echo "Gulp Compile"
                   - touch gulp-compile.txt
                   - ls -la
          - step:
              name: "Copy to Server"
              deployment: "production"
              script:
                - echo "Copy to Server"
    

    I want to trigger a Pipeline with a single click on a Button with he latest commit.

    1. commit a change
    2. trigger one Pipeline to Build (i dont want to build automaticly after every commit)

    bitbucket-pipeline-trigger.jpg

  3. Matt Ryall

    @Jonathan Martz - to run a deployment just when required, we recommend configuring it as a manual step. Something like this:

    pipelines:
      branches:
        master:
          - step:
              name: "Build and test"
              script:
                - ...
          - step:
              name: "Deploy to staging (automated)"
              deployment: staging
              script:
                - ...
          - step:
               name: "Deploy to prod (manual)"
               deployment: production
               trigger: manual   # <- only run this step manually
               script:
                 - ...
    

    In the example above, the staging deployment will run every time, but the production deployment will wait for you to click "Run" on that step in the pipeline.

    If you set it up this way, you'll get a "Promote" button on the build on the deployment dashboard which will do exactly what you want. You will also have a single build pipeline for your entire CI/CD flow to production, which is what we're trying to encourage with Pipelines.

    We don't plan to support triggering custom pipelines from the deployment dashboard, because you'd have to select too many things (which commit + which pipeline), and it doesn't fit with our recommended model of a single pipeline through to production. So I'll resolve this ticket based on that.

    Please let me know if you have any further questions on how to get this configuration working for your team.

  4. Log in to comment