Uploaded image for project: 'Bitbucket Cloud'
  1. Bitbucket Cloud
  2. BCLOUD-15972

Support YAML merge format in `bitbucket-pipelines.yml`

    XMLWordPrintable

Details

    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

    Description

      So that we can write complex pipelines while keeping the file clean and readable.

      Supported in YAML 1.1, docs: http://yaml.org/type/merge.html

      Example:

      image: user/my-image:latest
      
      x-run-tests:   &run-tests
          name: Run tests
          services:       - docker
          script:       - ./test.sh
      
      x-deploy-to-staging:   &deploy-to-staging
          name: Deploy to staging
          deployment: staging
          trigger: manual
          script:       - ./deploy.sh user@staging.com
      
      pipelines:   default:     - step:         <<: *run-tests
      
          - step:         <<: *deploy-to-staging
      
        branches:     develop:       - step:           <<: *run-tests
      
            - step:           <<: *deploy-to-staging
                trigger: auto
      
          master:       - step:           <<: *run-tests
            - step:           name: Deploy to production
                deployment: production
                trigger: manual
                script:             - ./deploy.sh user@example.com
      

      Attachments

        Activity

          People

            matt@atlassian.com Matt Ryall
            a04ccfb7-1735-4eae-8f46-82e286e8ce40 Deleted Account (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: