Enabling repository-stored Bamboo Specs
Storing Bamboo Specs in a repository allows you to keep your project configuration together with the code and automatically publish any code changes. It also gives you access to the history of plan specifications and makes it easy to revert to a particular moment in time.
Repository-stored Bamboo Specs are natively supported in Bitbucket Data Center and Server and Bitbucket Cloud repositories. To use repository-stored Bamboo Specs with other types of repositories (including Git, GitHub, and Subversion), set up webhooks to trigger Bamboo to scan for changes to Specs.
- native Git is installed
- you have access to the Maven central repository
Enable repository-stored Bamboo Specs in Bitbucket Data Center and Server and Bitbucket Cloud
To enable repository-stored Bamboo Specs:
- In the upper-right corner of the screen, selectAdministration> Linked repositories.
Select your repository.
In the Bamboo Specs tab, enable Scan for Bamboo Specs.
Bamboo Specs from this repository will be able to modify your plans and deployments in Bamboo. Make sure that write permissions to this repository are properly set in Bitbucket Data Center and Server or Bitbucket Cloud as any commit to this repository will refresh Bamboo configuration.
In the Access section, select which projects Bamboo Specs can access and decide if Bamboo Specs should be allowed to create new build and deployment projects.Project creation allowed
Available only to users with global 'Create' permission. Use this option if you want to be able to create new build projects and deployment projects from Bamboo Specs. Bamboo Specs will be allowed to access and modify projects thus created.All projects
Available only for Bamboo administrators. Use this option if you want to have a repository managing multiple build plans and deployment projects in your Bamboo instance.Build projects
You must have project administrator or Bamboo administrator permissions to add a build project. You can't add new projects here.
To add a Build project:
- From the Bamboo header, select Projects.
- Select your project.
- In the top-right corner, click Project settings.
- In the sidebar, select Bamboo Specs repositories.
Select your repository and select Add.
In case a plan downloads artifacts from another project (the Artifact Downloader task) or triggers builds of plans in another project (the Dependencies tab on the Plan configuration page), you have to grant access to these projects as well.
You must have project administrator or Bamboo administrator permissions to add a deployment project. You can't add new projects here.
To add a Deployment project:
- From the Bamboo header, select Deploy > All Deployment Projects.
- Select your project.
- In the top-right corner, select [...] > Edit project.
- Select Bamboo Spect repositories.
- Select your repository and select Add.
Now, Bamboo Specs from this repository will be able to modify this deployment project and environments. Once you have added your repositories, you can see them listed in the Projects section in Linked repositories.
Enable project-level repositories using repository-stored Bamboo Specs
If the repository is defined within a project, it can be used to create/update plans within that project. For configurations outside the project, linked repositories need to be used. - BAM-21632Getting issue details... STATUS
Use webhooks with other repository types
Webhooks allow repositories other than Bitbucket Data Center and Server and Bitbucket Cloud to communicate with Bamboo (including Git, GitHub, and Subversion).
The following is an example of a webhook request using curl for a Git repository:
#!/bin/bash /usr/bin/curl -X POST -H "X-Atlassian-Token: no-check" http://[BAMBOO_URL]/bamboo/rest/api/latest/repository/scan\?repositoryId\=[REPOSITORY_ID]
Once you set up a webhook for a repository, it sends the HTTP request to Bamboo with every new commit. This HTTP request, in turn, triggers Bamboo Specs scan repository to see if there are any changes to Specs. If Bamboo detects any changes in a repository, it automatically updates necessary plans and deployments. Learn more about setting up webhooks.