This article explains how to set isolation type for a Bamboo job using Bamboo Command Line Interface (CLI).
Instructions
Use the setJobIsolationOptions action to set job isolation type for a Bamboo job. Refer to the sample command below:
--action setJobIsolationOptions --plan DEMO-ABC --job "ABC" --stage "Default Stage" --type DOCKER --docker Test --field hostDirectory_1=${bamboo.working.directory} --field containerDirectory_1=${bamboo.working.directory} --field hostDirectory_2=${bamboo.tmp.directory} --field containerDirectory_2=${bamboo.tmp.directory}
In the above action:
- --plan value refers to a Bamboo plan key.
- --job value refers to the Bamboo job key.
- --stage value refers to a stage name.
- --type value refers to the isolation type.
- --docker value refers to a docker image name.
- --field value refers to a host directory and content directory.
It is recommended to test it in a non-production environment or run the action with --simulate parameter to verify the behavior before deploying.