construi 0.29.0 → 0.30.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +2 -1
- data/construi.yml +5 -30
- data/construi/deploy/script.sh +17 -0
- data/construi/release/script.sh +22 -0
- data/lib/construi.rb +1 -1
- data/lib/construi/config.rb +6 -2
- data/lib/construi/container.rb +1 -1
- data/lib/construi/version.rb +1 -1
- data/spec/lib/config_spec.rb +27 -0
- data/spec/spec_helper.rb +11 -2
- metadata +8 -4
data/README.md
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
# Construi
|
2
2
|
|
3
|
-
[![Gem](https://img.shields.io/gem/v/construi.svg?style=plastic)](https://rubygems.org/gems/construi) [![
|
3
|
+
[![Gem](https://img.shields.io/gem/v/construi.svg?style=plastic)](https://rubygems.org/gems/construi) [![Build Status](http://jenkins.mylonelybear.org/buildStatus/icon?job=construi-develop)](http://jenkins.mylonelybear.org/job/construi-develop/)
|
4
|
+
[![Code Climate](https://img.shields.io/codeclimate/github/lstephen/construi.svg?style=plastic)](https://codeclimate.com/github/lstephen/construi) [![Code Climate](https://img.shields.io/codeclimate/coverage/github/lstephen/construi.svg?style=plastic)](https://codeclimate.com/github/lstephen/construi) [![Coveralls](https://img.shields.io/coveralls/lstephen/construi/develop.svg?style=plastic)](https://coveralls.io/r/lstephen/construi)
|
4
5
|
|
data/construi.yml
CHANGED
@@ -1,8 +1,10 @@
|
|
1
1
|
image: ruby:1.9
|
2
2
|
|
3
3
|
environment:
|
4
|
+
- JENKINS_URL
|
5
|
+
- BUILD_NUMBER
|
4
6
|
- CODECLIMATE_REPO_TOKEN
|
5
|
-
-
|
7
|
+
- COVERALLS_REPO_TOKEN
|
6
8
|
- GIT_COMMIT
|
7
9
|
- GIT_SSH_KEY
|
8
10
|
- RUBYGEMS_API_KEY
|
@@ -17,35 +19,8 @@ targets:
|
|
17
19
|
- bundle exec rake install
|
18
20
|
|
19
21
|
release:
|
20
|
-
-
|
21
|
-
- git config user.email levi.stephen@gmail.com
|
22
|
-
- mkdir -p ~/.ssh
|
23
|
-
- cp ${GIT_SSH_KEY} ~/.ssh/id_rsa
|
24
|
-
- chmod 0600 ~/.ssh/id_rsa
|
25
|
-
- printf "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
|
26
|
-
- git config push.default simple
|
27
|
-
- git checkout master
|
28
|
-
- git pull --rebase
|
29
|
-
- echo ${GIT_COMMIT}
|
30
|
-
- git merge --commit ${GIT_COMMIT}
|
31
|
-
- git push origin
|
32
|
-
- git checkout develop
|
33
|
-
- git pull --rebase
|
34
|
-
- bundle install --path vendor/bundle
|
35
|
-
- bundle exec gem bump --version minor
|
36
|
-
- git push origin
|
22
|
+
- bash construi/release/script.sh
|
37
23
|
|
38
24
|
deploy:
|
39
|
-
-
|
40
|
-
- git config user.email levi.stephen@gmail.com
|
41
|
-
- mkdir -p ~/.ssh
|
42
|
-
- cp ${GIT_SSH_KEY} ~/.ssh/id_rsa
|
43
|
-
- chmod 0600 ~/.ssh/id_rsa
|
44
|
-
- printf "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
|
45
|
-
- git config push.default simple
|
46
|
-
- mkdir -p ~/.gem
|
47
|
-
- "printf -- \"---\\n:rubygems_api_key: ${RUBYGEMS_API_KEY}\" >> ~/.gem/credentials"
|
48
|
-
- chmod 0600 ~/.gem/credentials
|
49
|
-
- bundle install --path vendor/bundle
|
50
|
-
- bundle exec gem release --tag
|
25
|
+
- bash construi/deploy/script.sh
|
51
26
|
|
@@ -0,0 +1,17 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
set -e
|
4
|
+
|
5
|
+
git config user.name lstephen
|
6
|
+
git config user.email levi.stephen@gmail.com
|
7
|
+
mkdir -p ~/.ssh
|
8
|
+
cp ${GIT_SSH_KEY} ~/.ssh/id_rsa
|
9
|
+
chmod 0600 ~/.ssh/id_rsa
|
10
|
+
printf "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
|
11
|
+
git config push.default simple
|
12
|
+
mkdir -p ~/.gem
|
13
|
+
printf -- "---\\n:rubygems_api_key: ${RUBYGEMS_API_KEY}" >> ~/.gem/credentials
|
14
|
+
chmod 0600 ~/.gem/credentials
|
15
|
+
bundle install --path vendor/bundle
|
16
|
+
bundle exec gem release --tag
|
17
|
+
|
@@ -0,0 +1,22 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
set -e
|
4
|
+
|
5
|
+
git config user.name lstephen
|
6
|
+
git config user.email levi.stephen@gmail.com
|
7
|
+
mkdir -p ~/.ssh
|
8
|
+
cp ${GIT_SSH_KEY} ~/.ssh/id_rsa
|
9
|
+
chmod 0600 ~/.ssh/id_rsa
|
10
|
+
printf "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
|
11
|
+
git config push.default simple
|
12
|
+
git checkout master
|
13
|
+
git pull --rebase
|
14
|
+
echo ${GIT_COMMIT}
|
15
|
+
git merge --commit ${GIT_COMMIT}
|
16
|
+
git push origin
|
17
|
+
git checkout develop
|
18
|
+
git pull --rebase
|
19
|
+
bundle install --path vendor/bundle
|
20
|
+
bundle exec gem bump --version minor
|
21
|
+
git push origin
|
22
|
+
|
data/lib/construi.rb
CHANGED
data/lib/construi/config.rb
CHANGED
data/lib/construi/container.rb
CHANGED
data/lib/construi/version.rb
CHANGED
@@ -0,0 +1,27 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
require 'construi/config'
|
4
|
+
|
5
|
+
RSpec.describe Construi::Config do
|
6
|
+
|
7
|
+
describe '#image' do
|
8
|
+
let(:config_content) do
|
9
|
+
<<-YAML
|
10
|
+
image: #{image}
|
11
|
+
YAML
|
12
|
+
end
|
13
|
+
|
14
|
+
let(:config) { Construi::Config.load(config_content) }
|
15
|
+
|
16
|
+
subject { config.image }
|
17
|
+
|
18
|
+
%w{ test-image:latest lstephen/construi:latest }.each do |image_name|
|
19
|
+
context "when image is #{image_name}" do
|
20
|
+
let(:image) { image_name }
|
21
|
+
it { is_expected.to eq(image) }
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
27
|
+
|
data/spec/spec_helper.rb
CHANGED
@@ -2,9 +2,18 @@
|
|
2
2
|
require 'codeclimate-test-reporter'
|
3
3
|
require 'coveralls'
|
4
4
|
|
5
|
-
|
5
|
+
#CodeClimate::TestReporter.start
|
6
|
+
#Coveralls.wear!
|
6
7
|
|
7
|
-
|
8
|
+
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
|
9
|
+
Coveralls::SimpleCov::Formatter,
|
10
|
+
SimpleCov::Formatter::HTMLFormatter,
|
11
|
+
CodeClimate::TestReporter::Formatter
|
12
|
+
]
|
13
|
+
SimpleCov.start do
|
14
|
+
add_filter '/vendor/'
|
15
|
+
add_filter '/spec'
|
16
|
+
end
|
8
17
|
|
9
18
|
RSpec.configure do |config|
|
10
19
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: construi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.30.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-03-
|
12
|
+
date: 2015-03-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: docker-api
|
@@ -141,11 +141,14 @@ files:
|
|
141
141
|
- bin/construi
|
142
142
|
- construi.gemspec
|
143
143
|
- construi.yml
|
144
|
+
- construi/deploy/script.sh
|
145
|
+
- construi/release/script.sh
|
144
146
|
- lib/construi.rb
|
145
147
|
- lib/construi/config.rb
|
146
148
|
- lib/construi/container.rb
|
147
149
|
- lib/construi/image.rb
|
148
150
|
- lib/construi/version.rb
|
151
|
+
- spec/lib/config_spec.rb
|
149
152
|
- spec/sanity_spec.rb
|
150
153
|
- spec/spec_helper.rb
|
151
154
|
homepage: ''
|
@@ -163,7 +166,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
163
166
|
version: '0'
|
164
167
|
segments:
|
165
168
|
- 0
|
166
|
-
hash:
|
169
|
+
hash: -746607983965103946
|
167
170
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
168
171
|
none: false
|
169
172
|
requirements:
|
@@ -172,7 +175,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
172
175
|
version: '0'
|
173
176
|
segments:
|
174
177
|
- 0
|
175
|
-
hash:
|
178
|
+
hash: -746607983965103946
|
176
179
|
requirements: []
|
177
180
|
rubyforge_project:
|
178
181
|
rubygems_version: 1.8.23.2
|
@@ -180,5 +183,6 @@ signing_key:
|
|
180
183
|
specification_version: 3
|
181
184
|
summary: Build tool using Docker to specify build environment
|
182
185
|
test_files:
|
186
|
+
- spec/lib/config_spec.rb
|
183
187
|
- spec/sanity_spec.rb
|
184
188
|
- spec/spec_helper.rb
|