itamae-plugin-recipe-tig 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -0
- data/Rakefile +1 -1
- data/Vagrantfile +4 -3
- data/ci/build.sh +0 -1
- data/ci/setup.sh +25 -0
- data/lib/itamae/plugin/recipe/tig/default.rb +1 -0
- data/lib/itamae/plugin/recipe/tig/version.rb +1 -1
- data/wercker.yml +31 -55
- metadata +4 -3
- data/ci/destroy_old_droplets.rb +0 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c7673c8e3e6c70072cdec859431ee4af8fbb8a2e
|
4
|
+
data.tar.gz: f764d3884f3670175b9848c0fff5e897f496a6da
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fbf4e4533be2024f6dd6ddd12ac898073aa97b5463cfd8d9c51298759946637dc7b8221a3821e6a9a84f60a393fdaa0971f0f475e90c2a881dafeafc7fd91da8
|
7
|
+
data.tar.gz: 6381bbc7331a08197d139958101b25b038c63c5d5491aab92d9116236cc681a1cd20c154cb42d8023d3be85b799f7bdb749696b381550ab2929635f7b3ceee27
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
# Change Log
|
2
|
+
|
3
|
+
## [v0.1.1](https://github.com/sue445/itamae-plugin-recipe-tig/tree/v0.1.1) (2016/03/06)
|
4
|
+
[Full Changelog](https://github.com/sue445/itamae-plugin-recipe-tig/compare/v0.1.0...v0.1.1)
|
5
|
+
|
6
|
+
**Merged pull requests:**
|
7
|
+
|
8
|
+
- Install make [\#4](https://github.com/sue445/itamae-plugin-recipe-tig/pull/4) ([sue445](https://github.com/sue445))
|
9
|
+
- Install automake [\#3](https://github.com/sue445/itamae-plugin-recipe-tig/pull/3) ([sue445](https://github.com/sue445))
|
10
|
+
- Setup CI [\#2](https://github.com/sue445/itamae-plugin-recipe-tig/pull/2) ([sue445](https://github.com/sue445))
|
11
|
+
- Install gcc [\#1](https://github.com/sue445/itamae-plugin-recipe-tig/pull/1) ([sue445](https://github.com/sue445))
|
12
|
+
|
13
|
+
## [v0.1.0](https://github.com/sue445/itamae-plugin-recipe-tig/tree/v0.1.0) (2015/12/15)
|
14
|
+
|
15
|
+
|
16
|
+
\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
|
data/Rakefile
CHANGED
@@ -23,7 +23,7 @@ namespace :itamae do
|
|
23
23
|
HOSTS.each do |host|
|
24
24
|
desc "Running itamae to #{host}"
|
25
25
|
task host do
|
26
|
-
sh "
|
26
|
+
sh "itamae ssh --host=#{host} --vagrant --node-yaml=recipes/node.yml recipes/install.rb"
|
27
27
|
end
|
28
28
|
end
|
29
29
|
end
|
data/Vagrantfile
CHANGED
@@ -10,12 +10,13 @@ Vagrant.configure(2) do |config|
|
|
10
10
|
override.vm.box = "digital_ocean"
|
11
11
|
override.vm.box_url = "https://github.com/smdahlen/vagrant-digitalocean/raw/master/box/digital_ocean.box"
|
12
12
|
provider.token = ENV["DIGITALOCEAN_ACCESS_TOKEN"]
|
13
|
-
provider.region = "
|
13
|
+
provider.region = "nyc3"
|
14
14
|
provider.size = "512MB"
|
15
15
|
|
16
16
|
if ENV["WERCKER"] == "true"
|
17
17
|
provider.ssh_key_name = "wercker-#{ENV['WERCKER_GIT_REPOSITORY']}"
|
18
18
|
override.ssh.private_key_path = "~/.ssh/id_rsa.vagrant"
|
19
|
+
override.vm.synced_folder ".", "/vagrant", disabled: true
|
19
20
|
else
|
20
21
|
provider.ssh_key_name = "local"
|
21
22
|
override.ssh.private_key_path = "~/.ssh/id_rsa"
|
@@ -27,7 +28,7 @@ Vagrant.configure(2) do |config|
|
|
27
28
|
c.vm.provider :digital_ocean do |provider, override|
|
28
29
|
provider.image = "centos-7-0-x64"
|
29
30
|
end
|
30
|
-
c.vm.hostname = 'itamae-centos70'
|
31
|
+
c.vm.hostname = 'itamae-tig-centos70'
|
31
32
|
c.vm.hostname += "-#{ENV['WERCKER_BUILD_ID']}" if ENV['WERCKER_BUILD_ID']
|
32
33
|
end
|
33
34
|
|
@@ -36,7 +37,7 @@ Vagrant.configure(2) do |config|
|
|
36
37
|
c.vm.provider :digital_ocean do |provider, override|
|
37
38
|
provider.image = "debian-8-x64"
|
38
39
|
end
|
39
|
-
c.vm.hostname = 'itamae-debian8'
|
40
|
+
c.vm.hostname = 'itamae-tig-debian8'
|
40
41
|
c.vm.hostname += "-#{ENV['WERCKER_BUILD_ID']}" if ENV['WERCKER_BUILD_ID']
|
41
42
|
end
|
42
43
|
|
data/ci/build.sh
CHANGED
data/ci/setup.sh
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
#!/bin/bash -xe
|
2
|
+
|
3
|
+
wget https://releases.hashicorp.com/vagrant/1.8.4/vagrant_1.8.4_x86_64.rpm
|
4
|
+
rpm -i vagrant_1.8.4_x86_64.rpm
|
5
|
+
vagrant plugin install vagrant-digitalocean
|
6
|
+
|
7
|
+
# NOTE: vagrant v1.8.4 depends on bundler v1.12.5
|
8
|
+
# https://github.com/mitchellh/vagrant/blob/v1.8.4/vagrant.gemspec#L23
|
9
|
+
gem uninstall bundler --all --force
|
10
|
+
gem install bundler -v 1.12.5 --no-document
|
11
|
+
|
12
|
+
|
13
|
+
mkdir -m 700 -p $HOME/.ssh
|
14
|
+
|
15
|
+
#########################
|
16
|
+
# put ssh keys
|
17
|
+
set +x
|
18
|
+
|
19
|
+
echo -e "$DIGITALOCEAN_KEY_PRIVATE" > $HOME/.ssh/id_rsa.vagrant
|
20
|
+
echo -e "$DIGITALOCEAN_KEY_PUBLIC" > $HOME/.ssh/id_rsa.vagrant.pub
|
21
|
+
|
22
|
+
set -x
|
23
|
+
#########################
|
24
|
+
|
25
|
+
chmod 600 $HOME/.ssh/id_rsa.vagrant
|
data/wercker.yml
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
# https://registry.hub.docker.com/_/ruby/
|
4
4
|
# If you want to use a specific version you would use a tag:
|
5
5
|
# ruby:2.2.2
|
6
|
-
box:
|
6
|
+
box: drecom/centos-ruby:2.3.1
|
7
7
|
# You can also use services such as databases. Read more on our dev center:
|
8
8
|
# http://devcenter.wercker.com/docs/services/index.html
|
9
9
|
# services:
|
@@ -13,72 +13,48 @@ box: sue445/rvm-vagrant-digitalocean@1.0.0
|
|
13
13
|
# - mongodb
|
14
14
|
# http://devcenter.wercker.com/docs/services/mongodb.html
|
15
15
|
|
16
|
-
|
17
|
-
|
18
|
-
# http://devcenter.wercker.com/docs/pipelines/index.html
|
19
|
-
build:
|
20
|
-
# Steps make up the actions in your pipeline
|
21
|
-
# Read more about steps on our dev center:
|
22
|
-
# http://devcenter.wercker.com/docs/steps/index.html
|
23
|
-
steps:
|
24
|
-
- rvm-use:
|
25
|
-
version: 2.3.0
|
26
|
-
|
27
|
-
- script:
|
28
|
-
name: install bundler
|
29
|
-
code: gem install bundler -v 1.10.6
|
30
|
-
|
31
|
-
- bundle-install:
|
32
|
-
jobs: 4
|
33
|
-
|
16
|
+
default: &default
|
17
|
+
after-steps:
|
34
18
|
- script:
|
35
|
-
name:
|
19
|
+
name: set variables
|
36
20
|
code: |
|
37
|
-
|
38
|
-
|
39
|
-
echo -p "gem list: $(gem list)"
|
40
|
-
|
21
|
+
# NOTE: override .ruby-version in pretty-slack-notify
|
22
|
+
export RBENV_VERSION=2.3.1
|
41
23
|
- script:
|
42
|
-
name:
|
43
|
-
code:
|
24
|
+
name: remove all vms
|
25
|
+
code: vagrant destroy -f
|
44
26
|
|
45
|
-
-
|
46
|
-
|
47
|
-
|
48
|
-
overwrite: true
|
49
|
-
hide-from-log: true
|
50
|
-
content: $DIGITALOCEAN_KEY_PRIVATE
|
27
|
+
- wantedly/pretty-slack-notify:
|
28
|
+
webhook_url: $SLACK_WEBHOOK_URL
|
29
|
+
username: wercker_build
|
51
30
|
|
52
|
-
|
53
|
-
|
54
|
-
filename: $HOME/.ssh/id_rsa.vagrant.pub
|
55
|
-
overwrite: true
|
56
|
-
hide-from-log: true
|
57
|
-
content: $DIGITALOCEAN_KEY_PUBLIC
|
31
|
+
build:
|
32
|
+
steps:
|
58
33
|
|
34
|
+
build-centos70:
|
35
|
+
<<: *default
|
36
|
+
steps:
|
59
37
|
- script:
|
60
|
-
name:
|
61
|
-
code:
|
38
|
+
name: setup
|
39
|
+
code: ./ci/setup.sh
|
40
|
+
|
41
|
+
- bundle-install:
|
42
|
+
jobs: 4
|
62
43
|
|
63
44
|
- script:
|
64
|
-
name:
|
45
|
+
name: build CentOS 7.0
|
65
46
|
code: ./ci/build.sh centos70
|
66
47
|
|
48
|
+
build-debian8:
|
49
|
+
<<: *default
|
50
|
+
steps:
|
67
51
|
- script:
|
68
|
-
name:
|
69
|
-
code: ./ci/
|
52
|
+
name: setup
|
53
|
+
code: ./ci/setup.sh
|
70
54
|
|
71
|
-
|
72
|
-
|
73
|
-
name: shutdown all vms
|
74
|
-
code: |
|
75
|
-
vagrant destroy -f centos70
|
76
|
-
vagrant destroy -f debian8
|
55
|
+
- bundle-install:
|
56
|
+
jobs: 4
|
77
57
|
|
78
58
|
- script:
|
79
|
-
name:
|
80
|
-
code:
|
81
|
-
|
82
|
-
- wantedly/pretty-slack-notify:
|
83
|
-
webhook_url: $SLACK_WEBHOOK_URL
|
84
|
-
username: wercker_build
|
59
|
+
name: build Debian 8
|
60
|
+
code: ./ci/build.sh debian8
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: itamae-plugin-recipe-tig
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- sue445
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-09-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: itamae
|
@@ -76,6 +76,7 @@ files:
|
|
76
76
|
- ".github_changelog_generator"
|
77
77
|
- ".gitignore"
|
78
78
|
- ".rspec"
|
79
|
+
- CHANGELOG.md
|
79
80
|
- Gemfile
|
80
81
|
- LICENSE.txt
|
81
82
|
- README.md
|
@@ -84,7 +85,7 @@ files:
|
|
84
85
|
- bin/console
|
85
86
|
- bin/setup
|
86
87
|
- ci/build.sh
|
87
|
-
- ci/
|
88
|
+
- ci/setup.sh
|
88
89
|
- itamae-plugin-recipe-tig.gemspec
|
89
90
|
- lib/itamae/plugin/recipe/tig.rb
|
90
91
|
- lib/itamae/plugin/recipe/tig/default.rb
|
data/ci/destroy_old_droplets.rb
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
# via. https://github.com/itamae-kitchen/itamae/blob/v1.9.3/ci/destroy_old_droplets.rb
|
2
|
-
require 'net/https'
|
3
|
-
require 'json'
|
4
|
-
require 'time'
|
5
|
-
|
6
|
-
http = Net::HTTP.new("api.digitalocean.com", 443)
|
7
|
-
http.use_ssl = true
|
8
|
-
|
9
|
-
res = http.start do
|
10
|
-
http.get("/v2/droplets", "Authorization" => "Bearer #{ENV['DIGITALOCEAN_ACCESS_TOKEN']}")
|
11
|
-
end
|
12
|
-
|
13
|
-
droplets = JSON.parse(res.body)['droplets']
|
14
|
-
droplets.each do |droplet|
|
15
|
-
next unless /^itamae-/ =~ droplet['name']
|
16
|
-
if Time.now - Time.parse(droplet['created_at']) >= 60 * 60
|
17
|
-
puts "destroying #{droplet}..."
|
18
|
-
res = http.start do
|
19
|
-
http.delete("/v2/droplets/#{droplet['id']}", "Authorization" => "Bearer #{ENV['DIGITALOCEAN_ACCESS_TOKEN']}")
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|