Bitbucket Integration
Note
In order to integrate with Bitbucket, you need to have permission to install a Bitbucket App on your Bitbucket workspace/repository. If you do not have those permissions, please ask an admin or a different user with those permissions to create the template
New Template
If you would like to create your first Bitbucket Integrated Template in this env0 organization, please see Create Your First Template instead.
- Click ADD A NEW TEMPLATE on the top left in the Templates screen.
- Pick your template type, pick a name for the template, and then click on NEXT
- Click on the Bitbucket.org button. Since you have already created a Bitbucket template in this env0 organization, no such popup will appear, you are now able to pick from repositories known to env0 in your organization
- Pick the repository containing your IaC configuration.
- If you would like to pull the code from a specific revision or branch, enter that in the
Revision
field. Leaving this field empty will use your default branch, which is usually “master”/"main". - Enter the folder your IaC files are located in under
Terraform Folder
orTerragrunt 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 IaC 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.
- Pick the projects that you'd like to have access to deploy this template, and then click on DONE to create the template.
Troubleshooting
- Can't find your repository? Check if your Bitbucket workspace has the env0 Bitbucket App installed, and if the App is allowed access to your repository
- Bitbucket App is not installed - Simply click on the "authorize another Bitbucket workspace" link underneath the "Bitbucket Repository" field. You will get a popup allowing you to install the env0 Bitbucket app on another Bitbucket workspace.
Existing Template
If you would like to integrate an existing template with Bitbucket via a Bitbucket App:
- Go to the Templates screen, and click on Settings for the template you would like to integrate with Bitbucket.
- Click on the VCS step. From there you can click on the Bitbucket.org button, and integrate with Bitbucket as you would for a new template.
Updated over 3 years ago