Description | Details |
---|
Common | Some common fields are handled with specific CLI parameters CLI Field | POST Field | Discussion |
---|
plan | planKey | The POST field value is a 3 part name including job. CLI uses 2 separate fields for this. |
---|
job |
| 3rd part of planKey POST field |
---|
taskKey | createTaskKey | Required for add. We have defined some common aliases (case insensitive):- ANT
- CHECKOUT
- CLI_BAMBOO
- CLI_CONFLUENCE
- CLI_JIRA
- CLI_BITBUCKET
- CLI_UPM
- CLI_SERVICE_DESK
- COMMAND
- GANT
- GINT
- GRADLE
- GRADLEW
- GRADLEWRAPPER
- GROOVY
- MAVEN2
- MAVEN3
- SCP
- SQL
- SCRIPT
- SSH
|
---|
description | userDescription |
|
---|
disable | taskDisabled=true |
|
---|
|
Source checkout |
POST Field | Example POST Value | Discussion |
---|
createTaskKey | com.atlassian.bamboo.plugins.vcs%3Atask.vcs.checkout | - Task keys are in the form xxx:yyy. Use : in place of %3A.
- taskKey: com.atlassian.bamboo.plugins.vcs:task.vcs.checkout
- alias: CHECKOUT
|
---|
selectedRepository_0 | defaultRepository | Says to use the default repository for the plan. Default (not specifying the parameters) should just use the default as well. For other repositories, you will need the repository id either explicitly or from Variable replacement using @repositoryId@. - The variable in a script after an addRepository or getRepository action
|
---|
cleanCheckout | true | Defaults to false. |
---|
checkoutDir_0 |
| You must set it to blank or a specific value (otherwise you will get an NullPointerException). |
---|
Using the default repository Code Block |
---|
-a addTask --plan XX-XX --job JOB1 --taskKey CHECKOUT --description "get source" --disable --field1 selectedRepository_0 --value1 defaultRepository --field2 cleanCheckout --value2 true --field3 checkoutDir_0 --value3 "" |
Using another respository in a script Code Block |
---|
-a addRepository --plan @plan@ --repository my-repository
-a addTask --plan @plan@ --job @job@ --taskKey CHECKOUT --fields selectedRepository_0:@repositoryId@,checkoutDir_0:,cleanCheckout:true |
|
Script |
POST Field | Example POST Value | Discussion |
---|
createTaskKey | com.atlassian.bamboo.plugins.scripttask%3Atask.builder.script | - Task keys are in the form xxx:yyy. Use : in place of %3A.
- taskKey: com.atlassian.bamboo.plugins.scripttask:task.builder.script
- alias: SCRIPT
|
---|
scriptLocation | INLINE | INLINE or FILE. |
---|
scriptBody | exit -1 | Body for INLINE scripts. Use " \n " for new lines (leading and trailing blanks are significant. |
---|
script | myscript.sh | File for FILE scripts. |
---|
argument |
| Command line arguments. Defaults to blank. |
---|
environmentVariables |
| Environment variables. Defaults to blank. |
---|
workingSubDirectory |
| Working subdirectory. Defaults to blank. |
---|
runWithPowershell | true | Defaults to false. |
---|
Code Block |
---|
-a addTask --plan XX-XX --job JOB1 --taskKey SCRIPT --field1 scriptLocation --value1 INLINE --field2 scriptBody --value2 "exit -1" |
|
Maven |
POST Field | Example POST Value | Discussion |
---|
createTaskKey | com.atlassian.bamboo.plugins.maven%3Atask.builder.mvn2 com.atlassian.bamboo.plugins.maven%3Atask.builder.mvn3 | - Task keys are in the form xxx:yyy. Use : in place of %3A.
- taskKeys:
- com.atlassian.bamboo.plugins.maven:task.builder.mvn2
- com.atlassian.bamboo.plugins.maven:task.builder.mvn3
- aliases: MAVEN2, MAVEN3
|
---|
label | Maven 2 | Executable label of type Maven 2. |
---|
buildJdk | JDK | Build JDK. |
---|
environmentVariables |
| Environment variables. Defaults to blank. |
---|
workingSubDirectory |
| Working subdirectory. Defaults to blank. |
---|
testChecked | true | Defaults to false. |
---|
testDirectoryOption | standardTestDirectory | Defaults to standardTestDirectory. Alternate is customTestDirectory. Must be set if testChecked is true. |
---|
testResultsDirectory |
| Defaults to **/target/surefire-reports/*.xml. |
---|
projectFile |
| Defaults to blank. |
---|
Code Block |
---|
-a addTask --plan XX-XX --job JOB1 --description "Simple" --taskKey MAVEN2 --field1 label --value1 "Maven 2" --field2 goal --value2 "compile" --field3 buildJdk --value3 JDK |
|
GroovyGradleGradle WrapperGant |
POST Field | Example POST Value | Discussion |
---|
createTaskKey | org.swift.bamboo.groovy%3Agroovy | - Task keys are in the form xxx:yyy. Use : in place of %3A.
- taskKeys:
- org.swift.bamboo.groovy:groovy
- org.swift.bamboo.groovy:gradle
- org.swift.bamboo.groovy:gradlew
- org.swift.bamboo.groovy:gradlewrapper
- org.swift.bamboo.groovy:gant (deprecated)
- aliases: GROOVY, GRADLE, GRADLEW, GRADLEWRAPPER, GANT
|
---|
label | Groovy | Executable label like Groovy, Gradle, Gradle Wrapper, or Gant. |
---|
scriptLocation | FILE | INLINE or FILE. |
---|
script | my-script.groovy | Script location for FILE. |
---|
scriptBody |
| INLINE script. Use " \n " for new lines (leading and trailing blanks are significant. |
---|
buildJdk | JDK | Build JDK. |
---|
environmentVariables |
| Environment variables. Defaults to blank |
---|
workingSubDirectory |
| Working subdirectory. Defaults to blank. |
---|
testChecked | true | Defaults to false. |
---|
testDirectoryOption | standardTestDirectory | Defaults to standardTestDirectory. Alternate is customTestDirectory. Must be set if testChecked is true. |
---|
testResultsDirectory |
| Defaults to **/*reports/*.xml for Groovy and **/*reports/*.xml,**/*results/*.xml for Gradle |
---|
Code Block |
---|
-a addTask --plan XX-XX --job JOB1 --description "Simple" --taskKey GROOVY --field1 label --value1 "Groovy" --field2 scriptLocation --value2 FILE --field3 script --value3 my-script.groovy --field4 buildJdk --value4 JDK |
|
GINT |
POST Field | Example POST Value | Discussion |
---|
createTaskKey | org.swift.bamboo.groovy%3Agint | - Task keys are in the form xxx:yyy. Use : in place of %3A.
- taskKey: org.swift.bamboo.groovy:gint (deprecated)
- alias: GINT
|
---|
label | Gant | Executable label referencing a Gant executable. |
---|
scriptLocation | FILE | INLINE or FILE. |
---|
script | integration-test.gant | Script location for FILE. |
---|
scriptBody |
| INLINE script. Use " \n " for new lines (leading and trailing blanks are significant. |
---|
targets |
| Specific testcases (targets) to run. Defaults to blank. |
---|
levelAll | true | Include all integer levels. Equivalent to command line -Dlevel=all. Defaults to false. |
---|
includeLevelsAll | true | Include all named levels. Equivalent to command line -DincludeLevels=all. Defaults to false. |
---|
clean | true | Ignore previous run state, run tearDown and setUp. Equivalent to command line -Dclean. Defaults to false. |
---|
verbose | true | Log additional information. Equivalent to command line -Dverbose. Defaults to false. |
---|
stopOnFail |
| Stop running more testcases once a testcase fails. Equivalent to command line -DstopOnFail. Defaults to false. |
---|
propertyLocation | FILE | INLINE or FILE. |
---|
propertyFile |
| Property location for FILE. |
---|
propertyBody |
| INLINE script. |
---|
buildJdk | JDK | Build JDK. |
---|
environmentVariables |
| Environment variables. Defaults to blank. |
---|
workingSubDirectory |
| Working subdirectory. Defaults to blank. |
---|
testChecked | true | Defaults to false. |
---|
testDirectoryOption | standardTestDirectory | Defaults to standardTestDirectory. Alternate is customTestDirectory. |
---|
testResultsDirectory |
| Defaults to **/*reports/*.xml. |
---|
Code Block |
---|
-a addTask --plan XX-XX --job JOB1 --description "Integration test" --taskKey GINT --field1 label --value1 "Gant" --field2 scriptLocation --value2 FILE --field3 script --value3 integration-test.gant --field4 buildJdk --value4 JDK --fields levelAll:true,includeLevelsAll:true,clean:true,verbose:true,stopOnFail:false,testChecked:true |
|
CLI |
POST Field | Example POST Value | Discussion |
---|
createTaskKey | org.swift.bamboo.acli%3Ajira | - Task keys are in the form xxx:yyy. Use : in place of %3A.
- taskKeys:
- org.swift.bamboo.acli:jira
- org.swift.bamboo.acli:confluence
- org.swift.bamboo.acli:bamboo
- org.swift.bamboo.acli:bitbucket
- alias: CLI_JIRA, CLI_CONFLUENCE, CLI_BAMBOO, CLI_BITBUCKET
|
---|
scriptLocation | FILE | INLINE or FILE. |
---|
script | create-jira-issue.txt | Script location for FILE. |
---|
scriptBody | --action ... | INLINE script. Use " \n " for new lines (leading and trailing blanks are significant. |
---|
Code Block |
---|
-a addTask --plan @plan@ --job @job@ --description "Create JIRA issue" --taskKey org.swift.bamboo.acli:jira --field1 scriptLocation --value1 FILE --field2 script --value2 "create-jira-issue.txt" |
|
Docker run | Div |
---|
POST Field | Example POST Value | Discussion |
---|
createTaskKey | com.atlassian.bamboo.plugins.bamboo-docker-plugin:task.docker.cli |
|
---|
commandOption | run |
|
---|
image | registry.address:port/namespace/repository:tag |
|
---|
dockerfileOption | inline |
|
---|
|
Code Block |
---|
-a addTask --plan @plan@ --job @job@ --description "Run a container" --taskKey com.atlassian.bamboo.plugins.bamboo-docker-plugin:task.docker.cli --field1 commandOption --value1 run --field2 image --value2 registry.address:port/namespace/repository:tag --field3 dockerfileOption --value3 inline |
|
Docker build | Div |
---|
POST Field | Example POST Value | Discussion |
---|
createTaskKey | com.atlassian.bamboo.plugins.bamboo-docker-plugin:task.docker.cli |
|
---|
commandOption | build |
|
---|
repository | registry.address:port/namespace/repository:tag |
|
---|
dockerfileOption | existing |
|
---|
|
Code Block |
---|
-a addTask --plan @plan@ --job @job@ --description "Build Docker image" --taskKey com.atlassian.bamboo.plugins.bamboo-docker-plugin:task.docker.cli --field1 commandOption --value1 build --field2 repository --value2 registry.address:port/namespace/repository:tag --field3 dockerfileOption --value3 existing |
|
Docker push | Div |
---|
POST Field | Example POST Value | Discussion |
---|
createTaskKey | com.atlassian.bamboo.plugins.bamboo-docker-plugin:task.docker.cli |
|
---|
commandOption | push |
|
---|
repositoryOption | custom |
|
---|
dockerfileOption | inline |
|
---|
pushRepository | registry.address:port/namespace/repository:tag |
|
---|
|
Code Block |
---|
-a addTask --plan @plan@ --job @job@ --description "Push image" --taskKey com.atlassian.bamboo.plugins.bamboo-docker-plugin:task.docker.cli --field1 commandOption --value1 push --field2 dockerfileOption --value2 inline --field3 registryOption --value3 custom --field4 pushRepository --value4 registry.address:port/namespace/repository:tag |
|
Artifact download |
Div |
---|
POST Field | Example POST Value | Discussion |
---|
createTaskKey | com.atlassian.bamboo.plugins.bamboo-artifact-downloader-plugin:artifactdownloadertask - Alias since 5.2: ARTIFACT_DOWNLOAD
|
|
---|
sourcePlanKey | X |
|
---|
artifactId_1 | -1 | First artifact id, use -1 to download all shared artifacts. Must be the numeric id . |
---|
localPath_1 |
| First directory path relative to the working directory. Blank is valid. |
---|
artifactId_2 | 12345 | Second artifact id. |
---|
localPath_2 | target | Second directory path. |
---|
etc... |
|
|
---|
|
Code Block |
---|
-a addTask --plan @plan@ --job @job@ --description "Get artifacts" --taskKey ARTIFACT_DOWNLOAD --field1 sourcePlanKey --value1 XXX-PLAN1 --field2 artifactId_1 --value2 -1 --field3 localPath_1 --value "" |
|
NPM |
Div |
---|
POST Field | Example POST Value | Discussion |
---|
createTaskKey | com.atlassian.bamboo.plugins.bamboo-nodejs-plugin:task.builder.npm |
|
---|
runtime | Node.js |
|
---|
command | install |
|
---|
|
Code Block |
---|
-a addTask --plan @plan@ --job @job@ --description "NPM install" --taskKey com.atlassian.bamboo.plugins.bamboo-nodejs-plugin:task.builder.npm --field1 runtime --value1 Node.js --field2 command --value2 install |
|
SQL |
Div |
---|
POST Field | Example POST Value | Discussion |
---|
createTaskKey | com.appfire.bamboo.sql:sql | Required for add. Alias: SQL (since 5.5) |
---|
scriptLocation | FILE | INLINE or FILE. |
---|
script | update-tracking-database.sql | Script location for FILE. |
---|
scriptBody |
| INLINE script. |
---|
dbProfile | dbUrl = jdbc:postgresql://examplegear.com:5432/test dbUser = automation | dbPassword = automation | Required. |
---|
outputFormat | RAW_WITH_LINE_BREAKS | Optional. Defaults to RAW_WITH_LINE_BREAKS. Values: RAW, RAW_WITH_LINE_BREAKS, WIKI, HTML |
---|
outputFile |
| Optional. Path to file for result output |
---|
|
Code Block |
---|
-a addTask --plan @plan@ --job @job@ --description "Database update" --taskKey SQL --field1 script --value1 update-tracking-database.sql --field2 dbProfile --value2 "dbUrl = jdbc:postgresql://examplegear.com:5432/test dbUser = automation | dbPassword = automation" |
|
SSH |
Div |
---|
POST Field | Example POST Value | Discussion |
---|
createTaskKey | com.atlassian.bamboo.plugins.bamboo-scp-plugin:sshtask | Required for add. Alias: SSH |
---|
host | examplegear.com. | Required. |
---|
username | root | Required. |
---|
authType | KEY | SSH key reference. Others: PASSWORD |
---|
password |
|
|
---|
change_key | true | Required when updating SSH key. |
---|
command | some-command | Command to run on remote system. |
---|
|
Code Block |
---|
-a addTask --plan @plan@ --job @job@ --description "Run remote command" --taskKey SSH --field1 host --value1 ${bamboo.host} --field2 username --value2 root --field3 authType --value3 KEY --field4 private_key --value4 @file --field5 change_key --value5 true --field6 command --value6 some-command --file ssh-key-file.txt |
|