Giter Site home page Giter Site logo

nbedos / cistern Goto Github PK

View Code? Open in Web Editor NEW
171.0 6.0 12.0 1.03 MB

A terminal UI for Unix to monitor Continuous Integration pipelines from the command line. Current integrations include GitLab, Azure DevOps, Travis CI, AppVeyor and CircleCI.

License: BSD 3-Clause "New" or "Revised" License

Go 98.30% HTML 1.59% Dockerfile 0.11%
ci cli gitlab travis azure-devops circleci appveyor unix golang tui

cistern's People

Contributors

nbedos avatar supersandro2000 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

cistern's Issues

cistern exits on network failure

I am running cistern on a laptop that goes to standby from time to time. When waking up, it takes some time to recover the network connection (vpn). In these cases, cistern seems to handle this as a critical issue, exiting.

cistern: Provider gitlab-0: monitorPipeline failed with Get https://git.tech.rz.db.de/api/v4/projects/iot-4-infrastructure%2Faim-batch-classification/pipelines/1957061
: read tcp 10.180.97.180:51431->10.104.84.230:443: read: operation timed out (https://git.tech.rz.db.de/iot-4-infrastructure/aim-batch-classification/pipelines/1957061
)

My assumption is that this could be handled differently, as a timeout on a GET is nothing too unusual.

help `?` blows up on osx

cistern 0.2.0dev0-4-g926841b-darwin-amd64
man: invalid option -- l
man, version 1.6c

usage: man [-adfhktwW] [section] [-M path] [-P pager] [-S list]
        [-m system] [-p string] name ...

Support refreshing the view

It'd be nice to have an r (or similar) binding to refresh the call. It seems that once a pipeline is complete, no more requests are sent to update it. This is reasonable, however, if I retry a failed job, citop doesn't show it until I restart it.

Support for private gitlab instance

Hi,

Thanks for your work ! ๐Ÿ’ช

I have a private gitlab and cistern is not able to retrieve the pipeline status.
The remote of my repo is : https://gitlab.xxx.yy/a/long/path/my-repos.git.

I have added some logs in the function Commit() of providers/gitlab.go, the url requested is : https://gitlab.xxx.yy/api/v4/projects/a/long/repository/commits/abcedf
where as, it should be https://gitlab.xxx.yy/api/v4/projects/<id>/repository/commits/abcdef.

The <id> of the project can be retrieved by calling https://gitlab.xxx.yy/api/v4/projects?search=my-repos (<= note that there is no namespace) and extract the id from the json response.

I can help to test and debug. I just don't know where to put this new functionnality.

What do you think ?

unknown repository url with GitLab ssh access

Hi,

this is an awesome tool. Please carry on.

I am in a GitLab repository with a remote like '[email protected]:mygroup/myproject.git'.
When running cistern master or sth. similar, I get a
'cistern: unknown repository url'

When I use -r to explicitly use the https url, cistern will work correctly.

Collapse subtrees on success

Currently if you have a large mutli-step matrix there can be a lot of lines of output. If all the steps of a job complete it would be nice if they could collapse down to just the name of the job so that there are fewer lines and it's easier to see what is still running or failed.

Look up BROWSER in PATH

Using BROWSER=firefox fails, probably because PATH lookup isn't being done for the setting.

GitLab API privileges

Is it really necessary to require a full API privileged GitLab token? I might only want to read the jobs status and logs. For security reasons, it would be nice to use a less privileged token.

Support sorting by column

The default view shows older pipelines first. We have schedules that trigger builds nightly on our CI, so newer builds end up at the bottom of the view right now.

Monitor all remotes of a local repository

From #2 (comment)

Thanks for the quick response. I have a project that exists both on gitlab.com and a private gitlab instance and my local git repo is configured with two remotes pointing to both of them. I am now running citop 0.1.1 and have both [[providers.gitlab]] sections defined in citop.toml. When on a branch that has been pushed to both instances, running citop only shows the gitlab.com pipeline corresponding to the current commit; this persists even when I swap the order of gitlab provider definitions in the config. If I run citop -r url_to_private_gitlab_repo then I see the pipeline corresponding to the current commit on the private gitlab instance.

I expected to see both the gitlab.com and private gitlab instance pipelines when running citop without arguments, do you consider this expected behaviour reasonable?

Currently citop supports monitoring just one repository:

  • When running citop, the repository monitored is the one associated to the remote named origin of the current git repository
  • When running citop -r <URL>, only a single URL is accepted

It would be desirable to monitor all the remotes of a local repository and accept multiple URLs on the command line.

Send alerts to the terminal on events

Probably should be a configuration setting, but making a bell on the terminal when an event happens would be great (I'm using GitLab terminology here, I'm not too worried about naming):

  • pipeline-started
  • pipeline-failed
  • pipeline-completed
  • job-started
  • job-failed
  • job-completed

Support self-hosted Gitlab instances

A number of organizations host their own Gitlab instances rather than use gitlab.com, including both Debian[1] and GNOME[2]. I would like to be able to use citop with multiple Gitlab instances.

It looks like the gitlab provider code in citop does not support a URL field to map a given gitlab provider/API key to a specific instance of gitlab. I would like to see an addition of such a field, so I could define the following providers in citop.toml

[[providers.gitlab]]
name = "gitlab.com"
url = "https://gitlab.com"
token = "myToken"

[[providers.gitlab]]
name = "debian"
url = "https://salsa.debian.org"
token = "myDebianToken"

[[providers.gitlab]]
name = "gnome"
url = "https://gitlab.gnome.org"
token = "myGnomeToken"

Using url as the field name keeps the definition consistent with the existing implementation in the Travis provider.

Let me know if you would prefer this come in as a community contribution, I could have a go at adding support.

[1] https://salsa.debian.org/public
[2] https://gitlab.gnome.org/

Add support for Azure Pipelines

This project is awesome, but we have moved a set of our builds to Azure Pipelines, would be great to add support for that ๐Ÿ˜„

Follow logs

Could we please get logs updated as we view them via 'v'? Like a tail -f.

Perform actions on jobs and pipelines

It'd be nice to be able to restart a job or pipeline from the viewer.

Triggering a new one would also be nice, but is probably more involved (at least for GitLab).

(Thanks for the tool by the way; it's really awesome :) ).

0.1.1 osx binary is an ELF

I don't think that's right

~/Downloads/citop-0.1.1-osx-amd64
โžœ ./citop --help
Failed to execute process './citop'. Reason:
exec: Exec format error
The file './citop' is marked as an executable but could not be run by the operating system.

~/Downloads/citop-0.1.1-osx-amd64
โžœ file citop
citop: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, not stripped

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.