To integrate with Azure DevOps, you need an Azure DevOps user with
Basicaccess level on the necessary AzureDevOps organization and
View permissions for this nodepermission for the project. We recommend that this user be a designated shared bot user, as env0 will perform actions as this user on the project/repository.
If you do not have the correct permissions, please ask an administrator or a different user with those permissions to create the template.
env0 Azure DevOps application has not been previously authorized, you will get a popup from Azure DevOps asking you to authorize it and to grant it repository access using your account.
- Click ADD A NEW TEMPLATE on the top right in the Templates screen.
- Pick your template type, enter a name for the template, and click on NEXT
- Click on the Azure DevOps button. Since you have already created an Azure DevOps template in this env0 organization, there is no need for further authentication with Azure DevOps.
- Select the user to authenticate as out of the users in your organization that have already authorized the env0 Azure DevOps app. After selecting the user, you'll be able to choose a project from the list of accessible Azure DevOps Projects.
- If you would like to pull the code from a specific revision or branch, enter that in the
Branchfield. Leaving this field empty will use your default branch, which is usually “master”/"main".
- Enter the folder your
IaCfiles are located in under
<IaC Type> Folder. If your IaC files are in the root of the repository, leave this empty.
- Click on NEXT to proceed to the variables section
- Add environment and terraform variables that you'd like to be used during deployment, and then click on NEXT to go to the final "Projects" section
- Pick the projects that you'd like to have access to deploy this template, and then click on DONE to create the template.
- Can't find your repository? Ensure that the Authorized User has access to the necessary Azure DevOps organization/project. In order to authorize a new Azure DevOps user, log out of Azure DevOps in your browser here, and then click on "Authorize another Azure DevOps user."
- Make sure to enable the
Third-party application access via OAuthpolicy within your Azure DevOps organizations that you wish to integrate with env0 (Organization Settings -> Security -> Policies, See image below).
> 📘 Azure DevOps old domain name URLs
Repositories using the old domain name URLs are not supported, i.e. if the URL for your git repository is in the format of
<organization-name>.visualstudio...an environment won't be created.
For more information about old domain name URLs and how to resolve the issue, read here: https://learn.microsoft.com/en-us/azure/devops/release-notes/2018/sep-10-azure-devops-launch#switch-existing-organizations-to-use-the-new-domain-name-url
If you would like to integrate an existing template with Azure DevOps:
- From the Templates screen, click on Settings for the appropriate template you would like to integrate with Azure DevOps.
- Click on the VCS step. From there you can click on the Azure DevOps button, and integrate with Azure DevOps as you would for a new template.
Updated 7 months ago