diff options
author | Luke Bennett <lukeeeebennettplus@gmail.com> | 2018-03-21 18:26:06 +0000 |
---|---|---|
committer | Luke Bennett <lukeeeebennettplus@gmail.com> | 2018-03-21 18:26:06 +0000 |
commit | 2bb3e4c6e389915d2702ffcfaff5d31b6a41f582 (patch) | |
tree | da71c857eee52a4f9ac4705ca3f06c9ec7dd9384 /app/models/ci/runner.rb | |
parent | 5595afe807c3c11d9c695c558da1210a25544387 (diff) | |
parent | 9027d023a58c8ac803bc114c6213b1f124a978a2 (diff) | |
download | gitlab-ce-2bb3e4c6e389915d2702ffcfaff5d31b6a41f582.tar.gz |
Merge remote-tracking branch 'origin/master' into deprecation-warning-for-dynamic-milestones
Diffstat (limited to 'app/models/ci/runner.rb')
-rw-r--r-- | app/models/ci/runner.rb | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/app/models/ci/runner.rb b/app/models/ci/runner.rb index 13c784bea0d..7173f88f1c7 100644 --- a/app/models/ci/runner.rb +++ b/app/models/ci/runner.rb @@ -49,7 +49,7 @@ module Ci ref_protected: 1 } - cached_attr_reader :version, :revision, :platform, :architecture, :contacted_at + cached_attr_reader :version, :revision, :platform, :architecture, :contacted_at, :ip_address # Searches for runners matching the given query. # @@ -132,11 +132,10 @@ module Ci end def predefined_variables - [ - { key: 'CI_RUNNER_ID', value: id.to_s, public: true }, - { key: 'CI_RUNNER_DESCRIPTION', value: description, public: true }, - { key: 'CI_RUNNER_TAGS', value: tag_list.to_s, public: true } - ] + Gitlab::Ci::Variables::Collection.new + .append(key: 'CI_RUNNER_ID', value: id.to_s) + .append(key: 'CI_RUNNER_DESCRIPTION', value: description) + .append(key: 'CI_RUNNER_TAGS', value: tag_list.to_s) end def tick_runner_queue @@ -157,7 +156,7 @@ module Ci end def update_cached_info(values) - values = values&.slice(:version, :revision, :platform, :architecture) || {} + values = values&.slice(:version, :revision, :platform, :architecture, :ip_address) || {} values[:contacted_at] = Time.now cache_attributes(values) |