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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
0df39e32
Commit
0df39e32
authored
Mar 06, 2018
by
Mayra Cabrera
Committed by
Kamil Trzciński
Mar 06, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move external files support from Premium to Starter
parent
01990196
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
25 additions
and
14 deletions
+25
-14
doc/ci/yaml/README.md
doc/ci/yaml/README.md
+2
-1
ee/app/models/license.rb
ee/app/models/license.rb
+1
-1
ee/changelogs/unreleased/43818-move-external-inclusion-from-premium-to-starter.yml
...43818-move-external-inclusion-from-premium-to-starter.yml
+5
-0
ee/spec/lib/ee/gitlab/ci/config_spec.rb
ee/spec/lib/ee/gitlab/ci/config_spec.rb
+2
-2
ee/spec/lib/ee/gitlab/ci/pipeline/chain/limit/size_spec.rb
ee/spec/lib/ee/gitlab/ci/pipeline/chain/limit/size_spec.rb
+1
-1
ee/spec/lib/ee/gitlab/ci/pipeline/quota/size_spec.rb
ee/spec/lib/ee/gitlab/ci/pipeline/quota/size_spec.rb
+1
-1
spec/lib/gitlab/ci/pipeline/chain/create_spec.rb
spec/lib/gitlab/ci/pipeline/chain/create_spec.rb
+1
-1
spec/lib/gitlab/ci/pipeline/chain/validate/config_spec.rb
spec/lib/gitlab/ci/pipeline/chain/validate/config_spec.rb
+1
-1
spec/models/blob_viewer/gitlab_ci_yml_spec.rb
spec/models/blob_viewer/gitlab_ci_yml_spec.rb
+1
-1
spec/models/ci/build_spec.rb
spec/models/ci/build_spec.rb
+2
-1
spec/models/ci/pipeline_spec.rb
spec/models/ci/pipeline_spec.rb
+8
-4
No files found.
doc/ci/yaml/README.md
View file @
0df39e32
...
@@ -364,6 +364,7 @@ skip the download step.
...
@@ -364,6 +364,7 @@ skip the download step.
### include
### include
> Introduced in [GitLab Edition Premium][ee] 10.5.
> Introduced in [GitLab Edition Premium][ee] 10.5.
> Available for Starter, Premium and Ultimate [versions][gitlab-versions] since 10.6.
Using the
`include`
keyword, you can allow the inclusion of external YAML files.
Using the
`include`
keyword, you can allow the inclusion of external YAML files.
...
@@ -1755,4 +1756,4 @@ CI with various languages.
...
@@ -1755,4 +1756,4 @@ CI with various languages.
[
ce-7447
]:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7447
[
ce-7447
]:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7447
[
ce-3442
]:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/3442
[
ce-3442
]:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/3442
[
schedules
]:
../../user/project/pipelines/schedules.md
[
schedules
]:
../../user/project/pipelines/schedules.md
[
ee
]:
https://about.gitlab.com/gitlab-ee
/
[
gitlab-versions
]:
https://about.gitlab.com/products
/
ee/app/models/license.rb
View file @
0df39e32
...
@@ -12,6 +12,7 @@ class License < ActiveRecord::Base
...
@@ -12,6 +12,7 @@ class License < ActiveRecord::Base
contribution_analytics
contribution_analytics
elastic_search
elastic_search
export_issues
export_issues
external_files_in_gitlab_ci
group_webhooks
group_webhooks
issuable_default_templates
issuable_default_templates
issue_board_focus_mode
issue_board_focus_mode
...
@@ -39,7 +40,6 @@ class License < ActiveRecord::Base
...
@@ -39,7 +40,6 @@ class License < ActiveRecord::Base
db_load_balancing
db_load_balancing
deploy_board
deploy_board
extended_audit_events
extended_audit_events
external_files_in_gitlab_ci
file_locks
file_locks
geo
geo
group_issue_boards
group_issue_boards
...
...
ee/changelogs/unreleased/43818-move-external-inclusion-from-premium-to-starter.yml
0 → 100644
View file @
0df39e32
---
title
:
Move support of external gitlab-ci files from Premium to Starter
merge_request
:
4841
author
:
type
:
added
ee/spec/lib/ee/gitlab/ci/config_spec.rb
View file @
0df39e32
...
@@ -14,7 +14,7 @@ describe EE::Gitlab::Ci::Config do
...
@@ -14,7 +14,7 @@ describe EE::Gitlab::Ci::Config do
end
end
let
(
:config
)
{
::
Gitlab
::
Ci
::
Config
.
new
(
gitlab_ci_yml
,
{
project:
project
,
sha:
'12345'
})
}
let
(
:config
)
{
::
Gitlab
::
Ci
::
Config
.
new
(
gitlab_ci_yml
,
{
project:
project
,
sha:
'12345'
})
}
context
'when the project does not have
EEP
license'
do
context
'when the project does not have
a valid
license'
do
before
do
before
do
allow
(
project
).
to
receive
(
:feature_available?
).
with
(
:external_files_in_gitlab_ci
).
and_return
(
false
)
allow
(
project
).
to
receive
(
:feature_available?
).
with
(
:external_files_in_gitlab_ci
).
and_return
(
false
)
end
end
...
@@ -27,7 +27,7 @@ describe EE::Gitlab::Ci::Config do
...
@@ -27,7 +27,7 @@ describe EE::Gitlab::Ci::Config do
end
end
end
end
context
'when the project has
EEP
license'
do
context
'when the project has
a valid
license'
do
let
(
:remote_file_content
)
do
let
(
:remote_file_content
)
do
<<~
HEREDOC
<<~
HEREDOC
variables:
variables:
...
...
ee/spec/lib/ee/gitlab/ci/pipeline/chain/limit/size_spec.rb
View file @
0df39e32
...
@@ -2,7 +2,7 @@ require 'spec_helper'
...
@@ -2,7 +2,7 @@ require 'spec_helper'
describe
EE
::
Gitlab
::
Ci
::
Pipeline
::
Chain
::
Limit
::
Size
do
describe
EE
::
Gitlab
::
Ci
::
Pipeline
::
Chain
::
Limit
::
Size
do
set
(
:namespace
)
{
create
(
:namespace
,
plan: :gold_plan
)
}
set
(
:namespace
)
{
create
(
:namespace
,
plan: :gold_plan
)
}
set
(
:project
)
{
create
(
:project
,
namespace:
namespace
)
}
set
(
:project
)
{
create
(
:project
,
:repository
,
namespace:
namespace
)
}
set
(
:user
)
{
create
(
:user
)
}
set
(
:user
)
{
create
(
:user
)
}
let
(
:pipeline
)
do
let
(
:pipeline
)
do
...
...
ee/spec/lib/ee/gitlab/ci/pipeline/quota/size_spec.rb
View file @
0df39e32
...
@@ -2,7 +2,7 @@ require 'spec_helper'
...
@@ -2,7 +2,7 @@ require 'spec_helper'
describe
EE
::
Gitlab
::
Ci
::
Pipeline
::
Quota
::
Size
do
describe
EE
::
Gitlab
::
Ci
::
Pipeline
::
Quota
::
Size
do
set
(
:namespace
)
{
create
(
:namespace
,
plan: :gold_plan
)
}
set
(
:namespace
)
{
create
(
:namespace
,
plan: :gold_plan
)
}
set
(
:project
)
{
create
(
:project
,
namespace:
namespace
)
}
set
(
:project
)
{
create
(
:project
,
:repository
,
namespace:
namespace
)
}
let
(
:pipeline
)
{
build_stubbed
(
:ci_pipeline
,
project:
project
)
}
let
(
:pipeline
)
{
build_stubbed
(
:ci_pipeline
,
project:
project
)
}
let
(
:limit
)
{
described_class
.
new
(
namespace
,
pipeline
)
}
let
(
:limit
)
{
described_class
.
new
(
namespace
,
pipeline
)
}
...
...
spec/lib/gitlab/ci/pipeline/chain/create_spec.rb
View file @
0df39e32
require
'spec_helper'
require
'spec_helper'
describe
Gitlab
::
Ci
::
Pipeline
::
Chain
::
Create
do
describe
Gitlab
::
Ci
::
Pipeline
::
Chain
::
Create
do
set
(
:project
)
{
create
(
:project
)
}
set
(
:project
)
{
create
(
:project
,
:repository
)
}
set
(
:user
)
{
create
(
:user
)
}
set
(
:user
)
{
create
(
:user
)
}
let
(
:pipeline
)
do
let
(
:pipeline
)
do
...
...
spec/lib/gitlab/ci/pipeline/chain/validate/config_spec.rb
View file @
0df39e32
require
'spec_helper'
require
'spec_helper'
describe
Gitlab
::
Ci
::
Pipeline
::
Chain
::
Validate
::
Config
do
describe
Gitlab
::
Ci
::
Pipeline
::
Chain
::
Validate
::
Config
do
set
(
:project
)
{
create
(
:project
)
}
set
(
:project
)
{
create
(
:project
,
:repository
)
}
set
(
:user
)
{
create
(
:user
)
}
set
(
:user
)
{
create
(
:user
)
}
let
(
:command
)
do
let
(
:command
)
do
...
...
spec/models/blob_viewer/gitlab_ci_yml_spec.rb
View file @
0df39e32
...
@@ -4,7 +4,7 @@ describe BlobViewer::GitlabCiYml do
...
@@ -4,7 +4,7 @@ describe BlobViewer::GitlabCiYml do
include
FakeBlobHelpers
include
FakeBlobHelpers
include
RepoHelpers
include
RepoHelpers
let
(
:project
)
{
build_stubbed
(
:project
,
:repository
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:data
)
{
File
.
read
(
Rails
.
root
.
join
(
'spec/support/gitlab_stubs/gitlab_ci.yml'
))
}
let
(
:data
)
{
File
.
read
(
Rails
.
root
.
join
(
'spec/support/gitlab_stubs/gitlab_ci.yml'
))
}
let
(
:blob
)
{
fake_blob
(
path:
'.gitlab-ci.yml'
,
data:
data
)
}
let
(
:blob
)
{
fake_blob
(
path:
'.gitlab-ci.yml'
,
data:
data
)
}
let
(
:sha
)
{
sample_commit
.
id
}
let
(
:sha
)
{
sample_commit
.
id
}
...
...
spec/models/ci/build_spec.rb
View file @
0df39e32
...
@@ -1386,7 +1386,8 @@ describe Ci::Build do
...
@@ -1386,7 +1386,8 @@ describe Ci::Build do
end
end
context
'use from gitlab-ci.yml'
do
context
'use from gitlab-ci.yml'
do
let
(
:pipeline
)
{
create
(
:ci_pipeline
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:pipeline
)
{
create
(
:ci_pipeline
,
project:
project
)
}
before
do
before
do
stub_ci_pipeline_yaml_file
(
config
)
stub_ci_pipeline_yaml_file
(
config
)
...
...
spec/models/ci/pipeline_spec.rb
View file @
0df39e32
...
@@ -248,8 +248,9 @@ describe Ci::Pipeline, :mailer do
...
@@ -248,8 +248,9 @@ describe Ci::Pipeline, :mailer do
end
end
describe
'#stage_seeds'
do
describe
'#stage_seeds'
do
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:pipeline
)
do
let
(
:pipeline
)
do
build
(
:ci_pipeline
,
config:
{
rspec:
{
script:
'rake'
}
})
build
(
:ci_pipeline
,
project:
project
,
config:
{
rspec:
{
script:
'rake'
}
})
end
end
it
'returns preseeded stage seeds object'
do
it
'returns preseeded stage seeds object'
do
...
@@ -259,7 +260,8 @@ describe Ci::Pipeline, :mailer do
...
@@ -259,7 +260,8 @@ describe Ci::Pipeline, :mailer do
end
end
describe
'#seeds_size'
do
describe
'#seeds_size'
do
let
(
:pipeline
)
{
build
(
:ci_pipeline_with_one_job
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:pipeline
)
{
build
(
:ci_pipeline_with_one_job
,
project:
project
)
}
it
'returns number of jobs in stage seeds'
do
it
'returns number of jobs in stage seeds'
do
expect
(
pipeline
.
seeds_size
).
to
eq
1
expect
(
pipeline
.
seeds_size
).
to
eq
1
...
@@ -597,7 +599,8 @@ describe Ci::Pipeline, :mailer do
...
@@ -597,7 +599,8 @@ describe Ci::Pipeline, :mailer do
describe
'#has_stage_seeds?'
do
describe
'#has_stage_seeds?'
do
context
'when pipeline has stage seeds'
do
context
'when pipeline has stage seeds'
do
subject
{
build
(
:ci_pipeline_with_one_job
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
subject
{
build
(
:ci_pipeline_with_one_job
,
project:
project
)
}
it
{
is_expected
.
to
have_stage_seeds
}
it
{
is_expected
.
to
have_stage_seeds
}
end
end
...
@@ -1430,8 +1433,9 @@ describe Ci::Pipeline, :mailer do
...
@@ -1430,8 +1433,9 @@ describe Ci::Pipeline, :mailer do
end
end
context
'when pipeline does not have errors'
do
context
'when pipeline does not have errors'
do
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:pipeline
)
do
let
(
:pipeline
)
do
create
(
:ci_pipeline
,
config:
{
rspec:
{
script:
'rake test'
}
})
create
(
:ci_pipeline
,
project:
project
,
config:
{
rspec:
{
script:
'rake test'
}
})
end
end
it
'does not contain yaml errors'
do
it
'does not contain yaml errors'
do
...
...
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