Skip to content

Cleanly and concisely display the status of the configured project's branch in Circle CI

Notifications You must be signed in to change notification settings

adamtaylor13/hoop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Logo

Hoop

Hoop is a lightweight CLI for seeing your current project's Circle CI status

About The Project

Example Output

This CLI has a simple purpose: Cleanly and concisely display the status of the configured project's branch in Circle CI

(back to top)

Built With

(back to top)

Getting Started

Prerequisites

You'll just need yarn in order to install dependencies and run the script. Feel free to use npm instead, but I haven't tested anything with npm.

npm install --global yarn

or for OSX

brew install yarn

Installation

  1. Clone the repo
    git clone https://github.com/adamtaylor13/hoop.git
  2. Install yarn packages
    yarn install
  3. Fill out the .env file with pertinent info
     CIRCLE_API_TOKEN=token
     REPO_PATH=path/to/your/repo/hosted/on/circle
     PROJECT_SLUG=github/my-project
     WORKFLOW_NAME=workflow_to_isolate

CIRCLE_API_TOKEN: This is the API token used to communicate with Circle CI

REPO_PATH: The absolute path on your local machine, to the repository you want to track on Circle CI.

PROJECT_SLUG: The slug used by Circle to uniquely identify your project's pipelines and workflows. It will be part of the URL.

WORKFLOW_NAME: The workflow to track in Circle. Eventually this may support tracking the entire pipeline for each commit, but for now my use-case is only watching a specific workflow (the "testing" workflow) and watching that every individual test job succeeds within that specific workflow.

(back to top)

Usage

To run the project, simply run yarn start, and Ctrl-C when you wish to end the loop. In the future, there may be support to define when the loop should end, but for now it's for monitoring, and to that end, there's no reason for it.

The goal behind this project is to easily monitor your CircleCI pipeline's status as you push / modify your branch.

Comand line arguments

--pipelineIndex=N

This arg defines some index (N) to look backwards for pipelines. For example, if you're running your current pipeline, but want to see which tests failed on the previous pipeline's run, you can run:

yarn start --pipelineIndex=1

This will run the 2nd most recent pipeline.

Tips & Tricks

You can further extend this by leveraging a bash script to access this script from any location on your system. For example, I use the following function source'd into my bash_profile:

function hoop() {
    startingPath=$(pwd)
    debug "Starting at: ${startingPath}"
    cd ~/path/to/hoop
    yarn start --pipelineIndex="${1}"
    debug "Navigating back to ${startingPath}"
    cd "${startingPath}"
}

(back to top)

Roadmap

  • Add tests
    • 100% Test Coverage Goal
  • Use Blessed in order to provide a more beautified experience
  • Provide better error messaging & recovery options
  • Allow this package to be installed / run globally so that it can work for any given repo without additional configuration

(back to top)

About

Cleanly and concisely display the status of the configured project's branch in Circle CI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published