Code Monkey home page Code Monkey logo

dockerhub-build-status-image's Introduction

dockerhub-build-status-image


https://dockerbuildbadges.quelltext.eu/status.svg?organization=niccokunzmann&repository=dockerhub-build-status-image

Show status badges of your dockerhub automated build in your README.md (like those for travis).

As soon as an image is here , it can be used from shields.io.

Architecture

  • SVG image
    • Pulls JS file
      • JS file includes list of status servers (since dockerhub does not allow crossorigin requests)
  • Status servers
    • Form
      • A python package
      • A docker container (to use the badge :) )
      • A heroku deploy
    • May serve the svg file but better if they do not. To provide more fault tolerance, see the JS file

API

Server

  • GET /build/<organnization>/<repository>
    GET /build/<organnization>/<repository>?tag=<tag>
    Get the build status of an automated build.

    • organization is the dockerhub organization. Examples: library and mariobehling
    • repository is the repository in this organization. Examples: nginx and loklak
    • tag is optional, it is latest by default. Examples: latest

    Headers:

    • Access-Control-Allow-Origin: *

    Result:

    • In case the request had an error:
      {"request":"error","description":<text>}
      Where text is the error description.
    • In case all went fine:
      {"request":"ok", status:<build status>}
      The build status is
      • Negative for an error. Example: -1
      • Positive for success. Example: 1
      • It gets taken like from this example
  • GET /source
    Get the source code.

  • GET /status.svg
    See status.svg

status.svg

Parameters:

  • organization is the name of the dockerhub organization. If it is left out, the name will be library.
  • repository is the name of the repository. This must be given.
  • tag is the name of the tag to use. If it is left out, the tag will be latest.
  • text is the text to show on the badge. If it is left out, the text will be Docker.

Examples:

Badge Servers

You can contribute a badge server to this list here and in status.js:

Contribute

As said, you can contribute a server or write your own. The API is open. Contribute by solving issues. I created the most basic version. Have a look and show this project some love and improve it <3

Keywords

  • Status images for dockerhub automated builds
  • Build status badge for docker images
  • SVG badges

Reading


The repository is maintained at https://github.com/niccokunzmann/dockerhub-build-status-image/

dockerhub-build-status-image's People

Contributors

imshashwataggarwal avatar jellyrolljunior avatar niccokunzmann avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

dockerhub-build-status-image's Issues

add multithreading

There are ways to multithread a bottle server.
This will allow us to serve and request at the same time.

Add fault tolerance

There can be several servers serving an image.
We can add a parameter that the image is shown only if a server is not available.
This way, we can put several images next to each other and only the first available is taken.

Route "/" should show something useful

The / should show something to the user, not an error.

  • link to this repository
  • explain shortly what this is about
  • embed an example
  • Let the user download the source code of the server

add a @get("/") to the Python server source code to serve this html content.

Add link to source code

In order to allow people viewing this to contribute back, there should be a link in the files they see.
There are different ways to add links to these files:

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.