Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Fletcher <mark@gitlab.com>2017-08-25 07:01:01 +0300
committerMark Fletcher <mark@gitlab.com>2017-08-30 06:24:59 +0300
commit91cca6e4943dd64d3bfe029e3da275ed1113bf47 (patch)
tree44dfc7720a1df7320c83c0911a332a27e895fa9f /spec/models/ci
parent19dfd9e9d6cf8c260dea6a339b1842fc2399729e (diff)
Add a Build Variable to represent the triggering GitLab user's name
* Predefined variable represents the name of the GitLab user that started a build
Diffstat (limited to 'spec/models/ci')
-rw-r--r--spec/models/ci/build_spec.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/spec/models/ci/build_spec.rb b/spec/models/ci/build_spec.rb
index 767f0ad9e65..97fce7ded74 100644
--- a/spec/models/ci/build_spec.rb
+++ b/spec/models/ci/build_spec.rb
@@ -1247,8 +1247,11 @@ describe Ci::Build do
context 'when build has user' do
let(:user_variables) do
- [{ key: 'GITLAB_USER_ID', value: user.id.to_s, public: true },
- { key: 'GITLAB_USER_EMAIL', value: user.email, public: true }]
+ [
+ { key: 'GITLAB_USER_ID', value: user.id.to_s, public: true },
+ { key: 'GITLAB_USER_EMAIL', value: user.email, public: true },
+ { key: 'GITLAB_USER_NAME', value: user.name, public: true }
+ ]
end
before do