Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
159749ed
Commit
159749ed
authored
Feb 27, 2020
by
Kyle Wiebers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change CI_COMMIT_SHA to CI_MERGE_REQUEST_SOURCE_BRANCH_SHA
Check out of the Merge Request SHA in omnibus-mirror
parent
6ed40ca0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
scripts/trigger-build
scripts/trigger-build
+5
-3
No files found.
scripts/trigger-build
View file @
159749ed
...
...
@@ -84,13 +84,14 @@ module Trigger
end
def
base_variables
# Use CI_MERGE_REQUEST_SOURCE_BRANCH_SHA for omnibus checkouts
{
'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'
],
'TRIGGER_SOURCE'
=>
ENV
[
'CI_JOB_URL'
],
'TOP_UPSTREAM_SOURCE_PROJECT'
=>
ENV
[
'CI_PROJECT_PATH'
],
'TOP_UPSTREAM_SOURCE_JOB'
=>
ENV
[
'CI_JOB_URL'
],
'TOP_UPSTREAM_SOURCE_SHA'
=>
ENV
[
'CI_
COMMIT
_SHA'
],
'TOP_UPSTREAM_SOURCE_SHA'
=>
ENV
[
'CI_
MERGE_REQUEST_SOURCE_BRANCH
_SHA'
],
'TOP_UPSTREAM_SOURCE_REF'
=>
ENV
[
'CI_COMMIT_REF_NAME'
],
'TOP_UPSTREAM_MERGE_REQUEST_PROJECT_ID'
=>
ENV
[
'CI_MERGE_REQUEST_PROJECT_ID'
],
'TOP_UPSTREAM_MERGE_REQUEST_IID'
=>
ENV
[
'CI_MERGE_REQUEST_IID'
]
...
...
@@ -125,8 +126,9 @@ module Trigger
end
def
extra_variables
# Use CI_MERGE_REQUEST_SOURCE_BRANCH_SHA for omnibus checkouts
{
'GITLAB_VERSION'
=>
ENV
[
'CI_
COMMIT
_SHA'
],
'GITLAB_VERSION'
=>
ENV
[
'CI_
MERGE_REQUEST_SOURCE_BRANCH
_SHA'
],
'ALTERNATIVE_SOURCES'
=>
'true'
,
'ee'
=>
Trigger
.
ee?
?
'true'
:
'false'
,
'QA_BRANCH'
=>
ENV
[
'QA_BRANCH'
]
||
'master'
...
...
@@ -192,7 +194,7 @@ module Trigger
Gitlab
.
create_commit_comment
(
ENV
[
'CI_PROJECT_PATH'
],
ENV
[
'CI_
COMMIT
_SHA'
],
ENV
[
'CI_
MERGE_REQUEST_SOURCE_BRANCH
_SHA'
],
"The [`
#{
ENV
[
'CI_JOB_NAME'
]
}
`](
#{
ENV
[
'CI_JOB_URL'
]
}
) job from pipeline
#{
ENV
[
'CI_PIPELINE_URL'
]
}
triggered
#{
downstream_pipeline
.
web_url
}
downstream."
)
rescue
Gitlab
::
Error
::
Error
=>
error
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment