Release notes 2.1

18 June 2011

Summary

This release has major enhancements in the run actions, new JIRA and Confluence actions, and Bamboo 2.7/3.0+ support. This is a simultaneous release of all CLI clients. The Atlassian CLI distribution contains all CLI clients plus the atlassian scripts and additional examples and help text shipped with the distribution.

 

 

Compatibility

The Atlassian Command Line Interface (CLI) supports a large range of product releases. The matrix below provides compatibility guidelines based on testing, API compatibility information provided in Atlassian, and community feedback. User's are encourage to help improve compatibility information through discussions and issues. The CLI also works with releases not officially listed here since in many cases it uses remote APIs provided by Atlassian that have been stable for many years. Check previous versions of the CLI for coverage of earlier releases. Users should verify their usage scenarios on new releases. Support normally is limited to minimum releases indicated. Client requires JAVA 1.5 or 1.6 (recommended). In some cases, new actions are only available on against later versions of the server - these are usually noted in the documentation.

Notes

  1. Bamboo 2.7/3.0 introduced Stages and Jobs that changed how builds are referenced. For instance, job is now required to reference build artifacts. The Atlassian documentation for the REST APIs for these releases is lacking and there are a few problems (BAM-8594).
  2. Atlassian completely removed the Crowd remote APIs used for the CLI (sad) starting with Crowd 2.1. New replacement APIs do not cover most of the existing functionality. However, the new APIs will provide some additional capabilities. It will be a while to sort out how the Crowd CLI moves forward in a following release.

Highlights of Atlassian Command Line Interface (CLI) 2.1

Run Actions From CSV File

A new runFromCsv action has been added that will run other actions from a comma separated (CSV). Behavior is similar to run and runFromSql actions. This is supported by all CLIs. This has a number of automation benefits:

  1. Import data from other systems (for example: import JIRA issues and data from other application)
  2. Import data from other applications (for example: Excel using save to CSV)
  3. Provides another format option for automation scripts

Example

atlassian jira --action runFromCsv --file "import.csv" --continue
import.csv file
action, project, type, summary, description, affects-versions, customfield_10010, "Custom field"
createIssue, PROJ1, bug, "It fails", "If fails all the time", 1.1.0, "value1", "value2"
createIssue, PROJ1, task, "Do something", "Add documentation", 1.1.0, "", ""

Simplify SQL for runFromSql action

SQL can now specify field (column) names corresponding to CLI parameters. The CLI command string will be created from the column names and column data. Field (column) mappings are possible with a propertyFile (see below).

Example

run.sql file
select 'addVersion' as action, pkey as project, 'Z1' as name from project where pkey like 'ZJIRA%'
command and output
atlassian jira --action runFromSql --driver postgresql --database jira-4.3.0 --file run.sql

Run: --action addVersion --project ZJIRACLI --name Z1
Version 'Z1' added to project ZJIRACLI

Run completed successfully. 1 actions were successful from file: run.sql

Property File

New parameter propertyFile can be used with the runFromCsv and runFromSql actions to provide additional parameters for the action.

Example

atlassian jira --action runFromCsv --propertyFile import.properties 

Import JIRA issues

Using the new runFromCsv and runFromSql enhancements including the propertyFile parameter, the JIRA CLI supports a capability to import JIRA issues with various options helpful for a number of scenarios. The JIRA CLI extends the basic property file options with JIRA specific capabilities (JCLI-119) and chained action support (JCLI-124).

Example

Command line
atlassian jira --action runFromCsv --file import.csv --propertyFile import.properties --common "--project zjiracli" --continue 
import.csv
Action, Issue, Parent, Issue Type, Reporter, Summary, AffectsVersions, Custom1, Custom three, Text, comment, file, blah blah, ignore,

createIssue, , , bug, automation, A bug, "V1, V2", value1, value3, "Multi-line text with ""double quoted text"",
'single quoted text', and embedded separator", comment 1, , blah, ignore this,

createIssue, , , bug, automation, A bug, , value1, value3, "Multi-line text with ""double quoted text"",
with ending quote on new line
", comment 1, , blah, ignore this,

createIssue, , @issue@, subtask, automation, A bug subtask, , value1, value3, "See parent",
createIssue, , @issue@, subtask, automation, Another subtask, , value2, value3, "See parent",

addAttachment, @issue@,,,,,,,, attachment added to parent issue!!!,, src/itest/resources/data.txt

addComment,    @subtask@,,,,,,,,, comment for last subtask,
import.properties
# Map field headings to parameters understood by the JIRA CLI
# - key values (left hand side) must not contain blanks, blanks can be escaped (with \) if needed
# - the first character of field names will be automatically lowercased (except for custom fields)
# - field headings with embedded blanks are ignored unless they are mapped
# - field heading that should be ignored should be mapped to blank
# - custom fields can either be specified by name, id (like customfield_10120), or id (like 10120)
# - value mappings can also be done, they are specific to the (mapped) field name

field.Comments = comment
field.Text = description
field.Issue\ Type = type
field.ignore =
value.type.item = task
value.type.subtask = Sub-task

 

 

Common parameter

New parameter common can be provided on any of the run actions to provide parameters that are common to all the line actions.

Example

atlassian jira --action runFromCsv --common "--project zjiracli --type bug" 

FindReplace on run actions

The findReplace parameter is now valid for run actions and will find/replace text on each of the action lines.

 

Atlassian Command Line Interface (CLI) Improvements

Issues

T Key Summary Reporter Assignee P Status
Loading...
Refresh


Confluence Command Line Interface (CLI) Improvements

Issues

T Key Summary Reporter Assignee P Status
Loading...
Refresh


JIRA Command Line Interface (CLI) Improvements

  • More lists - getVersionList, getComponentList, getCustomFieldList
  • Improved getIssueList
  • Role support
  • Clone support including support for Clone Plus for Jira
  • Supported chained actions for run action scripts

Issues

T Key Summary Reporter Assignee P Status
Loading...
Refresh


Bamboo Command Line Interface (CLI) Improvements

Support Bamboo 2.7/3.0 and higher.

Issues

type key summary reporter assignee priority status

Data cannot be retrieved due to an unexpected error.

View these issues in JIRA


FishEye Command Line Interface (CLI) Improvements

FishEye now supports common CLI improvements documented above.

Issues

T Key Summary Reporter Assignee P Status
Loading...
Refresh


Crucible Command Line Interface (CLI) Improvements

Crucible now supports common CLI improvements documented above.

Issues

T Key Summary Reporter Assignee P Status
Loading...
Refresh


Crowd Command Line Interface (CLI) Improvements

Crowd now supports common CLI improvements documented above.

Issues

T Key Summary Reporter Assignee P Status
Loading...
Refresh