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.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +47 -22
  3. data/lib/bgb.rb +2 -1
  4. data/lib/bgb/version.rb +1 -1
  5. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 79670c892f618fe782d6bc4042c8e2c56a1e3fc4
4
- data.tar.gz: 1df922d863be88463b3a28f224ec4a35b3a3cdcb
3
+ metadata.gz: 7c967405180868e5929bb256503fb30134eed456
4
+ data.tar.gz: dfde614fe9bc137b82feaf55ed00dac19c9691d8
5
5
  SHA512:
6
- metadata.gz: b6405fb98f0c2662bf720254f4effa356b8abfd3a67a61aa2004817d0ee7d799097ae90697a772faab0ae5cf5b345880c3234789e057c4843b2d9a274c0ef414
7
- data.tar.gz: dcac616838e76d7315975d0503e29e9afb783503284f31ef7a5d280858632afc911c63d5c3ee0a84e72a8043548b06bec3483c22d71442b330ba397bcba5d910
6
+ metadata.gz: 411c069f967c7bcb5d99be67f5748cb66260c2aa2c7c1a8e026b9612dc2d68f0fcc737267cae6e36c209f06e2a412a019fc79377a254cd8ba2fb9c87d72e0625
7
+ data.tar.gz: 59e7633b38da95e13058941e8dab937253bc89df6abbd00c0b850fa5e3aba02e144c8715b76b3a0257597c19ce7c9d074adba2ff64240e3d167212c0e88d9e5e
data/README.md CHANGED
@@ -1,36 +1,61 @@
1
- # Bgb
1
+ # BGB(BODN GATE Build)
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/bgb`. To experiment with that code, run `bin/console` for an interactive prompt.
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
- Add this line to your application's Gemfile:
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
- ## Usage
11
+ ## 使用法
12
+ ### 環境設定
13
+ * Macを利用することを想定しています。
14
+ * docker for Macをインストールします。
15
+ * aws cliをインストールし[環境変数](http://qiita.com/n-oshiro/items/4a7774ee6e1d11bb55d2)を設定しておいてください。
16
+ * 次のコマンドでECRへログインできること確認しておいて下さい。
24
17
 
25
- TODO: Write usage instructions here
18
+ ```
19
+ $ `aws ecr get-login --region ap-northeast-1 --no-include-email`
20
+ ```
26
21
 
27
- ## Development
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
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
44
+ ### ビルド実行
45
+ * buildオプションを指定して実行
30
46
 
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
47
+ ```
48
+ $ bgb build
49
+ ```
32
50
 
33
- ## Contributing
51
+ * 設定ファイルを指定して実行
34
52
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/bgb.
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
@@ -1,3 +1,3 @@
1
1
  module Bgb
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
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.0
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-23 00:00:00.000000000 Z
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.5.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.