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 specification and makes it easy to revert to a particular moment in time.

はじめる前に

Make sure you have the following: 

  • native Git installed
  • access to Maven central repository

Enabling Bitbucket Server repository-stored Bamboo Specs

To enable Bitbucket Server repository-stored Bamboo Specs:

  1. Go to  > Linked repositories
  2. Select your repository. 

  3. 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 Server as any commit to this repository will refresh the Bamboo configuration.


  4. 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:
      1. From the Bamboo header, click Projects.
      2. Click your project.
      3. In the top-right corner, click Project settings.
      4. In the sidebar, click Bamboo Specs repositories.
      5. Select your repository and click 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:
      1. From the Bamboo header, click Deploy > All Deployment Projects.
      2. Click on your project.
      3. In the top-right corner, click [...] > Edit project.
      4. Click Bamboo Spect repositories.
      5. Select your repository and click 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. 

Enabling project-level repositories using repository-stored Bamboo Specs

If the repository is defined within a project, it can be used to create and update plans within that project. For configurations outside the project, linked repositories need to be used as described in the previous section. For more information, see BAM-21632 - Getting issue details... STATUS .


Additional step for other repositories

Starting from version 6.5, you will be able to use Bamboo Specs Java and YAML with the following repositories: 

  • Bitbucket Cloud
  • Git
  • GitHub
  • Subversion

Webhooks allow your repositories other than Bitbucket Server to communicate with Bamboo.

This 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.


最終更新日 2022 年 6 月 17 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.