Commit 0df39e32 authored by Mayra Cabrera's avatar Mayra Cabrera Committed by Kamil Trzciński

Move external files support from Premium to Starter

parent 01990196
......@@ -364,6 +364,7 @@ skip the download step.
### include
> 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.
......@@ -1755,4 +1756,4 @@ CI with various languages.
[ce-7447]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7447
[ce-3442]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/3442
[schedules]: ../../user/project/pipelines/schedules.md
[ee]: https://about.gitlab.com/gitlab-ee/
[gitlab-versions]: https://about.gitlab.com/products/
......@@ -12,6 +12,7 @@ class License < ActiveRecord::Base
contribution_analytics
elastic_search
export_issues
external_files_in_gitlab_ci
group_webhooks
issuable_default_templates
issue_board_focus_mode
......@@ -39,7 +40,6 @@ class License < ActiveRecord::Base
db_load_balancing
deploy_board
extended_audit_events
external_files_in_gitlab_ci
file_locks
geo
group_issue_boards
......
---
title: Move support of external gitlab-ci files from Premium to Starter
merge_request: 4841
author:
type: added
......@@ -14,7 +14,7 @@ describe EE::Gitlab::Ci::Config do
end
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
allow(project).to receive(:feature_available?).with(:external_files_in_gitlab_ci).and_return(false)
end
......@@ -27,7 +27,7 @@ describe EE::Gitlab::Ci::Config do
end
end
context 'when the project has EEP license' do
context 'when the project has a valid license' do
let(:remote_file_content) do
<<~HEREDOC
variables:
......
......@@ -2,7 +2,7 @@ require 'spec_helper'
describe EE::Gitlab::Ci::Pipeline::Chain::Limit::Size do
set(:namespace) { create(:namespace, plan: :gold_plan) }
set(:project) { create(:project, namespace: namespace) }
set(:project) { create(:project, :repository, namespace: namespace) }
set(:user) { create(:user) }
let(:pipeline) do
......
......@@ -2,7 +2,7 @@ require 'spec_helper'
describe EE::Gitlab::Ci::Pipeline::Quota::Size do
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(:limit) { described_class.new(namespace, pipeline) }
......
require 'spec_helper'
describe Gitlab::Ci::Pipeline::Chain::Create do
set(:project) { create(:project) }
set(:project) { create(:project, :repository) }
set(:user) { create(:user) }
let(:pipeline) do
......
require 'spec_helper'
describe Gitlab::Ci::Pipeline::Chain::Validate::Config do
set(:project) { create(:project) }
set(:project) { create(:project, :repository) }
set(:user) { create(:user) }
let(:command) do
......
......@@ -4,7 +4,7 @@ describe BlobViewer::GitlabCiYml do
include FakeBlobHelpers
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(:blob) { fake_blob(path: '.gitlab-ci.yml', data: data) }
let(:sha) { sample_commit.id }
......
......@@ -1386,7 +1386,8 @@ describe Ci::Build do
end
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
stub_ci_pipeline_yaml_file(config)
......
......@@ -248,8 +248,9 @@ describe Ci::Pipeline, :mailer do
end
describe '#stage_seeds' do
let(:project) { create(:project, :repository) }
let(:pipeline) do
build(:ci_pipeline, config: { rspec: { script: 'rake' } })
build(:ci_pipeline, project: project, config: { rspec: { script: 'rake' } })
end
it 'returns preseeded stage seeds object' do
......@@ -259,7 +260,8 @@ describe Ci::Pipeline, :mailer do
end
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
expect(pipeline.seeds_size).to eq 1
......@@ -597,7 +599,8 @@ describe Ci::Pipeline, :mailer do
describe '#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 }
end
......@@ -1430,8 +1433,9 @@ describe Ci::Pipeline, :mailer do
end
context 'when pipeline does not have errors' do
let(:project) { create(:project, :repository) }
let(:pipeline) do
create(:ci_pipeline, config: { rspec: { script: 'rake test' } })
create(:ci_pipeline, project: project, config: { rspec: { script: 'rake test' } })
end
it 'does not contain yaml errors' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment