vx-builder 0.1.8 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/lib/vx/builder/build_configuration.rb +9 -6
- data/lib/vx/builder/build_configuration/deploy.rb +22 -13
- data/lib/vx/builder/build_configuration/deploy/provider.rb +58 -0
- data/lib/vx/builder/configuration.rb +1 -1
- data/lib/vx/builder/matrix.rb +14 -0
- data/lib/vx/builder/script.rb +32 -7
- data/lib/vx/builder/script/artifacts.rb +1 -3
- data/lib/vx/builder/script/base.rb +56 -0
- data/lib/vx/builder/script/clojure.rb +5 -9
- data/lib/vx/builder/script/deploy.rb +40 -0
- data/lib/vx/builder/script/env.rb +1 -3
- data/lib/vx/builder/script/java.rb +5 -5
- data/lib/vx/builder/script/ruby.rb +20 -15
- data/lib/vx/builder/script/scala.rb +11 -13
- data/lib/vx/builder/script/script.rb +19 -8
- data/lib/vx/builder/script/services.rb +1 -3
- data/lib/vx/builder/task.rb +5 -0
- data/lib/vx/builder/version.rb +1 -1
- data/spec/fixtures/integration/ruby/deploy/config.yml +12 -0
- data/spec/fixtures/integration/ruby/deploy/d.after_script.sh +10 -0
- data/spec/fixtures/integration/ruby/deploy/d.before_script.sh +61 -0
- data/spec/fixtures/integration/ruby/deploy/d.script.sh +4 -0
- data/spec/fixtures/integration/ruby/language/after_script.sh +10 -0
- data/spec/fixtures/integration/ruby/language/before_script.sh +59 -0
- data/spec/fixtures/integration/ruby/language/config.yml +1 -0
- data/spec/fixtures/integration/ruby/language/script.sh +8 -0
- data/spec/fixtures/integration/ruby/matrix/0.after_script.sh +10 -0
- data/spec/fixtures/integration/ruby/matrix/0.before_script.sh +61 -0
- data/spec/fixtures/integration/ruby/matrix/0.script.sh +6 -0
- data/spec/fixtures/integration/ruby/matrix/1.after_script.sh +10 -0
- data/spec/fixtures/integration/ruby/matrix/1.before_script.sh +61 -0
- data/spec/fixtures/integration/ruby/matrix/1.script.sh +6 -0
- data/spec/fixtures/integration/ruby/matrix/config.yml +11 -0
- data/spec/fixtures/integration/ruby/matrix/d.after_script.sh +10 -0
- data/spec/fixtures/integration/ruby/matrix/d.before_script.sh +59 -0
- data/spec/fixtures/integration/ruby/matrix/d.script.sh +4 -0
- data/spec/fixtures/travis.yml +3 -0
- data/spec/integration/ruby_spec.rb +159 -0
- data/spec/lib/builder/build_configuration_spec.rb +31 -0
- data/spec/lib/builder/matrix_spec.rb +59 -0
- data/spec/lib/builder/task_spec.rb +2 -1
- data/spec/support/create.rb +14 -11
- data/vx-builder.gemspec +1 -1
- metadata +48 -7
@@ -2,15 +2,15 @@ module Vx
|
|
2
2
|
module Builder
|
3
3
|
class Script
|
4
4
|
|
5
|
-
Java
|
6
|
-
|
7
|
-
include Helper::TraceShCommand
|
5
|
+
class Java < Base
|
8
6
|
|
9
7
|
def call(env)
|
10
8
|
if java(env)
|
11
|
-
env
|
9
|
+
do_cache_key(env) do |i|
|
10
|
+
i << "jdk-#{java env}"
|
11
|
+
end
|
12
12
|
|
13
|
-
env
|
13
|
+
do_before_install(env) do |i|
|
14
14
|
i << "source $(which jdk_switcher.sh)"
|
15
15
|
i << trace_sh_command("jdk_switcher use #{java env}")
|
16
16
|
end
|
@@ -2,28 +2,28 @@ module Vx
|
|
2
2
|
module Builder
|
3
3
|
class Script
|
4
4
|
|
5
|
-
Ruby
|
6
|
-
|
7
|
-
include Helper::TraceShCommand
|
5
|
+
class Ruby < Base
|
8
6
|
|
9
7
|
DEFAULT_RUBY = '1.9.3'
|
10
8
|
|
11
9
|
def call(env)
|
12
10
|
if enabled?(env)
|
13
|
-
env
|
14
|
-
|
11
|
+
do_cache_key(env) do |i|
|
12
|
+
i << "rvm-#{ruby env}"
|
13
|
+
i << gemfile(env)
|
14
|
+
end
|
15
15
|
|
16
|
-
env
|
16
|
+
do_before_install(env) do |i|
|
17
17
|
i << 'eval "$(rbenv init -)" || true'
|
18
18
|
i << "rbenv shell #{make_rbenv_version_command env}"
|
19
19
|
i << trace_sh_command("export BUNDLE_GEMFILE=${PWD}/#{gemfile(env)}")
|
20
20
|
i << trace_sh_command('export GEM_HOME=~/.rubygems')
|
21
21
|
end
|
22
22
|
|
23
|
-
env
|
24
|
-
|
25
|
-
|
26
|
-
|
23
|
+
do_announce(env) do |i|
|
24
|
+
i << trace_sh_command("ruby --version")
|
25
|
+
i << trace_sh_command("gem --version")
|
26
|
+
i << trace_sh_command("bundle --version")
|
27
27
|
end
|
28
28
|
|
29
29
|
env.install.tap do |i|
|
@@ -32,13 +32,18 @@ module Vx
|
|
32
32
|
i << trace_sh_command("bundle clean --force")
|
33
33
|
end
|
34
34
|
|
35
|
-
|
36
|
-
|
37
|
-
|
35
|
+
do_install(env) do |i|
|
36
|
+
i << trace_sh_command("bundle install")
|
37
|
+
i << trace_sh_command("bundle clean --force")
|
38
|
+
end
|
39
|
+
|
40
|
+
do_script(env) do |i|
|
41
|
+
script = "if [ -f Rakefile ] ; then \n #{trace_sh_command "bundle exec rake"}\nfi"
|
42
|
+
i << script
|
38
43
|
end
|
39
44
|
|
40
|
-
|
41
|
-
|
45
|
+
do_cached_directories(env) do |i|
|
46
|
+
i << "~/.rubygems"
|
42
47
|
end
|
43
48
|
end
|
44
49
|
|
@@ -2,33 +2,31 @@ module Vx
|
|
2
2
|
module Builder
|
3
3
|
class Script
|
4
4
|
|
5
|
-
Scala
|
6
|
-
|
7
|
-
include Helper::TraceShCommand
|
5
|
+
class Scala < Base
|
8
6
|
|
9
7
|
DEFAULT_SCALA = '2.10.3'
|
10
8
|
|
11
9
|
def call(env)
|
12
10
|
if enabled?(env)
|
13
|
-
env
|
11
|
+
do_cache_key(env) do |i|
|
12
|
+
i << "scala-#{scala env}"
|
13
|
+
end
|
14
14
|
|
15
|
-
env
|
15
|
+
do_announce(env) do |i|
|
16
16
|
i << trace_sh_command("export SCALA_VERSION=#{scala env}")
|
17
17
|
end
|
18
18
|
|
19
|
-
env
|
19
|
+
do_install(env) do |i|
|
20
20
|
i << "if [[ -d project || -f build.sbt ]] ; then #{trace_sh_command "sbt ++#{scala env} update"} ; fi"
|
21
21
|
end
|
22
22
|
|
23
|
-
|
24
|
-
|
25
|
-
i << "if [[ -d project || -f build.sbt ]] ; then #{trace_sh_command "sbt ++#{scala env} test"} ; fi"
|
26
|
-
end
|
23
|
+
do_script(env) do |i|
|
24
|
+
i << "if [[ -d project || -f build.sbt ]] ; then #{trace_sh_command "sbt ++#{scala env} test"} ; fi"
|
27
25
|
end
|
28
26
|
|
29
|
-
|
30
|
-
|
31
|
-
|
27
|
+
do_cached_directories(env) do |i|
|
28
|
+
i << "~/.sbt"
|
29
|
+
i << "~/.ivy2"
|
32
30
|
end
|
33
31
|
end
|
34
32
|
|
@@ -10,15 +10,26 @@ module Vx
|
|
10
10
|
env.source.before_install.each do |c|
|
11
11
|
env.before_install << trace_sh_command(c)
|
12
12
|
end
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
13
|
+
|
14
|
+
if env.task.deploy?
|
15
|
+
env.source.before_deploy.each do |c|
|
16
|
+
env.before_script << trace_sh_command(c)
|
17
|
+
end
|
18
|
+
env.source.after_deploy.each do |c|
|
19
|
+
env.after_success << trace_sh_command(c)
|
20
|
+
end
|
21
|
+
else
|
22
|
+
env.source.before_script.each do |c|
|
23
|
+
env.before_script << trace_sh_command(c)
|
24
|
+
end
|
25
|
+
env.source.script.each do |c|
|
26
|
+
env.script << trace_sh_command(c)
|
27
|
+
end
|
28
|
+
env.source.after_success.each do |c|
|
29
|
+
env.after_success << trace_sh_command(c)
|
30
|
+
end
|
21
31
|
end
|
32
|
+
|
22
33
|
app.call(env)
|
23
34
|
end
|
24
35
|
|
@@ -2,14 +2,12 @@ module Vx
|
|
2
2
|
module Builder
|
3
3
|
class Script
|
4
4
|
|
5
|
-
Services
|
5
|
+
class Services < Base
|
6
6
|
|
7
7
|
ALIASES = {
|
8
8
|
'rabbitmq' => 'rabbitmq-server'
|
9
9
|
}
|
10
10
|
|
11
|
-
include Helper::TraceShCommand
|
12
|
-
|
13
11
|
def call(env)
|
14
12
|
env.source.services.each do |srv|
|
15
13
|
srv = ALIASES[srv] || srv
|
data/lib/vx/builder/task.rb
CHANGED
@@ -16,10 +16,15 @@ module Vx
|
|
16
16
|
@pull_request_id = options[:pull_request_id]
|
17
17
|
@cache_url_prefix = options[:cache_url_prefix]
|
18
18
|
@artifacts_url_prefix = options[:artifacts_url_prefix]
|
19
|
+
@deploy = !!options[:deploy]
|
19
20
|
|
20
21
|
validate!
|
21
22
|
end
|
22
23
|
|
24
|
+
def deploy?
|
25
|
+
@deploy
|
26
|
+
end
|
27
|
+
|
23
28
|
private
|
24
29
|
|
25
30
|
def validate!
|
data/lib/vx/builder/version.rb
CHANGED
@@ -0,0 +1,10 @@
|
|
1
|
+
|
2
|
+
# after script init
|
3
|
+
export CI_JOB_ID=1
|
4
|
+
export CI_BUILD_ID=12
|
5
|
+
export CI_BRANCH=master
|
6
|
+
export VX_ROOT=$(pwd)
|
7
|
+
cd ${VX_ROOT}/code/name
|
8
|
+
|
9
|
+
# after deploy
|
10
|
+
test -f $HOME/.casher/bin/casher && /opt/rbenv/versions/1.9.3-p547/bin/ruby $HOME/.casher/bin/casher push http://example.com/master/rvm-1.9.3-gemfile.tgz
|
@@ -0,0 +1,61 @@
|
|
1
|
+
|
2
|
+
# init
|
3
|
+
set -e
|
4
|
+
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
5
|
+
export LC_ALL=en_US.UTF8
|
6
|
+
export DEBIAN_FRONTEND=noninteractive
|
7
|
+
export CI_JOB_ID=1
|
8
|
+
export CI_BUILD_ID=12
|
9
|
+
export CI_BRANCH=master
|
10
|
+
export VX_ROOT=$(pwd)
|
11
|
+
mkdir -p ${VX_ROOT}/data/name
|
12
|
+
mkdir -p ${VX_ROOT}/code/name
|
13
|
+
(echo LS0tLS1CRUdJTiBSU0EgUFJJVkFURSBLRVktLS0tLQpNSUlFcEFJQkFBS0NB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M3BkYlljNDdOVVE9PQotLS0tLUVORCBSU0EgUFJJVkFURSBLRVktLS0tLQo= | base64 --decode) > ${VX_ROOT}/data/name/key
|
14
|
+
chmod 0600 ${VX_ROOT}/data/name/key
|
15
|
+
export VX_PRIVATE_KEY=${VX_ROOT}/data/name/key
|
16
|
+
(echo IyEvYmluL3NoCi91c3IvYmluL3NzaCAtQSAtbyBMb2dMZXZlbD1xdWlldCAtbyBTdHJpY3RIb3N0S2V5Q2hlY2tpbmc9bm8gLW8gVXNlcktub3duSG9zdHNGaWxlPS9kZXYvbnVsbCAtaSAke1ZYX1JPT1R9L2RhdGEvbmFtZS9rZXkgJEAK | base64 --decode) > ${VX_ROOT}/data/name/git_ssh
|
17
|
+
chmod 0750 ${VX_ROOT}/data/name/git_ssh
|
18
|
+
export GIT_SSH=${VX_ROOT}/data/name/git_ssh
|
19
|
+
echo "$ git clone --depth=50 --branch=master git@github.com:dima-exe/ci-worker-test-repo.git ${VX_ROOT}/code/name"
|
20
|
+
git clone --depth=50 --branch=master git@github.com:dima-exe/ci-worker-test-repo.git ${VX_ROOT}/code/name
|
21
|
+
echo "$ git checkout -qf b665f90239563c030f1b280a434b3d84daeda1bd"
|
22
|
+
( cd ${VX_ROOT}/code/name && git checkout -qf b665f90239563c030f1b280a434b3d84daeda1bd )
|
23
|
+
unset GIT_SSH
|
24
|
+
echo "Starting SSH Agent"
|
25
|
+
eval "$(ssh-agent)"
|
26
|
+
ssh-add $VX_PRIVATE_KEY
|
27
|
+
cd ${VX_ROOT}/code/name
|
28
|
+
export CASHER_DIR=$HOME/.casher && ( mkdir -p $CASHER_DIR/bin && /usr/bin/curl https://raw2.github.com/dima-exe/casher/master/bin/casher -s -o $HOME/.casher/bin/casher && chmod +x $HOME/.casher/bin/casher ) || true
|
29
|
+
test -f $HOME/.casher/bin/casher && /opt/rbenv/versions/1.9.3-p547/bin/ruby $HOME/.casher/bin/casher fetch http://example.com/master/rvm-1.9.3-gemfile.tgz || true
|
30
|
+
test -f $HOME/.casher/bin/casher && /opt/rbenv/versions/1.9.3-p547/bin/ruby $HOME/.casher/bin/casher add ~/.rubygems || true
|
31
|
+
unset CASHER_DIR
|
32
|
+
|
33
|
+
# before install
|
34
|
+
eval "$(rbenv init -)" || true
|
35
|
+
rbenv shell $(rbenv versions | sed -e 's/^*/ /' | awk '{print $1}' | grep -v 'system' | grep '1.9.3' | tail -n1)
|
36
|
+
echo \$\ export\ BUNDLE_GEMFILE\=\$\{PWD\}/Gemfile
|
37
|
+
export BUNDLE_GEMFILE=${PWD}/Gemfile
|
38
|
+
echo \$\ export\ GEM_HOME\=\~/.rubygems
|
39
|
+
export GEM_HOME=~/.rubygems
|
40
|
+
|
41
|
+
# announce
|
42
|
+
echo \$\ ruby\ --version
|
43
|
+
ruby --version
|
44
|
+
echo \$\ gem\ --version
|
45
|
+
gem --version
|
46
|
+
echo \$\ bundle\ --version
|
47
|
+
bundle --version
|
48
|
+
|
49
|
+
# install
|
50
|
+
echo \$\ bundle\ install\
|
51
|
+
bundle install
|
52
|
+
echo \$\ bundle\ clean\ --force
|
53
|
+
bundle clean --force
|
54
|
+
echo \$\ bundle\ install
|
55
|
+
bundle install
|
56
|
+
echo \$\ bundle\ clean\ --force
|
57
|
+
bundle clean --force
|
58
|
+
|
59
|
+
# before deploy
|
60
|
+
echo \$\ echo\ before\ deploy
|
61
|
+
echo before deploy
|
@@ -0,0 +1,10 @@
|
|
1
|
+
|
2
|
+
# after script init
|
3
|
+
export CI_JOB_ID=1
|
4
|
+
export CI_BUILD_ID=12
|
5
|
+
export CI_BRANCH=master
|
6
|
+
export VX_ROOT=$(pwd)
|
7
|
+
cd ${VX_ROOT}/code/name
|
8
|
+
|
9
|
+
# after script
|
10
|
+
test -f $HOME/.casher/bin/casher && /opt/rbenv/versions/1.9.3-p547/bin/ruby $HOME/.casher/bin/casher push http://example.com/master/rvm-1.9.3-gemfile.tgz
|
@@ -0,0 +1,59 @@
|
|
1
|
+
|
2
|
+
# init
|
3
|
+
set -e
|
4
|
+
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
5
|
+
export LC_ALL=en_US.UTF8
|
6
|
+
export DEBIAN_FRONTEND=noninteractive
|
7
|
+
export CI_JOB_ID=1
|
8
|
+
export CI_BUILD_ID=12
|
9
|
+
export CI_BRANCH=master
|
10
|
+
export VX_ROOT=$(pwd)
|
11
|
+
mkdir -p ${VX_ROOT}/data/name
|
12
|
+
mkdir -p ${VX_ROOT}/code/name
|
13
|
+
(echo LS0tLS1CRUdJTiBSU0EgUFJJVkFURSBLRVktLS0tLQpNSUlFcEFJQkFBS0NBUUVBdmVpcXpyMG54SkE0OGZrL1Q3cUZyT0RtZFQ5NGx2dDdvbnRHTGhxTlQ3WitHYnFMCnQ0NUY0LzVCeE5neU1iU1FmYUp3MXNHTXVuUWZqS1JkV2Z1S1VRcDB5NmJOaEFqdG5Dbm9WZWwzU01CYVhFMnIKODk2R2toTlhjMS9sejF2LzFUOGJsYy9jaFZlS1p2UVQraER2Qy9LRUNGLyt2ZDd5TDZOUmxvYXlaZHYwa3M3egpDd29JZWVUZkV1MmhkM3JYREVMZ29pTStBQUVjaVllMDhWdXl0RmpiT055MjhFeTNTR0hVUk40MThGSnJKSERzCjdCNXgzUDg5Z2xrU3RhMVRZNEpPUXRvV3V4emE3eWxTOEcxaytzcytUREIrRVQzc3FqRGUxbXhvc1JBZnFTQTcKYXBFWkszQUxiWnJ1M25ZZDI2eCtDRTg0ZHZIN0dpS29CbDBUU1FJREFRQUJBb0lCQUVFQWduYUJDRHVmb2Q0eApFaHFZSFdrdkViTFFKdGFHL2FwL3gyWEFjTjMzK1BHVmlIMHJsWUNVWnE2WjBaUngyWU1uTnJoTFI0QUtmMElFCmdHOXNTY3V6YUliTWNVdmdRblJSWTlVRU5IQVNadHR4T29vZWdMRS9MWSt3STFqMmhIclpQdmZvVGZMV0krbFoKWWYwV0RyeG9KZ2szMGxuckZicDRqRlNaaGphV21zbTFYUTRodHQ5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1Kck4vSTRwdkR1M3pKQ0t5M2JHUwpwNnFvbHpTUGF2ZEZwUkd6N045L05jdm9xbDdqa2ZUM0JveUJRNFlwd0diVEJaUmNjS1FxbkxqaFExYWoranpVCmEyUGlwd0tCZ1FDQ0x1T3JoTzM3VW92TW5tTnJSelhud3U5QytWQ0I0b0dmNlF0akVlaE14L0orNmVodlNZdWIKbExPeGVaUUh6VmtDM0k2clZNYksxcXgwdDhRbmIrNWpIUkFrUjR4L0phVG9qcFpZcW5nZExydFk0L3FMS0pxNwo0YU9MWWpKeUwzWUIwOWczcjY4d2NuVFVIYmNaWWorUTd4VDFZL250WE5wM3BkYlljNDdOVVE9PQotLS0tLUVORCBSU0EgUFJJVkFURSBLRVktLS0tLQo= | base64 --decode) > ${VX_ROOT}/data/name/key
|
14
|
+
chmod 0600 ${VX_ROOT}/data/name/key
|
15
|
+
export VX_PRIVATE_KEY=${VX_ROOT}/data/name/key
|
16
|
+
(echo IyEvYmluL3NoCi91c3IvYmluL3NzaCAtQSAtbyBMb2dMZXZlbD1xdWlldCAtbyBTdHJpY3RIb3N0S2V5Q2hlY2tpbmc9bm8gLW8gVXNlcktub3duSG9zdHNGaWxlPS9kZXYvbnVsbCAtaSAke1ZYX1JPT1R9L2RhdGEvbmFtZS9rZXkgJEAK | base64 --decode) > ${VX_ROOT}/data/name/git_ssh
|
17
|
+
chmod 0750 ${VX_ROOT}/data/name/git_ssh
|
18
|
+
export GIT_SSH=${VX_ROOT}/data/name/git_ssh
|
19
|
+
echo "$ git clone --depth=50 --branch=master git@github.com:dima-exe/ci-worker-test-repo.git ${VX_ROOT}/code/name"
|
20
|
+
git clone --depth=50 --branch=master git@github.com:dima-exe/ci-worker-test-repo.git ${VX_ROOT}/code/name
|
21
|
+
echo "$ git checkout -qf b665f90239563c030f1b280a434b3d84daeda1bd"
|
22
|
+
( cd ${VX_ROOT}/code/name && git checkout -qf b665f90239563c030f1b280a434b3d84daeda1bd )
|
23
|
+
unset GIT_SSH
|
24
|
+
echo "Starting SSH Agent"
|
25
|
+
eval "$(ssh-agent)"
|
26
|
+
ssh-add $VX_PRIVATE_KEY
|
27
|
+
cd ${VX_ROOT}/code/name
|
28
|
+
export CASHER_DIR=$HOME/.casher && ( mkdir -p $CASHER_DIR/bin && /usr/bin/curl https://raw2.github.com/dima-exe/casher/master/bin/casher -s -o $HOME/.casher/bin/casher && chmod +x $HOME/.casher/bin/casher ) || true
|
29
|
+
test -f $HOME/.casher/bin/casher && /opt/rbenv/versions/1.9.3-p547/bin/ruby $HOME/.casher/bin/casher fetch http://example.com/master/rvm-1.9.3-gemfile.tgz || true
|
30
|
+
test -f $HOME/.casher/bin/casher && /opt/rbenv/versions/1.9.3-p547/bin/ruby $HOME/.casher/bin/casher add ~/.rubygems || true
|
31
|
+
unset CASHER_DIR
|
32
|
+
|
33
|
+
# before install
|
34
|
+
eval "$(rbenv init -)" || true
|
35
|
+
rbenv shell $(rbenv versions | sed -e 's/^*/ /' | awk '{print $1}' | grep -v 'system' | grep '1.9.3' | tail -n1)
|
36
|
+
echo \$\ export\ BUNDLE_GEMFILE\=\$\{PWD\}/Gemfile
|
37
|
+
export BUNDLE_GEMFILE=${PWD}/Gemfile
|
38
|
+
echo \$\ export\ GEM_HOME\=\~/.rubygems
|
39
|
+
export GEM_HOME=~/.rubygems
|
40
|
+
|
41
|
+
# announce
|
42
|
+
echo \$\ ruby\ --version
|
43
|
+
ruby --version
|
44
|
+
echo \$\ gem\ --version
|
45
|
+
gem --version
|
46
|
+
echo \$\ bundle\ --version
|
47
|
+
bundle --version
|
48
|
+
|
49
|
+
# install
|
50
|
+
echo \$\ bundle\ install\
|
51
|
+
bundle install
|
52
|
+
echo \$\ bundle\ clean\ --force
|
53
|
+
bundle clean --force
|
54
|
+
echo \$\ bundle\ install
|
55
|
+
bundle install
|
56
|
+
echo \$\ bundle\ clean\ --force
|
57
|
+
bundle clean --force
|
58
|
+
|
59
|
+
# before script
|
@@ -0,0 +1 @@
|
|
1
|
+
language: ruby
|
@@ -0,0 +1,10 @@
|
|
1
|
+
|
2
|
+
# after script init
|
3
|
+
export CI_JOB_ID=1
|
4
|
+
export CI_BUILD_ID=12
|
5
|
+
export CI_BRANCH=master
|
6
|
+
export VX_ROOT=$(pwd)
|
7
|
+
cd ${VX_ROOT}/code/name
|
8
|
+
|
9
|
+
# after script
|
10
|
+
test -f $HOME/.casher/bin/casher && /opt/rbenv/versions/1.9.3-p547/bin/ruby $HOME/.casher/bin/casher push http://example.com/master/rvm-1.9.3-gemfile.tgz
|
@@ -0,0 +1,61 @@
|
|
1
|
+
|
2
|
+
# init
|
3
|
+
set -e
|
4
|
+
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
5
|
+
export LC_ALL=en_US.UTF8
|
6
|
+
export DEBIAN_FRONTEND=noninteractive
|
7
|
+
export CI_JOB_ID=1
|
8
|
+
export CI_BUILD_ID=12
|
9
|
+
export CI_BRANCH=master
|
10
|
+
export VX_ROOT=$(pwd)
|
11
|
+
mkdir -p ${VX_ROOT}/data/name
|
12
|
+
mkdir -p ${VX_ROOT}/code/name
|
13
|
+
(echo LS0tLS1CRUdJTiBSU0EgUFJJVkFURSBLRVktLS0tLQpNSUlFcEFJQkFBS0NBUUVBdmVpcXpyMG54SkE0OGZrL1Q3cUZyT0RtZFQ5NGx2dDdvbnRHTGhxTlQ3WitHYnFMCnQ0NUY0LzVCeE5neU1iU1FmYUp3MXNHTXVuUWZqS1JkV2Z1S1VRcDB5NmJOaEFqdG5Dbm9WZWwzU01CYVhFMnIKODk2R2toTlhjMS9sejF2LzFUOGJsYy9jaFZlS1p2UVQraER2Qy9LRUNGLyt2ZDd5TDZOUmxvYXlaZHYwa3M3egpDd29JZWVUZkV1MmhkM3JYREVMZ29pTStBQUVjaVllMDhWdXl0RmpiT055MjhFeTNTR0hVUk40MThGSnJKSERzCjdCNXgzUDg5Z2xrU3RhMVRZNEpPUXRvV3V4emE3eWxTOEcxaytzcytUREIrRVQzc3Fq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KbXJkWVNOdWw5YWtBa2J2eHQreWhSUGFPU2dsbmRYTUJ3R0I2aFl6QTlacUpLZzd0MnlPSkZ3dWlUbkZJSEpHMgpNZ1B3TTFyMXpvYTlvd0ZZYm5aSk9rTm1zVUhUNU1VQ09XYWtOUzhXb3M3Z3dmRUpXVm55bzlUNkpVa3pPZ05pCjViQXZPWFo4d2lVQU0vZWZhcHp6VjJjQ2dZQmJLdFkvRi9mVjFWQmxFOStFa1VEdlB6ZFNHOUllR2hqMmNCQzkKMnRqdGhwcGpPYVlPRExkTG96WVl2T1NuV1JHTk4waE9TQTM3bnYzalpFSE1Kck4vSTRwdkR1M3pKQ0t5M2JHUwpwNnFvbHpTUGF2ZEZwUkd6N045L05jdm9xbDdqa2ZUM0JveUJRNFlwd0diVEJaUmNjS1FxbkxqaFExYWoranpVCmEyUGlwd0tCZ1FDQ0x1T3JoTzM3VW92TW5tTnJSelhud3U5QytWQ0I0b0dmNlF0akVlaE14L0orNmVodlNZdWIKbExPeGVaUUh6VmtDM0k2clZNYksxcXgwdDhRbmIrNWpIUkFrUjR4L0phVG9qcFpZcW5nZExydFk0L3FMS0pxNwo0YU9MWWpKeUwzWUIwOWczcjY4d2NuVFVIYmNaWWorUTd4VDFZL250WE5wM3BkYlljNDdOVVE9PQotLS0tLUVORCBSU0EgUFJJVkFURSBLRVktLS0tLQo= | base64 --decode) > ${VX_ROOT}/data/name/key
|
14
|
+
chmod 0600 ${VX_ROOT}/data/name/key
|
15
|
+
export VX_PRIVATE_KEY=${VX_ROOT}/data/name/key
|
16
|
+
(echo IyEvYmluL3NoCi91c3IvYmluL3NzaCAtQSAtbyBMb2dMZXZlbD1xdWlldCAtbyBTdHJpY3RIb3N0S2V5Q2hlY2tpbmc9bm8gLW8gVXNlcktub3duSG9zdHNGaWxlPS9kZXYvbnVsbCAtaSAke1ZYX1JPT1R9L2RhdGEvbmFtZS9rZXkgJEAK | base64 --decode) > ${VX_ROOT}/data/name/git_ssh
|
17
|
+
chmod 0750 ${VX_ROOT}/data/name/git_ssh
|
18
|
+
export GIT_SSH=${VX_ROOT}/data/name/git_ssh
|
19
|
+
echo "$ git clone --depth=50 --branch=master git@github.com:dima-exe/ci-worker-test-repo.git ${VX_ROOT}/code/name"
|
20
|
+
git clone --depth=50 --branch=master git@github.com:dima-exe/ci-worker-test-repo.git ${VX_ROOT}/code/name
|
21
|
+
echo "$ git checkout -qf b665f90239563c030f1b280a434b3d84daeda1bd"
|
22
|
+
( cd ${VX_ROOT}/code/name && git checkout -qf b665f90239563c030f1b280a434b3d84daeda1bd )
|
23
|
+
unset GIT_SSH
|
24
|
+
echo "Starting SSH Agent"
|
25
|
+
eval "$(ssh-agent)"
|
26
|
+
ssh-add $VX_PRIVATE_KEY
|
27
|
+
cd ${VX_ROOT}/code/name
|
28
|
+
export CASHER_DIR=$HOME/.casher && ( mkdir -p $CASHER_DIR/bin && /usr/bin/curl https://raw2.github.com/dima-exe/casher/master/bin/casher -s -o $HOME/.casher/bin/casher && chmod +x $HOME/.casher/bin/casher ) || true
|
29
|
+
test -f $HOME/.casher/bin/casher && /opt/rbenv/versions/1.9.3-p547/bin/ruby $HOME/.casher/bin/casher fetch http://example.com/master/rvm-1.9.3-gemfile.tgz || true
|
30
|
+
test -f $HOME/.casher/bin/casher && /opt/rbenv/versions/1.9.3-p547/bin/ruby $HOME/.casher/bin/casher add ~/.rubygems || true
|
31
|
+
unset CASHER_DIR
|
32
|
+
|
33
|
+
# before install
|
34
|
+
eval "$(rbenv init -)" || true
|
35
|
+
rbenv shell $(rbenv versions | sed -e 's/^*/ /' | awk '{print $1}' | grep -v 'system' | grep '1.9.3' | tail -n1)
|
36
|
+
echo \$\ export\ BUNDLE_GEMFILE\=\$\{PWD\}/Gemfile
|
37
|
+
export BUNDLE_GEMFILE=${PWD}/Gemfile
|
38
|
+
echo \$\ export\ GEM_HOME\=\~/.rubygems
|
39
|
+
export GEM_HOME=~/.rubygems
|
40
|
+
|
41
|
+
# announce
|
42
|
+
echo \$\ ruby\ --version
|
43
|
+
ruby --version
|
44
|
+
echo \$\ gem\ --version
|
45
|
+
gem --version
|
46
|
+
echo \$\ bundle\ --version
|
47
|
+
bundle --version
|
48
|
+
|
49
|
+
# install
|
50
|
+
echo \$\ bundle\ install\
|
51
|
+
bundle install
|
52
|
+
echo \$\ bundle\ clean\ --force
|
53
|
+
bundle clean --force
|
54
|
+
echo \$\ bundle\ install
|
55
|
+
bundle install
|
56
|
+
echo \$\ bundle\ clean\ --force
|
57
|
+
bundle clean --force
|
58
|
+
|
59
|
+
# before script
|
60
|
+
echo \$\ echo\ before\ script
|
61
|
+
echo before script
|