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

CCI

CircleCI test lint

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

Install

go install github.com/tmessi/cci/cci@latest

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.

Owner
Similar Resources

Go library for Common Lisp format style output

format This library has the goal to bring the Common Lisp format directive to Go. This is work-in-progress, see the summary implementation table below

Jul 7, 2020

rsync wrapper (or output parser) that pushes metrics to prometheus

rsync-prom An rsync wrapper (or output parser) that pushes metrics to prometheus. This allows you to then build dashboards and alerting for your rsync

Dec 11, 2022

Run The World. Command aggregator output. Define many services watch them in one place.

Run The World. Command aggregator output. Define many services watch them in one place.

Feb 2, 2022

Generic mapStringInterface tool for extracting of data for CSV output

Generic mapStringInterface tool for extracting of data for CSV output

Nov 2, 2021

[TOOL, CLI] - Filter and examine Go type structures, interfaces and their transitive dependencies and relationships. Export structural types as TypeScript value object or bare type representations.

typex Examine Go types and their transitive dependencies. Export results as TypeScript value objects (or types) declaration. Installation go get -u gi

Dec 6, 2022

Nodebook - Multi-Lang Web REPL + CLI Code runner

Nodebook - Multi-Lang Web REPL + CLI Code runner

nodebook Nodebook - Multi-Language REPL with Web UI + CLI code runner Useful to practice algorithms and datastructures for coding interviews. What is

Dec 29, 2022

A CLI for working with Go + Angular projects

NGGO A CLI tool for working with Angular + Go projects. Prerequisites You must have Go installed and GOPATH & GOBIN setup properly You must have angul

Feb 23, 2020

The temporal cloud cli.

tcld (Beta) A cli tool for managing Temporal Cloud namespaces. This cli tool is currently in beta and access to Temporal Cloud via the cli is restrict

Nov 1, 2022

CLI tool to generate preview images from a zmk .keymap file

CLI tool to generate preview images from a zmk .keymap file

ZMK viewer A work in progress Cli tool to generate preview images from a zmk .keymap file. Installation You can download a pre compiled binary directl

Jan 3, 2023
Comments
  • refact: Use v2 CircleCI api for most commands

    refact: Use v2 CircleCI api for most commands

    This uses the v2 api for everything except getting the full output of a job for the cci output command, since this functionality does not exist on v2.

    This allows for a more reliable was of retrieving just the latest pipeline run for cci status. Previously this would display the most recent jobs, but they could span multiple pipelines, resulting in confusing output.

    It also changes how cci retry works. Previously a single job could be retried, but this would run in "legacy" mode and would not show under the new pipelines view of the CircleCI UI. It also would result in confusing status reports back to services like Github. Now cci retry will take a workflow name, and will retry the entire workflow.

    Note that the v2 api documentation seems to indicate that specific jobs can be selected to be retried, however this does not seem to work currently, and the entire workflow is retried regardless of the job ids sent. So for now cci retry will just take a workflow name and retry the entire workflow.

    See: https://circleci.com/docs/2.0/api-developers-guide/ https://circleci.com/docs/api/v2/#operation/listPipelinesForProject https://circleci.com/docs/api/v2/#operation/listWorkflowsByPipelineId https://circleci.com/docs/api/v2/#operation/listWorkflowJobs https://circleci.com/docs/api/v2/#operation/rerunWorkflow


    feat(status): Allow for showing the status of multiple pipelines

    The cci status command now supports a --limit|-l flag that defaults to

    1. This allows for retrieving the status of multiple pipeline executions.
GoLang - Produces a binary suitable for use in shell scripts and cron jobs for rotating IAM credentials.

AWS-Rotate-IAM-Key aws-rotate-iam-key makes it easy to rotate your IAM keys whether they be in your ~/.aws/credentials file or else where. This work i

Feb 9, 2022
generate my_github status using GitHub Actions
generate my_github status using GitHub Actions

generate my_github status using GitHub Actions

Sep 21, 2022
discord rich status for bash

bashcord discord rich presence for bash Installation go get github.com/deletescape/bashcord@latest Setup Put the following into your .bashrc, this mak

Dec 11, 2022
Phalanx is a cloud-native full-text search and indexing server written in Go built on top of Bluge that provides endpoints through gRPC and traditional RESTful API.

Phalanx Phalanx is a cloud-native full-text search and indexing server written in Go built on top of Bluge that provides endpoints through gRPC and tr

Dec 25, 2022
batcher collect a data and flush it if the batch is full or the interval is elapsed.

Batcher batcher collect a data and flush it if the batch is full or the interval is elapsed. Installation go get github.com/gotidy/batcher Examples ba

Jan 6, 2022
Aplicações escaláveis com Go Lang - Full Cycle

Aplicacao Go Lang - FullCycle Aplicações escaláveis com Go Lang - Full Cycle Foi desenvolvido uma aplicação para processamento de uma transação em Go

Dec 22, 2021
customer.io full stack engineer take home project
customer.io full stack engineer take home project

customer.io full stack engineer take home project

Jan 21, 2022
Parse a shell script and output all export declarations in an easy to read format

Find Exports Parse a shell script and output all export declarations in an easy to read format. Usage Example $ findexports ~/.bashrc PATH=$PATH:/usr/

Jan 13, 2022
🏃‍♂️ A new way to execute commands and manipulate command output in Go

??‍♂️ A new way to execute commands and manipulate command output in Go

Nov 11, 2022
Colorize (highlight) `go build` command output
Colorize (highlight) `go build` command output

colorgo colorgo is a wrapper to go command that colorizes output from go build and go test. Installation go get -u github.com/songgao/colorgo Usage c

Dec 18, 2022