diff options
| author | Lin Jen-Shin <godfat@godfat.org> | 2017-05-25 22:58:51 +0800 |
|---|---|---|
| committer | Lin Jen-Shin <godfat@godfat.org> | 2017-05-25 23:08:11 +0800 |
| commit | 88ba7a034be6c2a93c495edd1d1db08ec6d98bb3 (patch) | |
| tree | d887a6e81da91944756d9cd84ef3b20d7d83a653 /app/models/ci | |
| parent | 86cd09f5d15d7d97f325e2464de8fc4753d54602 (diff) | |
| download | gitlab-ce-88ba7a034be6c2a93c495edd1d1db08ec6d98bb3.tar.gz | |
Pass external_url from environment if job doesn't have one
Also update the document and add a changelog entry
Diffstat (limited to 'app/models/ci')
| -rw-r--r-- | app/models/ci/build.rb | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb index e50ea0e566a..5e2f8cda356 100644 --- a/app/models/ci/build.rb +++ b/app/models/ci/build.rb @@ -501,9 +501,15 @@ module Ci def persisted_environment_variables variables = persisted_environment.predefined_variables - variables << { key: 'CI_ENVIRONMENT_URL', - value: expanded_environment_url, - public: true } if environment_url + if environment_url + variables << { key: 'CI_ENVIRONMENT_URL', + value: expanded_environment_url, + public: true } + elsif persisted_environment.external_url.present? + variables << { key: 'CI_ENVIRONMENT_URL', + value: persisted_environment.external_url, + public: true } + end variables end |
