Git Product home page Git Product logo

go-deploy's Introduction

onboarding Archived Repository
The code of this repository was written during a Marmelab agile integration. It illustrates the efforts of a new hiree, who had to implement a board game in several languages and platforms as part of his initial learning. Some of these efforts end up in failure, but failure is part of our learning process, so the code remains publicly visible.
This code is not intended to be used in production, and is not maintained.

Deployed PR

Deployed PR is a webservice used to create a comment on all pull requests contained on a deployment to a given target.
The idea is that when deploying project, the deployment tool used should launch a request to Deployed PR (DPR for the next), indicating the branch or tag deployed, the URL of the github repository and the deployment target (prod, preprod, dev โ€ฆ).
Then DPR will identify all the PR merged on the deployed code (since the last deploy), and automatically write a new comment on github PR, indicating that this PR has been deployed and on which target.
The goal is to help developers to more easily identify which code is deployed, and where.

Install

Project depends on some packages (mainly about github api)

make install

Configure

You must configure the project on which you want to test DPR. For that, you have to copy config.json-dist to config.json. When it's done, you must add informations about :

  • Owner: the github username of the project owner
  • Repository: the repository name of the project for which you wish to comment deployed PR
  • AccessToken: a personnal access token (generate on github Settings>Application). This access token is required to access private projects, but mostly to add comments

You can add as many projects as you want to test

Use DPR

First, you have to launch server :

go run main.go

Then, you should make a POST request at http://localhost:8080 with Content-Type set to "application/json" with a json file formated as :

{
    "Owner":"the github username of the project (which must therefore be in config.yml)", 
    "Repo": "the repository name of the project that is deployed (which must also be in config.yml)", 
    "BaseType": "the type of "marker" deployment : branch or tag (Tag doesn't work for the moment!)", 
    "BaseName": "the name of the branch or tag. Ex: master, preprod, v1 ...", 
    "Target": "name of the target (server) on which the code is deployed"
}

CAUTION !!! This is a POC

The project is just started, and still in really beta. For example, there is no history for comments, so the same PR will be commented as many times you will call the webservice with identical parameters.
Also, there is no historical for deployments, so all PR are concerned, not only these which have been merged between two deployments (but it will soon be the case !).

go-deploy's People

Contributors

alexisjanvier avatar fzaninotto avatar

Watchers

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

go-deploy's Issues

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.