bgb 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +47 -22
- data/lib/bgb.rb +2 -1
- data/lib/bgb/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7c967405180868e5929bb256503fb30134eed456
|
4
|
+
data.tar.gz: dfde614fe9bc137b82feaf55ed00dac19c9691d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 411c069f967c7bcb5d99be67f5748cb66260c2aa2c7c1a8e026b9612dc2d68f0fcc737267cae6e36c209f06e2a412a019fc79377a254cd8ba2fb9c87d72e0625
|
7
|
+
data.tar.gz: 59e7633b38da95e13058941e8dab937253bc89df6abbd00c0b850fa5e3aba02e144c8715b76b3a0257597c19ce7c9d074adba2ff64240e3d167212c0e88d9e5e
|
data/README.md
CHANGED
@@ -1,36 +1,61 @@
|
|
1
|
-
#
|
1
|
+
# BGB(BODN GATE Build)
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
3
|
+
BGBはBOND GATEのDockerイメージのビルドを行うためのツールです。設定ファイルをymlで定義することで簡単にビルドおよびECRへの登録を行うことができます。
|
6
4
|
|
7
5
|
## Installation
|
8
6
|
|
9
|
-
|
10
|
-
|
11
|
-
```ruby
|
12
|
-
gem 'bgb'
|
13
|
-
```
|
14
|
-
|
15
|
-
And then execute:
|
16
|
-
|
17
|
-
$ bundle
|
18
|
-
|
19
|
-
Or install it yourself as:
|
7
|
+
install it yourself as:
|
20
8
|
|
21
9
|
$ gem install bgb
|
22
10
|
|
23
|
-
##
|
11
|
+
## 使用法
|
12
|
+
### 環境設定
|
13
|
+
* Macを利用することを想定しています。
|
14
|
+
* docker for Macをインストールします。
|
15
|
+
* aws cliをインストールし[環境変数](http://qiita.com/n-oshiro/items/4a7774ee6e1d11bb55d2)を設定しておいてください。
|
16
|
+
* 次のコマンドでECRへログインできること確認しておいて下さい。
|
24
17
|
|
25
|
-
|
18
|
+
```
|
19
|
+
$ `aws ecr get-login --region ap-northeast-1 --no-include-email`
|
20
|
+
```
|
26
21
|
|
27
|
-
|
22
|
+
### 設定ファイルの準備
|
23
|
+
* build.yml
|
24
|
+
|
25
|
+
```yaml
|
26
|
+
docker_repos:
|
27
|
+
uri: bitbucket.org/rhizome/docker_bondgate.git
|
28
|
+
token: (bitbucketのアプリ パスワード)
|
29
|
+
user: (bitbucketのユーザー名)
|
30
|
+
ecs:
|
31
|
+
docker_image: bondgate-docker
|
32
|
+
ecr: 949635643307.dkr.ecr.ap-northeast-1.amazonaws.com
|
33
|
+
docker_tag: (dockerイメージに付けるタグ 例:rhizome-2520-20170623)
|
34
|
+
build_ops:
|
35
|
+
github_token: (githubのトークン)
|
36
|
+
git_branch: (ビルド対象ブランチ 例:release-2.5.0.0)
|
37
|
+
project: (省略可。rake config:mergeで指定するPROJECT)
|
38
|
+
inherited: (省略可。rake config:mergeで指定するINHERITED)
|
39
|
+
unicorn_worker: (省略可。Unicornのワーカー数。デフォルト1)
|
40
|
+
max_request_min: (省略可。デフォルト3000)
|
41
|
+
max_request_max: (省略可。デフォルト4000)
|
42
|
+
```
|
28
43
|
|
29
|
-
|
44
|
+
### ビルド実行
|
45
|
+
* buildオプションを指定して実行
|
30
46
|
|
31
|
-
|
47
|
+
```
|
48
|
+
$ bgb build
|
49
|
+
```
|
32
50
|
|
33
|
-
|
51
|
+
* 設定ファイルを指定して実行
|
34
52
|
|
35
|
-
|
53
|
+
```
|
54
|
+
$ bgb -f build.yml
|
55
|
+
```
|
56
|
+
|
57
|
+
### ECRのイメージ一覧
|
58
|
+
```
|
59
|
+
$ bgb images
|
36
60
|
|
61
|
+
```
|
data/lib/bgb.rb
CHANGED
@@ -2,6 +2,7 @@ require "bgb/version"
|
|
2
2
|
require 'thor'
|
3
3
|
require 'yaml'
|
4
4
|
require 'json'
|
5
|
+
require 'tmpdir'
|
5
6
|
|
6
7
|
module Bgb
|
7
8
|
class CLI < Thor
|
@@ -41,7 +42,7 @@ module Bgb
|
|
41
42
|
|
42
43
|
# ECRにログイン
|
43
44
|
def login
|
44
|
-
system("`aws ecr get-login --region ap-northeast-1`")
|
45
|
+
system("`aws ecr get-login --region ap-northeast-1 --no-include-email`")
|
45
46
|
end
|
46
47
|
|
47
48
|
# ワークディレクトリにdocker_bondgateをpull
|
data/lib/bgb/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bgb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kazuhisa Yamamoto
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-06
|
11
|
+
date: 2017-10-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -105,7 +105,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
105
105
|
version: '0'
|
106
106
|
requirements: []
|
107
107
|
rubyforge_project:
|
108
|
-
rubygems_version: 2.
|
108
|
+
rubygems_version: 2.6.11
|
109
109
|
signing_key:
|
110
110
|
specification_version: 4
|
111
111
|
summary: The tool for building and pushing the Docker image.
|