taskcluster-cli

command module
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 30, 2017 License: MPL-2.0 Imports: 13 Imported by: 0

README

TaskCluster CLI Client

Task Status

Overview

TaskCluster CLI is a command-line client offering control and access to taskcluster from the comfort of your command-line. It provides utilities ranging from direct calls to the specific API endpoints to more complex and practical tasks like listing and cancelling scheduled runs.

Usage

For a list of all commands run taskcluster help, detailed information about each command is available with taskcluster help <command> [<sub-command> [...]]. You can also use the -h or --help parameter to get a command's help information.

Installation

To install, download the taskcluster binary for the latest release your platform, and run it! On POSIX platforms you will need to chmod +x of course.

Development

Requirements

We currently support Go versions starting at 1.8; the project may or may not build on earlier versions.

Please note that the default repositories for popular Linux distributions (e.g. Ubuntu) do not carry that version of Go. We recommend you download the latest version of the language from the official website.

Building

Getting the source is as simple as running the following command in your shell. Go will download the source and set up the repository in your $GOPATH.

go get -d github.com/taskcluster/taskcluster-cli

To actually build the application, simply run make in $GOPATH/github.com/taskcluster/taskcluster-cli which will generate the executable taskcluster in the root of the source.

Dependency vendoring

The dependencies are managed through the govendor tool, but its use should be transparent when building the project. After cloning the project, running govendor sync will download the various dependencies and ensure that they are at the version specified in the vendor/vendor.json file, so that everyone uses the same dependencies at the same version. The make process automatically runs that command before building.

To add a new dependency to the project, simply run govendor fetch <go-import-url> to add it to the list of dependencies. To update all dependencies to their latest version, run govendor fetch. More commands are described on the govendor project page.

APIs

The API-related commands (apis/) are generated from the TaskCluster reference data. When that data changes, the commands can be updated automatically:

make generate-apis
Commands

We are using cobra to manage the various commands and sub-commands that are implemented in taskcluster-cli.

Each command is a instance of the cobra.Command struct, and is dynamically registered at run-time in the command tree (in func init() {...}). Thus, commands are registered as an import side-effect. Commands are implemented in sub-packages.

To add a new command, create a new sub-package under cmds and add an import for that sub-package to subtree_import.go, keeping the imports in order.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package apis implements all the API CommandProviders.
Package apis implements all the API CommandProviders.
cmds

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL