Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
a7c255e51dd1
Commit
a7c255e5
authored
Apr 06, 2017
by
Kamil Trzcinski
Browse files
Fix tests and review
parent
741804631a9f
Changes
5
Hide whitespace changes
Inline
Side-by-side
app/models/project.rb
View file @
a7c255e5
...
...
@@ -168,6 +168,8 @@
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,12 +1098,8 @@
@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
)
...
...
@@ -1103,13 +1101,9 @@
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 @
a7c255e5
---
title
:
Optimise pipelines.json endpoint
merge_request
:
author
:
lib/gitlab/import_export/import_export.yml
View file @
a7c255e5
...
...
@@ -76,12 +76,6 @@
statuses
:
-
:trace
-
:token
pipelines
:
-
:pending_builds
-
:retryable_builds
-
:cancelable_statuses
-
:manual_actions
-
:artifacts
methods
:
labels
:
...
...
spec/models/project_spec.rb
View file @
a7c255e5
...
...
@@ -57,6 +57,7 @@
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 @
a7c255e5
...
...
@@ -463,8 +463,7 @@
end
def
manual_actions
pipeline
.
reload
pipeline
.
manual_actions
pipeline
.
manual_actions
(
true
)
end
def
create_build
(
name
,
**
opts
)
...
...
Write
Preview
Supports
Markdown
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