Bamboo
What problems does Bamboo solve
-provides automated and reliable build and testing process, letting you focus on coding
-builds and deploys projects which have different technoloies, platforms or target servers
-optimixe the code integration cycle and make sure you never commit broken code back into the code repository
-run unit tests and see the test results on the fly
-helps you to leverage the of Elastic resources e.g. AWS EC2 instances.
-deploys your apps to Google Play and/or Apple store
Bamboo install on Windows
Bamboo Architecture
-Bamboo user connect via http:/bamboo:8085 to bamboo server
-bamboo server is connected to
* build agent
* database MySQL, SQL Server, Oracle … - you can use internal (bamboo) or external db, do not have driver for mysql
Why bamboo server and build agent should be hosted on separate machine
- Every server you have should be single responsibility
- Every build could affect responsiveness of bamboo server
- After a while you can kill off agent - dynamic create and kill of
Changing connection port from 8085 to 80
Home directory of bamboo installation -> “conf” folder -> file “server” -> edit -> change from 8085 to 80
To specify bamboo home directiory
Bamboo/atlassian-bamboo/WEB-INF/classes/bamboo-init.properties -> edit
Driver for mysql - is not nessery for another db
Connector/J
- Take mysql-connector-java-x.x.x-bin.jar and mow it Bamboo/lib/ directory
C://Program Files/Bamboo/BambooConsole
C://Program Files/Bamboo/InstallAsService
C://Program Files/Bamboo/StartBamboo
C://Program Files/Bamboo/bin/startup
localhost:80
Add License
add endpoint to db
Types of build agents in bamboo
Agent build application
a) Local Build Agent
-Build Agent service runs on the same computer as Bamboo software
-configuration for testing only
b) Remote Build Agent
-Your Windows or Linux server already exists. You never terminate the server for inactivity
c) Cloud Agent: Build Agent on AWS (Amazon Cloud)
-Your Windows or Linux server is created only when a build is initiated. The server will get terminated if inactive for a certain amount of time e.g. 30 minutes.
Build Agent
-Build Administration -> Agents
-Build Administration -> Agents -> Server capabilities (adding paths to tools needed by bamboo build agent)
- connection to server GSM TCP 54663 & 54667 port.
-to remote agent installation commend add "-Dbamboo.home=C:\agent\" - to install it user independent. By default remote agent is installed on user folders, user which was running the installation.
-${bamboo_agent_dir}/bin/InstallBambooAgent-NT.bat
-${bamboo_agent_dir}/bin/StartBambooAgent-NT.bat
-agent is running as a service
Elastic Build Agents
-EC2 Launch Settings
Build Plans. Building and Packing your code.
Project structures in Bamboo
Plan
Stage -> Stage -> Stage
-Job -Job -Job
*Task *Task *Task
*Task *Task -Job
-Job *Task *Task
*Task *Task
Task execute sequentially within a Job.
Jobs execute in parallel within Stage.
Stages execute sequentially within Plan.
If Job is finished successfully it is produce artifact
Create -> project
Create -> plan
Projects -> project name -> plan name -> Actions -> Configure plan
Plan by default is disbled
Action -> enable plan -> run
Parametrisation and variables
Variables in Bamboo
a) Global Variables - defined by the user and accessible across Bamboo instance as well as in all build
b) System Variables - Accessible across Bamboo instance and in all build plans. They get their value from System or Environment Variables with the same name
c) Plan Variables - Defined by the user and accessible within the same plan. They override Global Variables.
d) Build-Specific Variables - Evaluated by Bamboo. Related to current build.
e) Deployment Variables - Available when deploying a project.
Important Build-Specific Variables
a) bamboo.buildKey - The job key for the current job, in the form PROJECT-PLAN-JOB, e.g. BAM-MAIN-JOBX
b) bamboo.planKey - The key of the current plan, in the form PROJECT-PLAN, e.g. BAM-MAIN
c) bamboo.buildNumber - The Bamboo build number, e.g. 123
d) bamboo.planName - The current plan's name e.g. Some project name - Some plan name
e) bamboo.build.working.directory - The working directory on which the build is being executed, for example <HOME>/xaml-data/build-dir/AV-VAT-JOB1
Variables
https://confluence.atlassian.com/bamboo/bamboo-variables-289277087.html
- access env variable ${bamboo.variable_name}
-$bamboo_variable_name (Linux/Mac)
-%BAMBOO_VARIABLE_NAME% (Windows)
Build Triggers
a) Remote trigger - repository triggers the build when changes are commited
b) Repository polling - bamboo polls source repository and builds when new changes are found
c) Scheduled - run according to schedule
d) Single daily build - run once a day
Branch Plans
a) notfications
-notifiy commiters and people who have favourited the created branch
-use the plan's notification settings
-notifications should not be sent for the created branch branch
b) automization of creation and de;letion of the plan
create plan branch
-manually
-when new branch in repository is created
-when new branch in repository is created and match expression
Delete branch
-after branch was deleted from repository
-after branch inactivity in repository
c) trigger
Testing
Unit Test
-test runner
-adding capability for test runner on build agent (agents -> ip of agent -> capability)
-create task and add test runner executable from capabilityr
Artifacts
Deployment Projects
-configure plan -> stages -> create deployment project
-you should have artifacts to be ale to create deployment projects
-you can create environments
Administering Bamboo
add endpoint to db
Types of build agents in bamboo
Agent build application
a) Local Build Agent
-Build Agent service runs on the same computer as Bamboo software
-configuration for testing only
b) Remote Build Agent
-Your Windows or Linux server already exists. You never terminate the server for inactivity
c) Cloud Agent: Build Agent on AWS (Amazon Cloud)
-Your Windows or Linux server is created only when a build is initiated. The server will get terminated if inactive for a certain amount of time e.g. 30 minutes.
Build Agent
-Build Administration -> Agents
-Build Administration -> Agents -> Server capabilities (adding paths to tools needed by bamboo build agent)
- connection to server GSM TCP 54663 & 54667 port.
-to remote agent installation commend add "-Dbamboo.home=C:\agent\" - to install it user independent. By default remote agent is installed on user folders, user which was running the installation.
-${bamboo_agent_dir}/bin/InstallBambooAgent-NT.bat
-${bamboo_agent_dir}/bin/StartBambooAgent-NT.bat
-agent is running as a service
Elastic Build Agents
-EC2 Launch Settings
Build Plans. Building and Packing your code.
Project structures in Bamboo
Plan
Stage -> Stage -> Stage
-Job -Job -Job
*Task *Task *Task
*Task *Task -Job
-Job *Task *Task
*Task *Task
Task execute sequentially within a Job.
Jobs execute in parallel within Stage.
Stages execute sequentially within Plan.
If Job is finished successfully it is produce artifact
Create -> project
Create -> plan
Projects -> project name -> plan name -> Actions -> Configure plan
Plan by default is disbled
Action -> enable plan -> run
Parametrisation and variables
Variables in Bamboo
a) Global Variables - defined by the user and accessible across Bamboo instance as well as in all build
b) System Variables - Accessible across Bamboo instance and in all build plans. They get their value from System or Environment Variables with the same name
c) Plan Variables - Defined by the user and accessible within the same plan. They override Global Variables.
d) Build-Specific Variables - Evaluated by Bamboo. Related to current build.
e) Deployment Variables - Available when deploying a project.
Important Build-Specific Variables
a) bamboo.buildKey - The job key for the current job, in the form PROJECT-PLAN-JOB, e.g. BAM-MAIN-JOBX
b) bamboo.planKey - The key of the current plan, in the form PROJECT-PLAN, e.g. BAM-MAIN
c) bamboo.buildNumber - The Bamboo build number, e.g. 123
d) bamboo.planName - The current plan's name e.g. Some project name - Some plan name
e) bamboo.build.working.directory - The working directory on which the build is being executed, for example <HOME>/xaml-data/build-dir/AV-VAT-JOB1
Variables
https://confluence.atlassian.com/bamboo/bamboo-variables-289277087.html
- access env variable ${bamboo.variable_name}
-$bamboo_variable_name (Linux/Mac)
-%BAMBOO_VARIABLE_NAME% (Windows)
Build Triggers
a) Remote trigger - repository triggers the build when changes are commited
b) Repository polling - bamboo polls source repository and builds when new changes are found
c) Scheduled - run according to schedule
d) Single daily build - run once a day
Branch Plans
a) notfications
-notifiy commiters and people who have favourited the created branch
-use the plan's notification settings
-notifications should not be sent for the created branch branch
b) automization of creation and de;letion of the plan
create plan branch
-manually
-when new branch in repository is created
-when new branch in repository is created and match expression
Delete branch
-after branch was deleted from repository
-after branch inactivity in repository
c) trigger
Testing
Unit Test
-test runner
-adding capability for test runner on build agent (agents -> ip of agent -> capability)
-create task and add test runner executable from capabilityr
Artifacts
Deployment Projects
-configure plan -> stages -> create deployment project
-you should have artifacts to be ale to create deployment projects
-you can create environments
Administering Bamboo
Komentarze
Prześlij komentarz