Skip to content
Snippets Groups Projects
Commit f83c1b65 authored by Miguel Cabeça's avatar Miguel Cabeça
Browse files

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.
parent 38b6a2a4
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -11,7 +11,7 @@
.navbar.navbar-fixed-top.navbar-ci
.navbar-inner
.container-fluid
= link_to 'GitLab CI', root_path, class: "brand"
= link_to GitlabCi::Name, root_path, class: "brand"
%ul.nav
- if current_user
%li
Loading
Loading
@@ -38,7 +38,7 @@
.right
.padded
%p.light
GitLab CI
= GitlabCi::Name
%span= GitlabCi::Version
%small= GitlabCi::Revision
 
module GitlabCi
Name = "GitLab CI"
Version = File.read(Rails.root.join("VERSION"))
Revision = `git log --pretty=format:'%h' -n 1`
end
Loading
Loading
@@ -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
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment