GithubHelp home page GithubHelp logo

travis-build-history-badges's Introduction

Bugs Maintainability Coverage Status Build Status Build History

Generates badges for Travis build histories. For example, the little red and/or green bar chart above this text. :)

Setup for your own Github project

Prerequisites

  1. a public Github repo
  2. Travis CI set up with your Github repo
  3. Travis command-line tool
    • gem install travis (Ruby is a prereq, obviously)

(If the two types of tokens are confusing, read Travis's blog post about them.)

Travis/Github Authentication

Say your Github repo is at https://github.com/MyUsername/my-repo.

  1. Generate a Github personal access token:

  2. Generate a Travis token from your Github token:

    • travis login --github-token <personal-access-token>
    • travis token
    • note the token — you will only get to see it once!

Travis Build Settings

Say your Travis build is at https://travis-ci.org/MyUsername/my-repo.

  1. Go to your Travis build's settings at https://travis-ci.org/MyUsername/my-repo/settings.

  2. Scroll down to the "Environment Variables" section.

  3. Add a new TRAVIS_ACCESS_TOKEN variable, with the Travis token you generated at the end of the authentication instructions above.

Set the following environment variables:

  • TRAVIS_ACCESS_TOKEN (obtained via command-line travis login && travis token)
  • SCP_PASSWORD

Create a config.yml file:

travis:
  owner: MyGithubUsername

upload:
  host: my-image-host-server.example.com
  dir: images/public/travis-build-badges
  username: MyScpUsername

Then run the script to generate images for all your active builds:

ruby travis-build-history-badges.rb

You can restrict which builds to generate images for by specifying a whitelist of repo names:

travis:
  owner: MyGithubUsername
  repos:
     - foo
     - bar

Available environment variables:

  • TRAVIS_ACCESS_TOKEN
  • SCP_USERNAME
  • SCP_PASSWORD
  • SCP_HOST
  • SCP_DIR

travis-build-history-badges's People

Contributors

arthaey avatar

Watchers

Ciemarr Software 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.