Pass 'TOP_UPSTREAM_SOURCE_SHA' in trigger-build

This is needed because `GITLAB_VERSION` has a special meaning in
`omnibus-gitlab` triggers: this is the GitLab version to build.

The problem is that `omnibus-gitlab` also has triggers to run QA for an
`omnibus-gitlab` commit, and if we use `GITLAB_VERSION` in that case,
the comment would be posted on the GitLab CE/EE commit (stored in
`GITLAB_VERSION`), whci hwouldn't make any sense.
Thus we need `TOP_UPSTREAM_SOURCE_SHA` to represent the commit on
which we want to leave a comment.

Signed-off-by: Rémy Coutable <remy@rymai.me>
This commit is contained in:
Rémy Coutable 2018-10-10 11:39:02 +02:00
parent bdd60cd73c
commit 02b456dbe8
No known key found for this signature in database
GPG key ID: 98DFFD1C0C62B70B

View file

@ -69,6 +69,7 @@ module Trigger
def base_variables
{
'TOP_UPSTREAM_TRIGGER_PROJECT' => ENV['TOP_UPSTREAM_TRIGGER_PROJECT'] || ENV['CI_PROJECT_PATH'],
'TOP_UPSTREAM_SOURCE_SHA' => ENV['CI_COMMIT_SHA'],
'UPSTREAM_TRIGGER_PROJECT' => ENV['CI_PROJECT_PATH'],
'UPSTREAM_TRIGGER_SOURCE' => ENV['TRIGGER_SOURCE'],
'TRIGGERED_USER' => ENV['TRIGGERED_USER'] || ENV['GITLAB_USER_NAME'],