Commit f8a10191 authored by Rémy Coutable's avatar Rémy Coutable

Use $CI_COMMIT_REF_NAME for tags in trigger-build

Also, pass GITLAB_VERSION and GITLAB_ASSETS_TAG to CNG triggered
pipelines.
Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent 67dfd878
...@@ -4,10 +4,6 @@ Review Apps are automatically deployed by each pipeline, both in ...@@ -4,10 +4,6 @@ Review Apps are automatically deployed by each pipeline, both in
[CE](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/22010) and [CE](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/22010) and
[EE](https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/6665). [EE](https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/6665).
CAUTION: **Warning:**
There's currently [an issue when using `/` in branch names][charts-1068] where
Review Apps fail to be deployed.
## How does it work? ## How does it work?
### CD/CD architecture diagram ### CD/CD architecture diagram
......
...@@ -68,7 +68,7 @@ module Trigger ...@@ -68,7 +68,7 @@ module Trigger
def base_variables def base_variables
{ {
'GITLAB_REF_SLUG' => ENV['CI_COMMIT_REF_SLUG'], 'GITLAB_REF_SLUG' => ENV['CI_COMMIT_TAG'] ? ENV['CI_COMMIT_REF_NAME'] : ENV['CI_COMMIT_REF_SLUG'],
'TRIGGERED_USER' => ENV['TRIGGERED_USER'] || ENV['GITLAB_USER_NAME'], 'TRIGGERED_USER' => ENV['TRIGGERED_USER'] || ENV['GITLAB_USER_NAME'],
'TRIGGER_SOURCE' => ENV['CI_JOB_URL'], 'TRIGGER_SOURCE' => ENV['CI_JOB_URL'],
'TOP_UPSTREAM_SOURCE_PROJECT' => ENV['CI_PROJECT_PATH'], 'TOP_UPSTREAM_SOURCE_PROJECT' => ENV['CI_PROJECT_PATH'],
...@@ -137,7 +137,10 @@ module Trigger ...@@ -137,7 +137,10 @@ module Trigger
edition = Trigger.ee? ? 'EE' : 'CE' edition = Trigger.ee? ? 'EE' : 'CE'
{ {
# Back-compatibility until https://gitlab.com/gitlab-org/build/CNG/merge_requests/189 is merged
"GITLAB_#{edition}_VERSION" => ENV['CI_COMMIT_REF_NAME'], "GITLAB_#{edition}_VERSION" => ENV['CI_COMMIT_REF_NAME'],
"GITLAB_VERSION" => ENV['CI_COMMIT_REF_NAME'],
"GITLAB_ASSETS_TAG" => ENV['CI_COMMIT_REF_SLUG'],
"#{edition}_PIPELINE" => 'true' "#{edition}_PIPELINE" => 'true'
} }
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment