Giter Site home page Giter Site logo

faas-cloud-badge's Introduction

of_badge_gen - status badge for opendfaas-cloud

OpenFaaS

About

of_badge_gen is a faas function to generate status badge for function deployed in opendfaas-cloud

badge status
success Successfully Deployed
pending Pending to Deploy
failure Failed to Deploy
Unknown Internal Issue / Unknown

Quick start

./deploy.sh

faas-cli need to be installed

Deploying in your openfaas-cloud

  1. Fork this repo
  2. Install your openfaas-cloud github app on the forked repo
  3. Change the customer_url, it should be same that is used for openfaas-cloud.
    ย  of_badge_gen use it to validate user
    environment:
       validate_customers: "true"
       customers_url: "https://raw.githubusercontent.com/openfaas/openfaas-cloud/master/CUSTOMERS"
    
  4. Use the badge for a repo as:
    [![Status](http://your.openfaas.cloud/function/of_badge_gen?user=<repo_user_or_org>&repo=<repo_name>&branch=master)](repo_url)
    

Deploy as a FaaS anywhere

of_badge_gen is not necessarily need to run with openfaas-cloud or need to query openfaas-cloud gateway. It fetch the build status from repo itself using:

https://api.github.com/repos/?user/?repo/commits/?branch/status

and verify if the status generated by an openfaas-cloud

  1. Clone the repo
    git clone https://github.com/s8sg/of_badge_gen.git
  2. Build and deploy using faas-cli
    $ cd faas-cli
    $ faas-cli build -f stack.yml
    $ faas-cli deploy -f stack.yml --gateway http://your.openfaas.gateway
  3. Use the badge in a repo as:
    [![Status](http://your.openfaas.gateway/function/of_badge_gen?user=<repo_user_or_org>&repo=<repo_name>&branch=master)](repo_url)
    

Constraint

  • Repo must be public

faas-cloud-badge's People

Contributors

s8sg avatar

Stargazers

Toan Tran avatar Alex Ellis avatar  avatar

Watchers

James Cloos avatar  avatar  avatar

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.