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
84ec7137
Commit
84ec7137
authored
Nov 02, 2018
by
Shinya Maeda
Committed by
Kamil Trzciński
Nov 02, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove ci_enable_scheduled_build feature flag
parent
c0d30fad
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
54 deletions
+14
-54
app/models/ci/build.rb
app/models/ci/build.rb
+1
-2
changelogs/unreleased/remove-ci_enable_scheduled_build-feature-flag.yml
...eleased/remove-ci_enable_scheduled_build-feature-flag.yml
+5
-0
spec/models/ci/build_spec.rb
spec/models/ci/build_spec.rb
+0
-12
spec/services/ci/process_build_service_spec.rb
spec/services/ci/process_build_service_spec.rb
+8
-36
spec/services/ci/run_scheduled_build_service_spec.rb
spec/services/ci/run_scheduled_build_service_spec.rb
+0
-4
No files found.
app/models/ci/build.rb
View file @
84ec7137
...
...
@@ -259,8 +259,7 @@ module Ci
end
def
schedulable?
Feature
.
enabled?
(
'ci_enable_scheduled_build'
,
default_enabled:
true
)
&&
self
.
when
==
'delayed'
&&
options
[
:start_in
].
present?
self
.
when
==
'delayed'
&&
options
[
:start_in
].
present?
end
def
options_scheduled_at
...
...
changelogs/unreleased/remove-ci_enable_scheduled_build-feature-flag.yml
0 → 100644
View file @
84ec7137
---
title
:
Remove `ci_enable_scheduled_build` feature flag
merge_request
:
22742
author
:
type
:
other
spec/models/ci/build_spec.rb
View file @
84ec7137
...
...
@@ -216,14 +216,6 @@ describe Ci::Build do
let
(
:build
)
{
create
(
:ci_build
,
:created
,
:schedulable
,
project:
project
)
}
it
{
expect
(
subject
).
to
be_truthy
}
context
'when feature flag is diabled'
do
before
do
stub_feature_flags
(
ci_enable_scheduled_build:
false
)
end
it
{
expect
(
subject
).
to
be_falsy
}
end
end
context
'when build is not schedulable'
do
...
...
@@ -327,10 +319,6 @@ describe Ci::Build do
describe
'#enqueue_scheduled'
do
subject
{
build
.
enqueue_scheduled
}
before
do
stub_feature_flags
(
ci_enable_scheduled_build:
true
)
end
context
'when build is scheduled and the right time has not come yet'
do
let
(
:build
)
{
create
(
:ci_build
,
:scheduled
,
pipeline:
pipeline
)
}
...
...
spec/services/ci/process_build_service_spec.rb
View file @
84ec7137
...
...
@@ -98,47 +98,19 @@ describe Ci::ProcessBuildService, '#execute' do
let
(
:build
)
{
create
(
:ci_build
,
:created
,
:schedulable
,
user:
user
,
project:
project
)
}
context
'when ci_enable_scheduled_build is enabled'
do
before
do
stub_feature_flags
(
ci_enable_scheduled_build:
true
)
end
context
'when current status is success'
do
let
(
:current_status
)
{
'success'
}
it
'changes the build status'
do
expect
{
subject
}.
to
change
{
build
.
status
}.
to
(
'scheduled'
)
end
end
context
'when current status is failed'
do
let
(
:current_status
)
{
'failed'
}
context
'when current status is success'
do
let
(
:current_status
)
{
'success'
}
it
'does not change the build status'
do
expect
{
subject
}.
to
change
{
build
.
status
}.
to
(
'skipped'
)
end
it
'changes the build status'
do
expect
{
subject
}.
to
change
{
build
.
status
}.
to
(
'scheduled'
)
end
end
context
'when ci_enable_scheduled_build is disabled'
do
before
do
stub_feature_flags
(
ci_enable_scheduled_build:
false
)
end
context
'when current status is success'
do
let
(
:current_status
)
{
'success'
}
it
'changes the build status'
do
expect
{
subject
}.
to
change
{
build
.
status
}.
to
(
'manual'
)
end
end
context
'when current status is failed'
do
let
(
:current_status
)
{
'failed'
}
context
'when current status is failed'
do
let
(
:current_status
)
{
'failed'
}
it
'does not change the build status'
do
expect
{
subject
}.
to
change
{
build
.
status
}.
to
(
'skipped'
)
end
it
'does not change the build status'
do
expect
{
subject
}.
to
change
{
build
.
status
}.
to
(
'skipped'
)
end
end
end
...
...
spec/services/ci/run_scheduled_build_service_spec.rb
View file @
84ec7137
...
...
@@ -7,10 +7,6 @@ describe Ci::RunScheduledBuildService do
subject
{
described_class
.
new
(
project
,
user
).
execute
(
build
)
}
before
do
stub_feature_flags
(
ci_enable_scheduled_build:
true
)
end
context
'when user can update build'
do
before
do
project
.
add_developer
(
user
)
...
...
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