Search code examples
tfsrelease-management

TFS 2017: only allow manual deployment to PROD environment after release to DEV and QA


In TFS, say I have 3 environments in my release definition:

  1. DEV
  2. QA
  3. PROD

I only want TFS to permit manual deployment to PROD after successful deployments to DEV and QA.

I do not want the deployment to PROD to be automatic, and I do not want to use any approval mechanism.

How could I do this?


Solution

  • You can set the "Trigger" option for each environment:

    Select the environment in release definition >> Click "..." behind the environment name (eg, Dev) >> Deployment Conditions... >> Set the trigger option for each environment as following:

    • DEV : After release creation
    • QA : After successful deployment to another environment, select DEV for triggering environment(s).
    • PROD: No automated deployment

    But there isn't the option to disable approval mechanism. However you can set the Pre-deployment approver and Post-deployment approver as Automatic, thus the system will automatically approve the deployments.


    UPDATE:

    If you want to make promoting to DEV then QA mandatory first, Then we cannot achieve that as all the three environments are using the same artifacts in release.

    enter image description here