| 注册
请输入搜索内容

热门搜索

Java Linux MySQL PHP JavaScript Hibernate jQuery Nginx
jopen
8年前发布

一个golang写的部署GitHub上最新代码到服务器上的小工具:GoShip

GoShip是一个golang写的部署GitHub上最新代码到服务器上的小工具。

GoShip SSHes into the machines that you list in ETCD and gets the latest revision from the specified git repository. It then compares that to the latest revision on GitHub and, if they differ, shows a link to the diff as well as a Deploy button. You can then deploy by clicking the button, and will show you the output of the deployment command, as well as save the output, diff, and whether the command succeeded.

一个golang写的部署GitHub上最新代码到服务器上的小工具:GoShip

Installation

  1. Install go development environment
  2. rungo get github.com/gengo/goship
  3. rungo build github.com/gengo/goship

Usage

  1. Export your GitHub API token:

    export GITHUB_API_TOKEN="your-organization-github-token-here"
  2. Github Omniauth Integration:

    Users who are collaborator on a repo can 'see' that repo in Goship. You must create a developer application to use omniauth. If you do NOT add the appropriate env keys below AUTH will be OFF I.E. Please be careful and check the logs. Please note the "Authorization callback URL" should match your site i.e.http://<your-url-and-port>/auth/github/callback.

    export GITHUB_RANDOM_HASH_KEY="some-random-hash-here";  export GITHUB_OMNI_AUTH_ID="github-application-id";  export GITHUB_OMNI_AUTH_KEY="github-application-key";  export GITHUB_CALLBACK_URL="http://<your-url-and-port>";  // must match that given to Github! Would be 127.0.0.1:port for testing

    If authentication is 'turned on', organization 'team' members who are collaborators and exclusively on a 'pull' only team will be able to see a repo, however the deploy button will be diasbled for them.

  3. Create an etcd server

    1. Follow the instructions in the etcd README
    2. Write configurations in YAML.
    3. Store the configuration into etcd withgoshipcfgin tools
      • You can also directly access to etcd entries for small amount of change.
        • etcd exposes a single set of APIs. [reference]. There are many tools to call the APIs, e.g. etcdctl.
    </li> </ol>

    项目主页:http://www.open-open.com/lib/view/home/1447653914322

 本文由用户 jopen 自行上传分享,仅供网友学习交流。所有权归原作者,若您的权利被侵害,请联系管理员。
 转载本站原创文章,请注明出处,并保留原始链接、图片水印。
 本站是一个以用户分享为主的开源技术平台,欢迎各类分享!
 本文地址:https://www.open-open.com/lib/view/open1447653914322.html
GoShip Git 版本控制系统