Hi,
I did notice that Bitbucket Pipeline has a 10 steps limit.
It's very easy to reach that limit considering more than one environment with few parallel steps. How do I describe a more complex pipeline that has more than 10 steps and doing it without grouping commands under the script section of a single step?
For example if I have 3 environments to deploy to, each of them needs a manual step just to block the parallel ones so at least 3 steps are wasted:
- step:
name: Test Environment Deploy
trigger: manual
deployment: test
script:
- echo "This is a dummy step, just to block the parallel ones"
- parallel:
- step:
name: Parallel 1
script:
- something
- step:
name: Parallel 2
script:
- something else
To reach the limit I simply need to have 3 environment like the previous one.
Hi Jacopo,
Currently Pipelines has a 10 step limit. However, we have an open feature request here to bump the limit, which you should follow: https://bitbucket.org/site/master/issues/16558/increase-multiple-steps-limit
The only feature that I think could currently help, depending on your workflow, is the after-scripts configuration. This will allow you to set up script commands that execute one a given step completes, useful for various teardown operations you may want to do regardless of if a step fails or succeeds.
Out of curiosity, would you be willing to share what you deployment workflow looks like and why you need the manual step blocking parallel steps for a deployment?
Thanks,
Phil
Hi Phil,
thanks for your answer. At that time I fixed the problem by creating multiple "custom" entries on the pipeline yml. Instead of pushing the button deploy and having everything in one single screen, I need to go to a specific commit and trigger deploy_to_XYZ. I don't have to do the entire cycle very frequently so that was a good trade-off. This is the solution I've used:
image: openjdk:8
pipelines:
branches:
master:
# deploy-to-qa and deploy-to-live were supposed to be here separated by a manual step
- step:
name: Build and Local Test
script:
- build and test
custom:
deploy-to-qa:
- step:
name: QA
script:
- pre...
- parallel:
- step:
name: Deploy 1
script:
- deploy 1 to QA
- step:
name: Deploy 2
script:
- deploy 2 to QA
- step:
name: Deploy 3 to QA
script:
- deploy 3 to QA
- step:
name: Final check
deployment: test
script:
- echo "QA Deployed :)" # This is a one of the dummy steps to set up the property deployment
deploy-to-live:
- step:
name: LIVE
caches:
- gradle
script:
- pre...
- parallel:
- step:
name: Deploy 1
caches:
- gradle
script:
- deploy 1 to LIVE
- step:
name: Deploy 2
caches:
- gradle
script:
- deploy 2 to LIVE
- step:
name: Deploy 3 to LIVE
caches:
- gradle
script:
- deploy 3 to LIVE
- step:
name: Final check
deployment: production
script:
- echo "LIVE Deployed :)" # This is a one of the dummy steps to set up the property deployment
My problem was making all those steps (I have 3 envs, here are just 2) a single pipeline with a manual step between those instead of triggering deploy_to_X separately. Another problem I had was wasting a step to set up the deployment type "test, production..." because parallel doesn't let you specify it so a dummy step "echo ..." was created.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.