I want to build a pipeline with a step structure like the following:
- build package
- validate package against sandbox 1
- deploy package to sandbox 1
- validate package against sandbox 2
- deploy package to sandbox 2
- Build package is the automatic step.
- I would like the subsequent four steps to be manually triggered.
- The validate jobs should be able to be run in parallel with any other job of any type (validate or deploy)
- A deployment job should only be able to be run if it's validate step passed successfully
- The deployment jobs should also be able to be run in parallel; that is, alongside any of the other deploy/validate jobs
- Each validate/deployment pair of jobs should be able to be run regardless of other validate/deployment steps failing, ie I should be able to validate and deploy to sandbox 1 regardless of whether validating/deploying to sandbox 2 is successful or not
I've used this kind of structure previously with Azure (I didn't build it) but I can't figure out if its possible here. Am I going to have to split this out to multiple pipelines? I thought I would be able to do this when I found out about after-script, but seems I can't put a step inside it. Here's what I thought I might be able to do:
I should add that I am completely new to yaml and pipelines in general, literally started using it yesterday
pipelines:
pull-requests:
default:
- step:
name: 'Generate deployment packages'
script:
...
- parallel:
- step:
name: 'Validate Against Sandbox 1'
trigger: manual
script:
...
after-script:
- step:
name: 'Deploy to Sandbox 1'
trigger: manual
script:
if [[ BITBUCKET_EXIT_CODE -eq 1 ]]; then exit 1; fi
...
- step:
name: 'Validate Against Sandbox 2'
trigger: manual
script:
...
after-script:
- step:
name: 'Deploy to Sandbox 2'
trigger: manual
script:
if [[ BITBUCKET_EXIT_CODE -eq 1 ]]; then exit 1; fi
...
I also thought Stages might help, but you can't manually trigger stage steps 
Thanks