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
93420f50
Commit
93420f50
authored
Nov 29, 2018
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pass GITLAB_REF_SLUG to CNG triggered pipelines
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
29901131
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
scripts/trigger-build
scripts/trigger-build
+7
-7
No files found.
scripts/trigger-build
View file @
93420f50
...
@@ -68,6 +68,7 @@ module Trigger
...
@@ -68,6 +68,7 @@ module Trigger
def
base_variables
def
base_variables
{
{
'GITLAB_REF_SLUG'
=>
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'
],
...
@@ -76,6 +77,12 @@ module Trigger
...
@@ -76,6 +77,12 @@ module Trigger
}
}
end
end
def
ref_slug
return
'master'
if
ENV
[
'CI_COMMIT_REF_SLUG'
]
=~
%r{(
\A
qa[/-]|-qa
\z
)}
ENV
[
'CI_COMMIT_REF_SLUG'
]
end
# Read version files from all components
# Read version files from all components
def
version_file_variables
def
version_file_variables
Dir
.
glob
(
"*_VERSION"
).
each_with_object
({})
do
|
version_file
,
params
|
Dir
.
glob
(
"*_VERSION"
).
each_with_object
({})
do
|
version_file
,
params
|
...
@@ -106,18 +113,11 @@ module Trigger
...
@@ -106,18 +113,11 @@ module Trigger
def
extra_variables
def
extra_variables
{
{
'GITLAB_VERSION'
=>
ENV
[
'CI_COMMIT_SHA'
],
'GITLAB_VERSION'
=>
ENV
[
'CI_COMMIT_SHA'
],
'GITLAB_REF_SLUG'
=>
ref_slug
,
'ALTERNATIVE_SOURCES'
=>
'true'
,
'ALTERNATIVE_SOURCES'
=>
'true'
,
'ee'
=>
Trigger
.
ee?
?
'true'
:
'false'
,
'ee'
=>
Trigger
.
ee?
?
'true'
:
'false'
,
'QA_BRANCH'
=>
ENV
[
'QA_BRANCH'
]
||
'master'
'QA_BRANCH'
=>
ENV
[
'QA_BRANCH'
]
||
'master'
}
}
end
end
def
ref_slug
return
'master'
if
ENV
[
'CI_COMMIT_REF_SLUG'
]
=~
%r{(
\A
qa[/-]|-qa
\z
)}
ENV
[
'CI_COMMIT_REF_SLUG'
]
end
end
end
class
CNG
<
Base
class
CNG
<
Base
...
...
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