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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
7bb0c79b
Commit
7bb0c79b
authored
Feb 23, 2018
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix pipeline variables when pipeline has no schedule
parent
da6157a5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
app/models/ci/pipeline.rb
app/models/ci/pipeline.rb
+6
-4
app/models/project.rb
app/models/project.rb
+2
-0
No files found.
app/models/ci/pipeline.rb
View file @
7bb0c79b
...
...
@@ -473,7 +473,7 @@ module Ci
end
def
predefined_variables
variables
=
[
predefined
=
[
{
key:
'CI'
,
value:
'true'
,
public:
true
},
{
key:
'GITLAB_CI'
,
value:
'true'
,
public:
true
},
{
key:
'GITLAB_FEATURES'
,
value:
project
.
namespace
.
features
.
join
(
','
),
public:
true
},
...
...
@@ -485,9 +485,11 @@ module Ci
{
key:
'CI_PIPELINE_SOURCE'
,
value:
source
.
to_s
,
public:
true
}
]
variables
+=
project
.
predefined_variables
variables
+=
variables
.
map
(
&
:to_runner_variable
)
variables
+=
pipeline_schedule
.
job_variables
if
pipeline_schedule
predefined
+=
project
.
predefined_variables
predefined
+=
pipeline_schedule
.
job_variables
if
pipeline_schedule
predefined
+=
self
.
variables
.
map
(
&
:to_runner_variable
)
predefined
end
def
queued_duration
...
...
app/models/project.rb
View file @
7bb0c79b
...
...
@@ -1566,6 +1566,8 @@ class Project < ActiveRecord::Base
variables
+=
container_registry_variables
variables
+=
auto_devops_variables
variables
end
def
container_registry_variables
...
...
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