Coder Social home page Coder Social logo

mfojtik / publishing-bot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kubernetes/publishing-bot

0.0 2.0 0.0 11.96 MB

Code behind robot to publish from staging to real repositories.

License: Apache License 2.0

Makefile 1.51% Shell 39.71% Go 57.71% Dockerfile 1.07%

publishing-bot's Introduction

Kubernetes Publishing Bot

Build Status

Overview

The publishing bot publishes the code in k8s.io/kubernetes/staging to their own repositories. It guarantees that the master branches of the published repositories are compatible, i.e., if a user go get a published repository in a clean GOPATH, the repo is guaranteed to work.

It pulls the latest k8s.io/kubernetes changes and runs git filter-branch to distill the commits that affect a staging repo. Then it cherry-picks merged PRs with their feature branch commits to the target repo. It records the SHA1 of the last cherrypicked commits in Kubernetes-sha: <sha> lines in the commit messages.

The robot is also responsible to update the Godeps/Godeps.json and the vendor/ directory for the target repos.

Playbook

Publishing a new repo or a new branch

Testing and deploying the robot

Currently we don't have tests for the bot. It relies on manual tests:

  • Fork the repos you are going the publish.

  • Run hack/fetch-all-latest-and-push.sh from the bot root directory to update the branches of your repos. This will sync your forks with upstream. CAUTION: this might delete data in your forks.

  • Create a config and a corresponding ConfigMap in configs,

  • Create a rule config and a corresponding ConfigMap in configs,

    • by copying configs/example-rules-configmap.yaml,
    • and by changing the Makefile constants in configs/<yourconfig>
    • and the ConfigMap values in configs/<yourconfig>-rules-configmap.yaml.
  • Deploy the publishing bot by running make from the bot root directory, e.g.

$ make build-image push-image CONFIG=configs/<yourconfig>
$ make run CONFIG=configs/<yourconfig> TOKEN=<github-token>

for a fire-and-forget pod. Or use

$ make deploy CONFIG=configs/<yourconfig> TOKEN=<github-token>

to run a ReplicationController that publishes every 24h (you can change the INTERVAL config value for different intervals).

This will not push to your org, but runs in dry-run mode. To run with a push, add DRYRUN=false to your make command line.

Running in Production

  • Use one of the existing configs and
  • launch make deploy CONFIG=configs/kubernetes-nightly

Caution: Make sure that the bot github user CANNOT close arbitrary issues in the upstream repo. Otherwise, github will close, them triggered by Fixes kubernetes/kubernetes#123 patterns in published commits.

Contributing

Please see CONTRIBUTING.md for instructions on how to contribute.

Known issues

  1. Testing: currently we rely on manual testing. We should set up CI for it.
  2. Automate release process (tracked at kubernetes/kubernetes#49011): when kubernetes release, automatic update the configuration of the publishing robot. This probably means that the config must move into the Kubernetes repo, e.g. as a .publishing.yaml file.

publishing-bot's People

Contributors

sttts avatar k8s-ci-robot avatar mfojtik avatar nikhita avatar yue9944882 avatar youhonglian avatar zhouhaibing089 avatar spiffxp avatar adamdang avatar cblecker avatar

Watchers

James Cloos 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.