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
Tatuya Kamada
gitlab-ce
Commits
ccff65be
Commit
ccff65be
authored
Mar 01, 2017
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused method from CI/CD build class
parent
48d7ed63
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
23 deletions
+0
-23
app/models/ci/build.rb
app/models/ci/build.rb
+0
-9
spec/models/ci/build_spec.rb
spec/models/ci/build_spec.rb
+0
-14
No files found.
app/models/ci/build.rb
View file @
ccff65be
...
@@ -55,15 +55,6 @@ module Ci
...
@@ -55,15 +55,6 @@ module Ci
pending
.
unstarted
.
order
(
'created_at ASC'
).
first
pending
.
unstarted
.
order
(
'created_at ASC'
).
first
end
end
def
create_from
(
build
)
new_build
=
build
.
dup
new_build
.
status
=
'pending'
new_build
.
runner_id
=
nil
new_build
.
trigger_request_id
=
nil
new_build
.
token
=
nil
new_build
.
save
end
def
retry
(
build
,
current_user
)
def
retry
(
build
,
current_user
)
Ci
::
RetryBuildService
Ci
::
RetryBuildService
.
new
(
build
.
project
,
current_user
)
.
new
(
build
.
project
,
current_user
)
...
...
spec/models/ci/build_spec.rb
View file @
ccff65be
...
@@ -181,20 +181,6 @@ describe Ci::Build, :models do
...
@@ -181,20 +181,6 @@ describe Ci::Build, :models do
end
end
end
end
describe
'#create_from'
do
before
do
build
.
status
=
'success'
build
.
save
end
let
(
:create_from_build
)
{
Ci
::
Build
.
create_from
build
}
it
'exists a pending task'
do
expect
(
Ci
::
Build
.
pending
.
count
(
:all
)).
to
eq
0
create_from_build
expect
(
Ci
::
Build
.
pending
.
count
(
:all
)).
to
be
>
0
end
end
describe
'#depends_on_builds'
do
describe
'#depends_on_builds'
do
let!
(
:build
)
{
create
(
:ci_build
,
pipeline:
pipeline
,
name:
'build'
,
stage_idx:
0
,
stage:
'build'
)
}
let!
(
:build
)
{
create
(
:ci_build
,
pipeline:
pipeline
,
name:
'build'
,
stage_idx:
0
,
stage:
'build'
)
}
let!
(
:rspec_test
)
{
create
(
:ci_build
,
pipeline:
pipeline
,
name:
'rspec'
,
stage_idx:
1
,
stage:
'test'
)
}
let!
(
:rspec_test
)
{
create
(
:ci_build
,
pipeline:
pipeline
,
name:
'rspec'
,
stage_idx:
1
,
stage:
'test'
)
}
...
...
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