Bamboo Operator's Guide
Agents
Finding out which agents are online or offline
https://open-bamboo.nrao.edu/admin/agent/configureAgents!doDefault.action
(Re)Starting a Bamboo agent
Look up the hostname from the Offline agent list
ssh to the host as casaci or rpmbuild
Execute crontab -l and look for a line with "bamboo-agent.sh start" in it
Execute the line with start or stop parameter as necessary
Viewing Agent Custom capabilities
Select an agent from the agent list and view the Agent-specific capabilities.
Many jobs are set to run only on a single host using the hostname.
Bamboo Plans
Not all of the Bamboo branches are actively used but are preserved for potential future use or reference. The following is the list of plans that are currently in use and critical for testing and package creation.
CI - Test Suite 1 - Gen2
(Note: CI -Test Suite 1 is is disabled and will eventually be removed)
This is the main CI branch. ~40 tests are run with an unpackaged application.
The cmake temporary directories are only cleaned if the build fails.
If the build fails, it will automatically clean the CMake caches and try again.
This plan will try to trigger Branch Package plan if a corresponding branch exists.
This plan is automatically branch for all of the bugfix and feature branches.
Branch Package
This plan tags, builds and packages branches. This job can be run multiple times. The workspace is always cleaned before the build.
Branch Test Suite 2
This is a short set of ~20 tests that are run on the packaged application.
Master Tag
This plan creates master tags and only if the tag is successfully created, will trigger the package plan. The reason is to avoid rebuilding same package multiple times. This might cause confusion when the packages are published and the subsequently replaced, potentially with packaging changes.
Master Package
Packages master based on the latest tag. Has two dependents, test suites 3 and 4. These test suites are run in parallel
Master Test Suite 3
The old "critical" test suite. Can run on any test machine.
Master Test Suite 4
The old "accepted" test suite. Can only run on specific machines due to data constraints (local data directory)
Release 5.0.0
Release 5.0.0 has it's own set on plans that largely corresponds to the Master plans. The reason is that the branch build mechanism is expected to be "frozen" and uses release/5.0.0 branch of both casa and casa-pkg repositories. Hence release/5.0.0 has it's own CI Plan also.
Creating a Bamboo Branch Manually
Select the plan you want to branch. Click on "Actions"->"Configure Branch". Select branches tab and click on the "Create plan branch". Select the branch you want and click "Create". After creating the branch, you need to enable it as well. Select the branch from the list (if not already selected), check the "Branch enabled" check box and save.
Jira - Bamboo Trigger
When a ticket status is changed from "Scheduled" to "Ready to Verify" in Jira, a corresponding Bamboo "Branch Package" branch is created. This is accomplished by a Groovy script that is triggered at the Jira workflow transition using Adaptavist ScriptRunner plugin. The actual script (CreateBambooBranch.groovy) is stored in smb://samba-cv/jira-scripts
To inspect if the script ran, login to Jira, go to "Jira Administration" -> System -> Issues -> Workflows. In either a bug or feature workflow click on View, Find Scheduled row, click on "Ready to Verify", Click on "Post Functions", locate "ScriptRunner workflow function" and click on the link that ends with "... execution(s)". Clicking on the check marks will show the log messages. There are only handful (15)of execution logs stored, so to debug you might need to select a ticket and switch between the "Scheduled" and "Ready to Verify" state.
Cleaning Bamboo Workspaces
There is a plan called "Remove Stale Working Directories" that removes stale working directories from the agent workspaces. This is generally sufficient, but sometimes it might be necessary to remove workspaces manually. To do that, locate bamboohome/xml-data/build-dir, for example by inspecting the crontab as described in (Re)Starting Bamboo Agents section. It is generally safe to delete any or all of the plan subdirectories on the agent, but it is prudent to leave the ccache directory in order to reduce the rebuild time.
Rerunning Jobs
Bamboo won't allow rerunning a failed job unless all of the other jobs in the plan/stage have completed. For the "Branch Package" and "Branch Test Suite" jobs, it is best to re-run starting from the "Branch Package". Otherwise the "Branch Test" job will not be able to insert the proper package link to the Jira ticket.
Master and Release Test Plans can be re-run as is, with the following caveat: Stopping a regression suite from Bamboo does not stop the tests running in the agent. This is due to the test framework design that takes process control from the Bamboo agent. So if you stop the test plan, you need to go and kill the Java and Python jobs on the Test Servers before re-running the test. This is on the list of improvements for the test framework.