Bamboo YAML Specs

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

As an alternative to using Bamboo Java Specs, Bamboo 6.3 allows you to create simple plans using Bamboo YAML Specs in no time. Just use one of the templates we provide and you're ready to start committing your files to a repository. 

動作の仕組み

Bamboo YAML Specs is another Bamboo Specs format supported by Bamboo next to Bamboo Specs Java. Once you have defined your plan configuration in YAML, you need to allow your repository to scan for Bamboo Specs.


Bamboo always looks for YAML Specs first. If it doesn't find YAML Specs, Bamboo tries to find and process Java Specs. 

In the repository you specified, Bamboo looks for bamboo-specs/bamboo.yml or bamboo-specs/bamboo.yaml files to fetch your configuration. Linked repository needs to have permissions to create plans within given project in order to process YAML definition and create a plan. 

A new plan created using Bamboo YAML Specs does not have any explicit permissions granted - only administrators will have access to it. You can't use YAML Specs to define plan-level permissions. We advise you to use project-level permissions. Contrary to Java Specs, YAML Specs can't create projects. 

In Bamboo YAML Specs, artifacts are shared by default. Artifacts are downloaded between stages, e.g user Defines Stage 1 with Artifact A, Stage 2 with Artifact B and Stage 3. This means that Stage 2 will download Artifact A from Stage 1 and Stage 3 will download both Artifact A and B from previous stages. 

In Bamboo YAML Specs, artifacts are also required by default. This means that a build fails if the artifact can't be published. 

YAML Format

Bamboo Specs YAML allows for a single plan definition in a single YAML file and accepts the following format:


---
project:
  key: DRAGON
  plan:
    key: SLAYER
    name: Dragon Slayer Quest
# List of plan's stages
stages:
	#List of stage's jobs
  - jobs:
	  # Scripts which are going to be executed within this job
      - scripts:
          - echo 'Going to kill the red dragon, watch me'
          - sleep 1
          - echo 'Nailed it'
	  # Job's requirements. Only matching type 'exists' is supported
        requirements:
          - isDragonLazy
      # Job's artifacts. All artifacts are shared ones.
        artifacts:
          - name: Red dragon's head
            path: dragon/red/head
	  # Job's test parsers.
        testParsers:
		   - type: mocha
  			 testResults: '**/mocha/*.json'
		   - type: junit
		  	 testResults: '**/junit/*.xml' 
...

Bamboo YAML Specs allows for configuring test parsers with a simplified format. You can use one of the following configurations: 

testParsers:
  - mocha
  - junit
testParsers:
  - type: mocha
    testResults: '**/mocha/*.json'
  - type: junit
    testResults: '**/junit/*.xml'
testParsers:
  - type: mocha
    testResults:
      - xxx.json
  - type: junit
    testResults:
      - '**/test-reports/*.xml'
      - '**/custom-test-reports/*.xml'




Default settings

Here's the default settings of plans crated using YAML Specs. These settings cannot be changed.

  • Bamboo YAML plan check-out starts with checking out a repository in which it's defined
  • notifications are sent to committers and watchers of the plan when plan fails
  • artifacts sharing is turned on
  • plan branches are created automatically with plan brach expiry set for 30 days
  • YAML plans use Bitbucket Server triggers 


続きを読む







最終更新日 2018 年 6 月 26 日

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

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