Bamboo cli taskKey list

Abhi Vaishnav [X] February 6, 2013

Hi,

I am trying to use the bamboo cli but don't know what can be used as a taskKey.

Is there a list of taskKeys or a way to figure out what the key for each task is?

4 answers

1 accepted

0 votes
Answer accepted
Bob Swift OSS (Bob Swift Atlassian Apps)
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.
February 6, 2013

One way is to go into the Task browser and look at the link for the task you are interested in.

0 votes
Abhi Vaishnav [X] February 7, 2013

How do I know which parameters are required per task?

Bob Swift OSS (Bob Swift Atlassian Apps)
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.
February 7, 2013

Usually, it is obvious by looking at the task UI. In the command case, it is know as label under the covers and shows as Environment on the display.

I have added more details in the issue you created - BCLI-28

0 votes
Abhi Vaishnav [X] February 6, 2013

Thanks Bob that seems to work.

I have 2 follow up questions:

1.I don't see the updated changes in my plan. The output of the command line:

abhi@penny /abhi/bamboo-cli-3.1.0 $ ./bamboo.sh --action addTask --build "INTEST-RHEL532" --job "JOB1" --taskKey "com.atlassian.bamboo.plugins.vcs:task.vcs.checkout" --description "Checkout Test" --field1 "Repository" --value1 "Plan Repository"

Source Code Checkout task with id 47 added to job INTEST-RHEL532-JOB1.

abhi@penny /abhi/bamboo-cli-3.1.0 $ ./bamboo.sh --action addTask --build "INTEST-RHEL532" --job "JOB1" --id "1" --taskKey "com.atlassian.bamboo.plugins.vcs:task.vcs.checkout" --description "Checkout Test" --field1 "Repository" --value1 "Plan Repository"

Source Code Checkout task with id 48 added to job INTEST-RHEL532-JOB1.

How can I check if the plan actually has these tasks but the GUI screen isn't seeing

2. When I specify a "command" as the task, it doesn't know which "command" I am trying to add. I have tried to set the "fields" and "field1" to no success. Can you take a look at my command line and see what the problem is?

abhi@penny /abhi/bamboo-cli-3.1.0 $ ./bamboo.sh --action addTask --build "INTEST-RHEL532" --job "JOB1" --id "1" --taskKey "com.atlassian.bamboo.plugins.scripttask:task.builder.command" --description "Move top-level makefile" --fields "Argument:aaaa, EnvironmentVariables:eee=vvv" --field1 "Executable" --value1 "gmake"

Remote error: Please specify the command.

abhi@penny /abhi/bamboo-cli-3.1.0 $ ./bamboo.sh --action addTask --build "INTEST-RHEL532" --job "JOB1" --id "1" --taskKey "com.atlassian.bamboo.plugins.scripttask:task.builder.command.gmake" --description "Move top-level makefile" --fields "argument:aaaa, environmentVariables:eee=vvv" --field1 "executable" --value1 "gmake"

Remote error: unknown

abhi@penny /abhi/bamboo-cli-3.1.0 $ ./bamboo.sh --action addTask --build "INTEST-RHEL532" --job "JOB1" --id "1" --taskKey "com.atlassian.bamboo.plugins.scripttask:task.builder.command" --description "Move top-level makefile" --fields "executable:gmake, argument:aaaa, environmentVariables:eee=vvv" --field1 "executable" --value1 "gmake"

Remote error: Please specify the command.

abhi@penny /abhi/bamboo-cli-3.1.0 $ ./bamboo.sh --action addTask --build "INTEST-RHEL532" --job "JOB1" --id "1" --taskKey "com.atlassian.bamboo.plugins.scripttask:task.builder.command:gmake" --description "Move top-level makefile" --fields "executable:gmake, argument:aaaa, environmentVariables:eee=vvv" --field1 "executable" --value1 "gmake"

Remote error: unknown

abhi@penny /abhi/bamboo-cli-3.1.0 $ ./bamboo.sh --action addTask --build "INTEST-RHEL532" --job "JOB1" --id "1" --taskKey "com.atlassian.bamboo.plugins.scripttask:task.builder.command:executable.gmake" --description "Move top-level makefile" --fields "executable:gmake, argument:aaaa, environmentVariables:eee=vvv" --field1 "executable" --value1 "gmake"

Remote error: unknown

Bob Swift OSS (Bob Swift Atlassian Apps)
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.
February 7, 2013
  1. If it isn't showing up in the UI, then that says it probably wasn't added :(. Open an issue with more details. Specifically what Bamboo version are you on. Then I can look at the details.
  2. Each task type has different parameters that are required.
0 votes
Abhi Vaishnav [X] February 6, 2013

Hi Bob,

Looking at the task browswer, I copied the Task's link address (right on the task, copy link address) and here is what I get:

http://<bamboo install address>/build/admin/edit/addTask.action?planKey=INTEST-RSRHEL532-JOB1&returnUrl=%2Fbuild%2Fadmin%2Fedit%2FeditBuildTasks.action%3FbuildKey%3DINTEST-RSRHEL532-JOB1&createTaskKey=com.atlassian.bamboo.plugins.vcs%3Atask.vcs.checkout

From this I gather the TaskKey = com.atlassian/bamboo.plugins.vcs:task.vcs.checkout

Am I right?

Bob Swift OSS (Bob Swift Atlassian Apps)
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.
February 6, 2013

Yes, that should be it. Except for the typo: com.atlassian.bamboo.plugins.vcs:task.vcs.checkout

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events