Giter Site home page Giter Site logo

l7r7 / gitlab-ci-build-statuses Goto Github PK

View Code? Open in Web Editor NEW
10.0 10.0 0.0 674 KB

Get the statuses of the CI pipelines in a group in Gitlab CI and display them on an HTML page

License: Apache License 2.0

Dockerfile 0.54% Haskell 96.64% CSS 2.49% JavaScript 0.33%
ci-pipelines docker gitlab-api gitlab-ci haskell

gitlab-ci-build-statuses's People

Contributors

dependabot[bot] avatar l7r7 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

gitlab-ci-build-statuses's Issues

Fetch the build statuses for the project's default branch instead of master

Right now, the build statuses that are shown represent the status of the latest pipeline of the master branch.
This should be more flexible. The simplest way to do that is probably to take the project's default branch (which is included in the API response for a single project) for determining the pipeline status

App shouldn't be healthy if the thread for updating the build statuses dies

The app is updating the build statuses in a separate thread than the thread the HTTP service is served from.
Since the health endpoint will always return 200 OK, the app appears to be healthy as long as the web server is up and running. This means that if the thread for updating the statuses dies for some reason, the app will keep running with stale information.

To reflect this, the app should indicate that something is wrong when any of the threads are not running anymore

UI rehaul

Right now the UI is everything but fancy, but with my limited CSS skills it was the only way I found that fulfills all my requirements.

Requirements for the UI

  • Basically, I'm looking for a layout with tiles that are squares
  • Instead of resizing the tiles, the tiles should be rearranged on different rows and columns if possible (that's something I quite like about the current solution)
  • The whole tile should be clickable, not only the text
  • The page title (and maybe the favicon) could represent a summary of the build statuses (for example the UTF-8 checkmark when all pipelines are green or the number of broken pipelines if there are any)

Some ideas that sound good to me

  • I'd like to have a bootstrap based UI. I kinda like the cards that it offers: https://getbootstrap.com/docs/4.0/components/card/
  • I definitely prefer a very simple UI that ideally doesn't need any JS. Maybe it makes sense to add something that reloads the data regularly, but for now I found a JS-free way that works
  • It would be nice to have some kind of footer at the bottom that contains metadata, like the timestamp of the last update

Add a proper release concept

At the moment, the CI pipeline builds an image for every push to master. I think it would make sense to introduce a proper release cycle, where:

  • every push to master is built, on a successful build a docker image is built and tagged with latest
  • in addition to that, there should be regular releases that are stable, and where it's also clear which features got added

This is probably related to #5

Restructure the data storage

At the moment, the app's state is stored as a tuple (Maybe UTCTime, [Result]) inside an IORef, where:

  • The first part stores the timestamp of the last successful update
  • The second part stores the latest results

The timestamp is wrapped inside a Maybe to reflect that there might be no successful update yet, in which case the list of results should be empty. Although this hasn't too much impact, the invariant could be encoded more clearly: If there was no update yet, there is neither an timestamp nor a list of results.

The UI also should indicate whether there was no successful update yet or whether the are no results

Don't use network_mode: host in docker-compose

The docker-compose example uses network_mode: host multiple times and the different applications want to bind to all kinds of ports then. In an environment that already has many containers running this can produce many conflicts. It would be better if it was setup with docker networks and only had to use host ports which are actually required (e.g. the 8282 port binding for the actual app.)

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.