This article explains how to set job 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 action 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 Bamboo plan key.
- --job value refers to Bamboo job key.
- --stage value refers to stage name.
- --type value refers to isolation type.
- --docker value refers to docker image name.
- --field value refers to 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.