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
57c353fc
Commit
57c353fc
authored
Apr 06, 2017
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix tests and review
parent
9d4b6f22
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
17 deletions
+9
-17
app/models/project.rb
app/models/project.rb
+3
-9
changelogs/unreleased/optimise-pipelines-json.yml
changelogs/unreleased/optimise-pipelines-json.yml
+4
-0
lib/gitlab/import_export/import_export.yml
lib/gitlab/import_export/import_export.yml
+0
-6
spec/models/project_spec.rb
spec/models/project_spec.rb
+1
-0
spec/services/ci/process_pipeline_service_spec.rb
spec/services/ci/process_pipeline_service_spec.rb
+1
-2
No files found.
app/models/project.rb
View file @
57c353fc
...
...
@@ -168,6 +168,8 @@ class Project < ActiveRecord::Base
has_many
:environments
,
dependent: :destroy
has_many
:deployments
,
dependent: :destroy
has_many
:active_runners
,
->
{
active
},
through: :runner_projects
,
source: :runner
,
class_name:
'Ci::Runner'
accepts_nested_attributes_for
:variables
,
allow_destroy:
true
accepts_nested_attributes_for
:project_feature
...
...
@@ -1096,20 +1098,12 @@ class Project < ActiveRecord::Base
@shared_runners
||=
shared_runners_available?
?
Ci
::
Runner
.
shared
:
Ci
::
Runner
.
none
end
def
active_runners
@active_runners
||=
runners
.
active
end
def
active_shared_runners
@active_shared_runners
||=
shared_runners
.
active
end
def
any_runners?
(
&
block
)
if
active_runners
.
any?
(
&
block
)
return
true
end
active_shared_runners
.
any?
(
&
block
)
active_runners
.
any?
(
&
block
)
||
active_shared_runners
.
any?
(
&
block
)
end
def
valid_runners_token?
(
token
)
...
...
changelogs/unreleased/optimise-pipelines-json.yml
0 → 100644
View file @
57c353fc
---
title
:
Optimise pipelines.json endpoint
merge_request
:
author
:
lib/gitlab/import_export/import_export.yml
View file @
57c353fc
...
...
@@ -76,12 +76,6 @@ excluded_attributes:
statuses
:
-
:trace
-
:token
pipelines
:
-
:pending_builds
-
:retryable_builds
-
:cancelable_statuses
-
:manual_actions
-
:artifacts
methods
:
labels
:
...
...
spec/models/project_spec.rb
View file @
57c353fc
...
...
@@ -57,6 +57,7 @@ describe Project, models: true do
it
{
is_expected
.
to
have_many
(
:builds
)
}
it
{
is_expected
.
to
have_many
(
:runner_projects
)
}
it
{
is_expected
.
to
have_many
(
:runners
)
}
it
{
is_expected
.
to
have_many
(
:active_runners
)
}
it
{
is_expected
.
to
have_many
(
:variables
)
}
it
{
is_expected
.
to
have_many
(
:triggers
)
}
it
{
is_expected
.
to
have_many
(
:pages_domains
)
}
...
...
spec/services/ci/process_pipeline_service_spec.rb
View file @
57c353fc
...
...
@@ -463,8 +463,7 @@ describe Ci::ProcessPipelineService, '#execute', :services do
end
def
manual_actions
pipeline
.
reload
pipeline
.
manual_actions
pipeline
.
manual_actions
(
true
)
end
def
create_build
(
name
,
**
opts
)
...
...
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