Start a Bamboo Plan with a specific Job

irfan zafar April 2, 2014

Hello,

i have a Bamboo Plan with 5 Jobs.

Job 1 activ

Job 2 activ

Job 3 activ

Job 4 activ

Job 5 activ

My Question is, do i have the possibility to start this bamboo plan with one job like "Job 2" without deactived the other jobs.

Bamboo 4.4.8 build 3511

3 answers

0 votes
Ron Chan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 2, 2014

Using the script task, you will need to modify your jobs. First of all you need a script task per job.

Create a script task "inline" something like:

if [[ ${bamboo.repository.git.branch} == release* ]]; then
execute tasks
fi

(this script executes tasks when my branch is a named "release*")

So with multiple jobs (you will need to consolidate your existing tasks in this script), it would look something like:

Job 1:

if [[ ${bamboo.repository.git.branch} == release* ]]; then
execute job1 tasks
fi

Job 2

if [[ ${bamboo.repository.git.branch} == release* ]]; then
execute job 2 tasks
fi

Job 3

if [[ ${bamboo.repository.git.branch} == release* ]]; then
execute job 3 tasks
fi

0 votes
irfan zafar April 2, 2014

but tha mean, i have to modify all jobs?

or do i have to creat a JOB mit that script?

AND can i have an example for that script plzz?

0 votes
Ron Chan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 2, 2014

You can use the Script task (within the Job) and write an if-then condition to execute that particular job or not, otherwise, proceed to the next job (which will have it's own condition and so forth).

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events