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

Allow multiple steps

XMLWordPrintable

    • 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.

      Currently it's only possible to have a single step defined for default or a branch. The ability to have multiple steps would allow the YAML file to be far more readable as the commands would be grouped by functionality. For example:

      #!yaml
      image: golang
      pipelines:
        default:
          - step:
              script:
                - mkdir -p /go/src/github.com/ArjenSchwarz/aqua
                - mv * /go/src/github.com/ArjenSchwarz/aqua
                - apt-get update
                - apt-get install -y zip
                - cd /go/src/github.com/ArjenSchwarz/aqua
                - go get -t ./...
                - go test ./...
                - GOOS=linux GOARCH=amd64 go build -a -ldflags '-s' -o binary
                - curl -v -u $BB_ACCESS -X POST https://api.bitbucket.org/2.0/repositories/$BITBUCKET_REPO_OWNER/$BITBUCKET_REPO_SLUG/downloads/ -F files=@binary
      

      Could be displayed as the below instead, which makes it a lot more obvious what everything is for.

      #!yaml
      image: golang
      pipelines:
        default:
          - prepare:
              script:
                - mkdir -p /go/src/github.com/ArjenSchwarz/aqua
                - mv * /go/src/github.com/ArjenSchwarz/aqua
                - apt-get update
                - apt-get install -y zip
                - cd /go/src/github.com/ArjenSchwarz/aqua
           - test:
               script:
                - go get -t ./...
                - go test ./...
           - build:
              script:
                - GOOS=linux GOARCH=amd64 go build -a -ldflags '-s' -o binary
            - deploy:
               script:
                - curl -v -u $BB_ACCESS -X POST https://api.bitbucket.org/2.0/repositories/$BITBUCKET_REPO_OWNER/$BITBUCKET_REPO_SLUG/downloads/ -F files=@binary
      

              Unassigned Unassigned
              8df5c253e16f ArjenSchwarz
              Votes:
              63 Vote for this issue
              Watchers:
              68 Start watching this issue

                Created:
                Updated:
                Resolved: