This server will be upgraded at 3pm Sydney time on December 3rd (December 2nd, 8pm PST) and will be down for up to 30 minutes.
Added by Bob Swift, last edited by Bob Swift on May 08, 2008  (view change) show comment

Labels:

codegeist_2008_fisheye codegeist_2008_fisheye Delete
Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.
Name FishEye Command Line Interface
Version 1.0.0
Product Versions 1.4.x, 1.5.x - tested on 1.4.2 and 1.5.1
Author(s) Bob Swift
Homepage  
Price free
License BSD
JavaDocs  
IssueTracking http://developer.atlassian.com/jira/browse/FCLI
Download ZIP fisheye-cli-1.0.0-distribution.zip
Download Source http://svn.atlassian.com/svn/public/contrib/fisheye/fisheye-cli
JVM requirements
for client
Java 1.5 and above

Download statistics

Date 2008-Dec
Hits 0

Description/Features

This is a command line interface (CLI) for remotely accessing Fisheye and some Crucible information . This is a working command line client that can be used directly with your installation. It provides a consistent interface with other Atlassian product CLI tools. The Fisheye CLI uses Fisheye's REST API.

Additional information

Related CLI clients

All CLI clients have a standard interface and implementation.

Installation

  • Unzip the distribution package and put the enclosed directory in a convenient location
  • Ensure Remote API is enabled in your installation
    • You need to be an administrator
    • Go to Admin menu -> General Administration -> Server Settings -> Remote API
    • Setting should be ON

Usage

  • On a command line, cd to the directory where you installed the client
  • On Windows
    • Run fisheye
  • On Linux (or Windows)
    • Run java -jar release/fisheye-cli-1.0.0.jar
  • This will show help text for the command line interface client
  • The client defaults to use a user of automation. Either add this user with all the authorities required to do the actions you want or specify a different user parameter
  • It is recommended that you open the fisheye.bat file with an editor and customize it for your environment by adding server, user, and password parameters. Follow the example in the comments and make sure you do not remove the %* at the end of the line.

Examples

  • Note: the following examples assume that the fisheye.bat file has been customized for your environment as noted above.
    fisheye --action listRepositories
    
    fisheye --action listPaths --repository public
    
    fisheye --action listPathHistory --repository public
    
    fisheye --action listTags --repository public --path /confluence --revision 3655
    
    fisheye --action listChangeSets --repository public --path "/confluence"
    
    fisheye --action getChangeSet --repository public --path "/confluence"  --change 1253
    
    fisheye --action getRevision --repository public --path "/confluence"  --revision 3655
    
    fisheye --action getChangeSet --repository public --change 1253
    
    fisheye --action query --repository public --query "select revisions where author = bob.swift"
    
    fisheye --action query --repository public --query "select revisions where in any open review"
    
    

Example output

fisheye --action getRevision --repository public --path "/confluence"  --revision 3655

Revision details for revision 3655 for path /confluence in repository public

        ancestor  . . . . . . . . . . : 1253
        author  . . . . . . . . . . . : jnolen
        csid  . . . . . . . . . . . . : 3655
        date  . . . . . . . . . . . . : 2006-10-18T22:01:16.85Z
        linesAdded  . . . . . . . . . : 0
        linesRemoved  . . . . . . . . : 0
        path  . . . . . . . . . . . . : confluence
        rev . . . . . . . . . . . . . : 3655
        state . . . . . . . . . . . . : deleted
        totalLines  . . . . . . . . . : 0
        log . . . . . . . . . . . . . : Removing incorrect dir.

Help text

This is the help text displayed by the default command or using --help. This gives the precise definition of parameters, however, it might be easier to just look at the examples. Note, the information in this section is automatically generated, so if you have edit suggestions, add a comment. Otherwise, your edits will be replaced on the next update.

Tips
  • Use single dash for single letter parameters - example: -v
  • Use double dash for multi-letter parameters - example: --help
  • When parameters are specified, most need a value - example: --action listPaths
  • Some parameters are flags (boolean) and must not be followed by a value - example: --verbose
  • Parameter names are case sensitive, but, action values are not - example: --PATH is invalid but --action listpaths is equivalent to --action listPaths
  • Some parameters become required once a specific action is chosen. This is indicated in the help text for each value.
  • Some parameters have both short (one letter) and long (more than one letter) parameter names - example: -a or --action are the same
  • Some parameters have default values, if so, they are indicated below - example: (default: automation)
  • Some parameters are required - indicated by (...) - example: (-a|--action) <action>
  • Some parameters are optional - indicated by [...] - example: [(-f|--file) <file>]
  • Values that have more than one word must be enclosed by double quotes - example: --query "select ..."

Usage:

  fisheye [--help] (-a|--action) <action> [--debug] [-v|--verbose] (-s|--server)
  <server> (-u|--user) <user> (-p|--password) <password> [--login <login>]
  [--service <service>] [-l|--loginFromStandardInput] [(-f|--file) <file>] [--path
  <path>] [--repository <repository>] [--revision <revision>] [--change <change>]
  [--query <query>]


	Provides capability to make requests to a remote server.
	Required parameters: action, server, password.
	Optional parameters: user (likely required for your installation).
	Other required and optional parameters depending on action requested.


  [--help]
        Prints this help message.

  (-a|--action) <action>
        Requested operation to perform. Valid actions (not case sensitive) are:
        
        login - Login to remote server. Returns login token.
        	 Required parameters: password
        	 Optional parameters: user
        logout - Logout of remote server.
        listRepositories - List repositories.
        	 Optional parameters: file
        listPaths - List paths under a given path.
        	 Required parameters: repository
        	 Optional parameters: path, file
        listPathHistory - List path history.
        	 Required parameters: repository
        	 Optional parameters: path, file
        listTags - List tags for a revision.
        	 Required parameters: repository, path, revision
        	 Optional parameters: file
        listChangeSets - List change sets for path.
        	 Required parameters: repository, path
        	 Optional parameters: file
        getRevision - Get revision details.
        	 Required parameters: repository, path, revision
        	 Optional parameters: file
        getChangeSet - Get change set details.
        	 Required parameters: repository, change
        	 Optional parameters: file
        query - Run an EyeQL query.
        	 Required parameters: repository, query
        	 Optional parameters: file

  [--debug]
        Requests debug output, example: stack traces.

  [-v|--verbose]
        Requests verbose output.

  (-s|--server) <server>
        Server URL.

  (-u|--user) <user>
        User name for remote login. (default: automation)

  (-p|--password) <password>
        User password for remote login.

  [--login <login>]
        Login token from previous login request.

  [--service <service>]
        Service address extension. (default: /api/rest/)

  [-l|--loginFromStandardInput]
        Get login token from standard input.

  [(-f|--file) <file>]
        File for output.

  [--path <path>]
        Path - either a file or directory.

  [--repository <repository>]
        Repository name.

  [--revision <revision>]
        Revision.

  [--change <change>]
        Change set id.

  [--query <query>]
        Run EyeQL query.

Error handling

Care is taken to return the appropriate exit codes to the command processor. This makes it possible do error handling in automation scripts. Error and error logging output is directed to standard error.

Error type Exit code Description
SUCCESS 0 Normal exit
CLIENT_EXCEPTION -1 The client has found a problem with the request and is reporting an error with a message.
PARAMETER_PROBLEM -2 The client processed the command parameters and found a syntax error or missing required parameters according to the parameter definition
REMOTE_EXCEPTION -3 The remote system has reported an error. The error message comes from the server.
FAILURE -99 The client program failed in an unexpected way.

License

  • The software provided for this tool has a BSD style license
  • The distribution ships binaries with a LGPL license
  • Look in the license directory for detailed license information

Version History

Date Release Notes
May 8, 2008 1.0.0 Initial release