I have a single repo which contains multiple build targets/variants, and I'm working on the release/deployment process for the images right now. I want to allow manual triggering of deployments for each image, from each commit to master. Each one needs to separately go through test, staging, and production deployment environments. The problem is that each manual step requires all previous steps in the pipeline to pass,, which means a pipeline like this doesn't work:
- step: *build-target-a
- step: *build-target-b
- step: *deploy-a-test
- step: *deploy-b-test
- step: *deploy-a-staging
- step: *deploy-b-staging
- step: *deploy-a-production
- step: *deploy-b-production
This won't work because all the deploy steps are manually triggered, and i can't deploy-b-staging until I run deploy-a-test. This gets worse as I go down the chain - e.g. I can't deploy-b-production until I deploy-a-production, when I might not want to deploy-a-production at all.
So, I tried splitting them into separate pipelines (sorry for formatting):
pipelines:
branches:
master:
- step: *build-target-a
- step: *deploy-a-test
- step: *deploy-a-staging
- step: *deploy-a-production
master:
- step: *build-target-b
...
But, this configuration is invalid because the 'master' key is repeated twice.
I also know that you can't trigger manual steps in parallel - not that that would've really helped here anyway.
I COULD make a custom deploy step where you go to the commit, and run the "deploy-target-a" pipeline. But, I want to use the BITBUCKET_BUILD_NUMBER as part of my build. I might end up with out of order build numbers if i do this - e.g. if I ran "deploy-target-a" on the latest commit, then I went back to a previous commit and ran "deploy-target-a", the later commit would have an earlier build number.
My question is: what do you think is a working or good solution, or is there even one out there?
Hi @MichaelHobo
It looks like you'd want to trigger multiple pipelines for a push, that is currently not supported even though you could hack your yml in a such a way that the same branch would match multiple times like `master` `maste*` `mast*` etc. I would suggest raising a feature request describing your use case in https://jira.atlassian.com/projects/BCLOUD/issues/
As for parallel steps with manual triggers there is a ticket https://jira.atlassian.com/browse/BCLOUD-16650 that you may want to vote or watch for updates.
Thanks,
Peter
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.