Bamboo: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
=Overview=
=External=
 
* https://www.atlassian.com/software/bamboo
=Concepts=
=Subjects=
 
* [[Bamboo Concepts|Concepts]]
==Project==
* [[Bamboo Operations|Operations]]
 
Projects allow you to easily group and identify [[#Plan|plans]] which are logically related to each other.
 
==Plan==
 
A build plan. It defines everything about your build process. Each plan has a [[#Default_Job|Default job]] when it is created. More advanced configuration options, including those for plugins, and the ability to add more jobs will be available to you after creating this plan. It belongs to a [[#Project|project]].
 
Plans can be configured at any time after creation: Projects -> the project in question -> Select the Plan -> Actions drop down -> Configure plan.
 
==Repository==
 
One or more repositories can be added to a [[#Plan|plan]], which will be available to every [[#Job|job]] in the plan. The first repository in the list is the plan’s '''default repository'''. The repositories to which a trigger applies can be selected in respective trigger's configuration.
 
To add a repository: Project -> Plan -> Actions: Configure plan -> "Repositories" tab -> Add Repository -> Git repository (NOT GitHub, which won't allow SSH authentication) -> Name: up.plat-svc.cryptm, Repository URL: git@github.com:test-inc/up.plat-svc.cryptm.git, Authentication type: SSH private key -> Use shared credentials, shared credentials: Github Bamboo User SSH, Branch develop -> Test Connection -> Save Repository.
 
==Stage==
 
Each stage within a [[#Plan|plan]] represents a step within your build process. A stage may contain one or more [[#Job|jobs]] which Bamboo can execute in parallel.
 
==Job==
 
Each [[#Plan|plan]] has a [[#Default_Job|default job]] when it is created. A job has multiple [[#Task|tasks]]. More than one job can be added to a [[#Plan|plan]].
 
===Default Job===
 
===Build Isolation===
 
Builds are normally run in the agent's native operating system ("Agent environment" choice). The build could be run in an isolated and controlled environment with Docker ("Docker container" option). The build isolation can be changed after a plan is defined with Plan -> Actions: Configure Plan -> Select Job -> "Docker" tab.
 
===Typical Tasks for the Default Job===
 
* Source Code Checkout: Tasks -> Add task -> Source Control -> Source Code Checkout. Task description: "GitHub checkout", Repository: pick from pre-configured, see [[#Repository|repository]].
* Command:  Tasks -> Add task -> Command. Task description: "Gradle build and publish command", Executable: Gradle4, argument:
clean build publish
* JUnit Parser: Tasks -> Add task -> JUnit Parser. Task description: "Parses JUnit test results", Specify custom result directories:
**/test-results/test/*.xml
* Command:  Tasks -> Add task -> Command. Task description: "Clover file converter", Executable: CloverConverter, argument:
clean build publish
* Command:  Tasks -> Add task -> Command. Task description: "SonarQube", Executable: Gradle4, argument:
sonarqube  -Dsonar.branch.name=${bamboo.repository.git.branch} -Dsonar.projectKey=up.plat-svc.cryptm  -Dsonar.organization=test-inc  -Dsonar.host.url=https://sonarcloud.io  -Dsonar.login=...
 
===Artifacts===
 
Create artifact:
Name: Clover Report (System)
Location: target/site/clover
Copy pattern: **/*.*
Not shared, not required.
 
Create artifact:
Name: libs
Location: build/libs
Copy pattern: **/*.jar
Shared, required.
 
===Miscellaneous===
 
Use Clover to collect Code Coverage for this build.
 
Clover is already integrated into this build and a clover.xml file will be produced.
 
Clover XML Location: target/site/clover/clover.xml
 
==Task==
 
==Variables==
 
{{External|[https://confluence.atlassian.com/bamboo/bamboo-variables-289277087.html Bamboo Variables]}}

Latest revision as of 22:39, 2 January 2022