Git Product home page Git Product logo

githubactionforpr's Introduction

Ghaf Github Pull Request Hydra Builder


Builder for *Ghaf *project [https://github.com/tiiuae/ghaf](URL) Github Pull Requests

Uses Ghaf build tools from https://github.com/tiiuae/ci-public (assumes usage of Ghaf docker based Hydra build system implementation)

Activates Hydra to build new open Pull Requests (for the main repo under observations) or allready built open PRs with new changes

Can be used in service mode (polling frequently repo changes) or cherry picking one open PR for building or just running once here and then

Keeps internal records for build PRs and rebuild changed PRs (building means commanding Hydra to initiate build for given PR branch and getting "ok" from Hydra)

##USAGE

  1. Setup Ghaf Hydra build system (tools&docs in https://github.com/tiiuae/ci-public)

2) Set Hydra env variables HYDRACTL_USERNAME="hydra" and HYDRACTL_PASSWORD="zzzzz"
3) Create tokenfile to include your access token to Ghaf repo
4) Start (one off run) poller execution: python3 PollPr.py (use docker host , tools repo in the host)

Editing "build" information files, one can manipulate which PR number is thought to be build or not

##CONFIGURATIONS (in PollPR.py)

TOKENFILE="tokenfile" # Includes token to access Github repo for these PR observations
TESTREPO='mnokka-unikie/ghaf' # Ghaf repo under PR observations
ORGANIZATION="tiiuae" # required Github organization membership before building PR proceeds
BUILDPRSFILE="pr2_data" # local file to store handled (built) PRs by their Github ID
BUILDCHANGEDPRSFILE="pr2_changed_data" # local file to store builds done for open (but build initially) and changed PRs
HYDRACTL="./hydractl.py" # CLI command location (Ghaf inhouse public tool) to manage Hydra operations
EXT_PORT=3030 # Hybdra port dedicated for the build server (docker will expose this to the host)
**RUNDELAY=1 **# minutes to wait before next execution of this script (in service mode

Commandline

usage: PollPR.py [-h] [-v] [-d dry] [-t verbose] [-s service] [-p cherrypick]

Github PullRequest Hydra builder activator

options:
-h, --help show this help message and exit
-v Check Github open PRs and activate Ghaf Hydra build
-d dry Dry run mode
-t verbose Verbose, talking, mode
-s service Service mode, runtime delays in secs
-p cherrypick Cherry pick PR number, ignore others

Examples

PollPR.py --> run once
PollPr.py -d on --> run once drymode, do not do any changes
PollPr.py -p 42 --> Ask Hydra to build PR42
PollPr.py -s 60 --> run every hour

githubactionforpr's People

Contributors

mnokka-unikie 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.