Git Product home page Git Product logo

cci's Introduction

CCI

CircleCI

A cli for fetching the status and full output of CircleCI jobs.

Install

go get -u github.com/tmessi/cci/cci

Usage

cci is designed to have sane defaults if run from within cloned git repository. It will examine the current branch, and origin remote to determine which project and branch to use for queries to CircleCI. Thus to check the status of the current branch, just run:

cci

However, it does require a CircleCI Token to authenticate the requests. It is recommended to use the environment variable, CIRCLE_CI_TOKEN, along with something like direnv.

First create a Personal Access Token and add it to your environment:

export CIRCLE_CI_TOKEN=<personal access token>

Subcommands

Report status

# no subcommand defaults to status
cci
# If you like typing
cci status
# If you like typing, but not too much
cci s

See output of a build

cci output <build number>
cci o <build number>
cci o <workflow name> <job name>

You can then easily pipe the output to other tools:

cci o test build | grep 'FAIL:'

Retry a build

If a build fails for transient reasons, like a network error while installing dependencies, it can be retried:

cci retry <build number>
cci r <build number>
cci r <workflow name> <job name>

For more usage information and flags, see the help:

cci --help

Autocompletion

For bash copy the .bash_completion file to /etc/bash_completion.d/ or to a location that is sourced from ~/.bashrc or ~/.bash_profile. Or add the contents directly to ~/.bashrc or ~/.bash_profile.

For other shells, see the urfave/cli docs. For example for zsh follow the description here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.