BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
57c353fc
Unverified
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
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
17 deletions
+9
-17
project.rb
app/models/project.rb
+3
-9
optimise-pipelines-json.yml
changelogs/unreleased/optimise-pipelines-json.yml
+4
-0
import_export.yml
lib/gitlab/import_export/import_export.yml
+0
-6
project_spec.rb
spec/models/project_spec.rb
+1
-0
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
...
@@ -168,6 +168,8 @@ class Project < ActiveRecord::Base
has_many
:environments
,
dependent: :destroy
has_many
:environments
,
dependent: :destroy
has_many
:deployments
,
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
:variables
,
allow_destroy:
true
accepts_nested_attributes_for
:project_feature
accepts_nested_attributes_for
:project_feature
...
@@ -1096,20 +1098,12 @@ class Project < ActiveRecord::Base
...
@@ -1096,20 +1098,12 @@ class Project < ActiveRecord::Base
@shared_runners
||=
shared_runners_available?
?
Ci
::
Runner
.
shared
:
Ci
::
Runner
.
none
@shared_runners
||=
shared_runners_available?
?
Ci
::
Runner
.
shared
:
Ci
::
Runner
.
none
end
end
def
active_runners
@active_runners
||=
runners
.
active
end
def
active_shared_runners
def
active_shared_runners
@active_shared_runners
||=
shared_runners
.
active
@active_shared_runners
||=
shared_runners
.
active
end
end
def
any_runners?
(
&
block
)
def
any_runners?
(
&
block
)
if
active_runners
.
any?
(
&
block
)
active_runners
.
any?
(
&
block
)
||
active_shared_runners
.
any?
(
&
block
)
return
true
end
active_shared_runners
.
any?
(
&
block
)
end
end
def
valid_runners_token?
(
token
)
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:
...
@@ -76,12 +76,6 @@ excluded_attributes:
statuses
:
statuses
:
-
:trace
-
:trace
-
:token
-
:token
pipelines
:
-
:pending_builds
-
:retryable_builds
-
:cancelable_statuses
-
:manual_actions
-
:artifacts
methods
:
methods
:
labels
:
labels
:
...
...
spec/models/project_spec.rb
View file @
57c353fc
...
@@ -57,6 +57,7 @@ describe Project, models: true do
...
@@ -57,6 +57,7 @@ describe Project, models: true do
it
{
is_expected
.
to
have_many
(
:builds
)
}
it
{
is_expected
.
to
have_many
(
:builds
)
}
it
{
is_expected
.
to
have_many
(
:runner_projects
)
}
it
{
is_expected
.
to
have_many
(
:runner_projects
)
}
it
{
is_expected
.
to
have_many
(
:runners
)
}
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
(
:variables
)
}
it
{
is_expected
.
to
have_many
(
:triggers
)
}
it
{
is_expected
.
to
have_many
(
:triggers
)
}
it
{
is_expected
.
to
have_many
(
:pages_domains
)
}
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
...
@@ -463,8 +463,7 @@ describe Ci::ProcessPipelineService, '#execute', :services do
end
end
def
manual_actions
def
manual_actions
pipeline
.
reload
pipeline
.
manual_actions
(
true
)
pipeline
.
manual_actions
end
end
def
create_build
(
name
,
**
opts
)
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