To keep my pipeline tasks DRY I want to reuse my deployment task. I now have something like:
But the DEPLOY_STAGING and DEPLOY_TEST definitions only differ regarding the env on which to deploy. Can I add something like:
To further reuse code and have just one DEPLOY definition?
We recently released support for defining Deployment Variables. This will allow you to configure variables that will be injected into the relevant Deployment Step. Which seems to be what you need here.
You can configure them in the Repository Settings -> Pipelines -> Deployments.
@Liri Sokol, we've started work on adding support for flexible environment configurations (i.e. more than 3 environments, named whatever you want). You can follow its progress here: https://bitbucket.org/site/master/issues/15362/enhance-deployments-to-support-flexible