diff options
author | Miguel Cabeça <miguel.cabeca@custojusto.pt> | 2013-02-25 17:05:09 +0000 |
---|---|---|
committer | Miguel Cabeça <miguel.cabeca@custojusto.pt> | 2013-02-25 17:05:09 +0000 |
commit | f83c1b6549921042fa7c507aea8a42c0ae0fb428 (patch) | |
tree | 2c75d401e8c9ce138339eb8ca1241786c6d09ad5 /lib | |
parent | 38b6a2a4478cceeb77480a6ee1dd713f3752b38d (diff) | |
download | gitlab-ci-f83c1b6549921042fa7c507aea8a42c0ae0fb428.tar.gz |
Added CI_SERVER* environment variables to build process.
The environment variable CI_SERVER can be used by the build process to
switch some specific CI configuration, like this for example:
```ruby
require 'rspec/retry'
RSpec.configure do |config|
config.default_retry_count = 3 if ENV['CI_SERVER']
end
```
The CI_SERVER_* variables were added for completeness.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/runner.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/runner.rb b/lib/runner.rb index e6e3f8d..98db11a 100644 --- a/lib/runner.rb +++ b/lib/runner.rb @@ -84,6 +84,12 @@ class Runner @process.environment['BUNDLE_GEMFILE'] = File.join(path, 'Gemfile') @process.environment['BUNDLE_BIN_PATH'] = '' @process.environment['RUBYOPT'] = '' + + @process.environment['CI_SERVER'] = 'yes' + @process.environment['CI_SERVER_NAME'] = GitlabCi::Name + @process.environment['CI_SERVER_VERSION'] = GitlabCi::Version + @process.environment['CI_SERVER_REVISION'] = GitlabCi::Revision + @process.environment['CI_BUILD_REF'] = build.ref @process.start |