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_CRUCIBLE
- CLI_FISHEYE
- CLI_HIPCHAT
- CLI_JIRA
- CLI_STASH
- COMMAND
- GANT
- GINT
- GRADLE
- GRADLEW
- GROOVY
- MAVEN2
- MAVEN3
- SCP
- 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 should just use the default as well. |
---|
cleanCheckout | true | Defaults to false. |
---|
checkoutDir_0 | | You must set it to blank or a specific value (otherwise you will get an NullPointerException). |
---|
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 "" |
|
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 | - 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. |
---|
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:gant
- aliases: GROOVY, GRADLE, GRADLEW, 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. |
---|
testResultsDirectory | | Defaults to **/target/surefire-reports/*.xml. |
---|
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
- 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:stash
- org.swift.bamboo.acli:hipchat
- org.swift.bamboo.acli:crucible
- org.swift.bamboo.acli:fisheye
- alias: CLI_JIRA, CLI_CONFLUENCE, CLI_BAMBOO, CLI_STASH, CLI_HIPCHAT, CLI_CRUCIBLE, CLI_FISHEYE
|
---|
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_0 | -1 | First artifact id, use -1 to download all shared artifacts. Must be the numeric id . | localPath_0 | | First directory path relative to the working directory. Blank is valid. | artifactId_1 | 12345 | Second artifact id. | localPath_1 | 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 artifact_0 --value2 -1 --field3 localPath_0 --value "" |
|