summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--GITLAB_PAGES_VERSION2
-rw-r--r--app/models/ci/build.rb2
-rw-r--r--app/models/concerns/ci/processable.rb8
-rw-r--r--app/models/pages_domain.rb2
-rw-r--r--app/views/projects/settings/ci_cd/show.html.haml3
-rw-r--r--app/views/shared/runners/_runner_description.html.haml2
-rw-r--r--changelogs/unreleased/jj-ramirez-master-patch-71805.yml5
-rw-r--r--changelogs/unreleased/update-pages-1-12.yml5
-rw-r--r--locale/gitlab.pot9
-rw-r--r--spec/features/projects/pages_lets_encrypt_spec.rb14
-rw-r--r--spec/features/projects/pages_spec.rb15
-rw-r--r--spec/workers/pages_domain_ssl_renewal_cron_worker_spec.rb2
12 files changed, 56 insertions, 13 deletions
diff --git a/GITLAB_PAGES_VERSION b/GITLAB_PAGES_VERSION
index 1cac385c6cb..0eed1a29efd 100644
--- a/GITLAB_PAGES_VERSION
+++ b/GITLAB_PAGES_VERSION
@@ -1 +1 @@
-1.11.0
+1.12.0
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb
index 62815589c3c..4804364d404 100644
--- a/app/models/ci/build.rb
+++ b/app/models/ci/build.rb
@@ -42,7 +42,6 @@ module Ci
has_one :deployment, as: :deployable, class_name: 'Deployment'
has_many :trace_sections, class_name: 'Ci::BuildTraceSection'
has_many :trace_chunks, class_name: 'Ci::BuildTraceChunk', foreign_key: :build_id
- has_many :needs, class_name: 'Ci::BuildNeed', foreign_key: :build_id, inverse_of: :build
has_many :job_artifacts, class_name: 'Ci::JobArtifact', foreign_key: :job_id, dependent: :destroy, inverse_of: :job # rubocop:disable Cop/ActiveRecordDependent
has_many :job_variables, class_name: 'Ci::JobVariable', foreign_key: :job_id
@@ -56,7 +55,6 @@ module Ci
accepts_nested_attributes_for :runner_session
accepts_nested_attributes_for :job_variables
- accepts_nested_attributes_for :needs
delegate :url, to: :runner_session, prefix: true, allow_nil: true
delegate :terminal_specification, to: :runner_session, allow_nil: true
diff --git a/app/models/concerns/ci/processable.rb b/app/models/concerns/ci/processable.rb
index 268fa8ec692..ed0087f34d4 100644
--- a/app/models/concerns/ci/processable.rb
+++ b/app/models/concerns/ci/processable.rb
@@ -8,6 +8,14 @@ module Ci
#
#
module Processable
+ extend ActiveSupport::Concern
+
+ included do
+ has_many :needs, class_name: 'Ci::BuildNeed', foreign_key: :build_id, inverse_of: :build
+
+ accepts_nested_attributes_for :needs
+ end
+
def schedulable?
raise NotImplementedError
end
diff --git a/app/models/pages_domain.rb b/app/models/pages_domain.rb
index 7903a2182dd..3869d86b667 100644
--- a/app/models/pages_domain.rb
+++ b/app/models/pages_domain.rb
@@ -24,6 +24,8 @@ class PagesDomain < ApplicationRecord
validate :validate_matching_key, if: ->(domain) { domain.certificate.present? || domain.key.present? }
validate :validate_intermediates, if: ->(domain) { domain.certificate.present? && domain.certificate_changed? }
+ default_value_for(:auto_ssl_enabled, allow_nil: false) { ::Gitlab::LetsEncrypt.enabled? }
+
attr_encrypted :key,
mode: :per_attribute_iv_and_salt,
insecure_mode: true,
diff --git a/app/views/projects/settings/ci_cd/show.html.haml b/app/views/projects/settings/ci_cd/show.html.haml
index 87000e8270b..862db23e856 100644
--- a/app/views/projects/settings/ci_cd/show.html.haml
+++ b/app/views/projects/settings/ci_cd/show.html.haml
@@ -37,7 +37,8 @@
%button.btn.js-settings-toggle{ type: 'button' }
= expanded ? _('Collapse') : _('Expand')
%p
- = _("Register and see your runners for this project.")
+ = _("Runners are processes that pick up and execute jobs for GitLab. Here you can register and see your Runners for this project.")
+ = link_to s_('More information'), help_page_path('ci/runners/README')
.settings-content
= render 'projects/runners/index'
diff --git a/app/views/shared/runners/_runner_description.html.haml b/app/views/shared/runners/_runner_description.html.haml
index 5935750ca06..a47bbd55325 100644
--- a/app/views/shared/runners/_runner_description.html.haml
+++ b/app/views/shared/runners/_runner_description.html.haml
@@ -1,6 +1,6 @@
.light.prepend-top-default
%p
- = _("A 'Runner' is a process which runs a job. You can set up as many Runners as you need.")
+ = _("You can set up as many Runners as you need to run your jobs.")
%br
= _('Runners can be placed on separate users, servers, and even on your local machine.')
diff --git a/changelogs/unreleased/jj-ramirez-master-patch-71805.yml b/changelogs/unreleased/jj-ramirez-master-patch-71805.yml
new file mode 100644
index 00000000000..b3ca8261601
--- /dev/null
+++ b/changelogs/unreleased/jj-ramirez-master-patch-71805.yml
@@ -0,0 +1,5 @@
+---
+title: Update Runners Settings Text + Link to Docs
+merge_request: 18534
+author:
+type: changed
diff --git a/changelogs/unreleased/update-pages-1-12.yml b/changelogs/unreleased/update-pages-1-12.yml
new file mode 100644
index 00000000000..36d61acaf15
--- /dev/null
+++ b/changelogs/unreleased/update-pages-1-12.yml
@@ -0,0 +1,5 @@
+---
+title: Upgrade pages to 1.12.0
+merge_request: 20217
+author:
+type: added
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index 204c138b9d6..5d854b93112 100644
--- a/locale/gitlab.pot
+++ b/locale/gitlab.pot
@@ -14082,9 +14082,6 @@ msgstr ""
msgid "Register and see your runners for this group."
msgstr ""
-msgid "Register and see your runners for this project."
-msgstr ""
-
msgid "Register for GitLab"
msgstr ""
@@ -14720,6 +14717,9 @@ msgstr ""
msgid "Runners activated for this project"
msgstr ""
+msgid "Runners are processes that pick up and execute jobs for GitLab. Here you can register and see your Runners for this project."
+msgstr ""
+
msgid "Runners can be placed on separate users, servers, and even on your local machine."
msgstr ""
@@ -19722,6 +19722,9 @@ msgstr ""
msgid "You can see your chat accounts."
msgstr ""
+msgid "You can set up as many Runners as you need to run your jobs."
+msgstr ""
+
msgid "You can set up jobs to only use Runners with specific tags. Separate tags with commas."
msgstr ""
diff --git a/spec/features/projects/pages_lets_encrypt_spec.rb b/spec/features/projects/pages_lets_encrypt_spec.rb
index 19c61487e16..d09014e915d 100644
--- a/spec/features/projects/pages_lets_encrypt_spec.rb
+++ b/spec/features/projects/pages_lets_encrypt_spec.rb
@@ -23,6 +23,18 @@ describe "Pages with Let's Encrypt", :https_pages_enabled do
end
end
+ it "creates new domain with Let's Encrypt enabled by default" do
+ visit new_project_pages_domain_path(project)
+
+ fill_in 'Domain', with: 'my.test.domain.com'
+
+ expect(find("#pages_domain_auto_ssl_enabled", visible: false).value).to eq 'true'
+ click_button 'Create New Domain'
+
+ expect(page).to have_content('my.test.domain.com')
+ expect(PagesDomain.find_by_domain('my.test.domain.com').auto_ssl_enabled).to eq(true)
+ end
+
context 'when the auto SSL management is initially disabled' do
let(:domain) do
create(:pages_domain, auto_ssl_enabled: false, project: project)
@@ -96,7 +108,7 @@ describe "Pages with Let's Encrypt", :https_pages_enabled do
end
context 'when certificate is provided by user' do
- let(:domain) { create(:pages_domain, project: project) }
+ let(:domain) { create(:pages_domain, project: project, auto_ssl_enabled: false) }
it 'user sees certificate subject' do
visit edit_project_pages_domain_path(project, domain)
diff --git a/spec/features/projects/pages_spec.rb b/spec/features/projects/pages_spec.rb
index eab0aefbe84..3c4b5b2c4ca 100644
--- a/spec/features/projects/pages_spec.rb
+++ b/spec/features/projects/pages_spec.rb
@@ -133,7 +133,7 @@ shared_examples 'pages settings editing' do
end
end
- context 'when pages are exposed on external HTTPS address', :https_pages_enabled do
+ context 'when pages are exposed on external HTTPS address', :https_pages_enabled, :js do
let(:certificate_pem) do
<<~PEM
-----BEGIN CERTIFICATE-----
@@ -178,6 +178,11 @@ shared_examples 'pages settings editing' do
visit new_project_pages_domain_path(project)
fill_in 'Domain', with: 'my.test.domain.com'
+
+ if ::Gitlab::LetsEncrypt.enabled?
+ find('.js-auto-ssl-toggle-container .project-feature-toggle').click
+ end
+
fill_in 'Certificate (PEM)', with: certificate_pem
fill_in 'Key (PEM)', with: certificate_key
click_button 'Create New Domain'
@@ -202,7 +207,7 @@ shared_examples 'pages settings editing' do
describe 'updating the certificate for an existing domain' do
let!(:domain) do
- create(:pages_domain, project: project)
+ create(:pages_domain, project: project, auto_ssl_enabled: false)
end
it 'allows the certificate to be updated' do
@@ -215,7 +220,7 @@ shared_examples 'pages settings editing' do
end
context 'when the certificate is invalid' do
- let_it_be(:domain) do
+ let!(:domain) do
create(:pages_domain, :without_certificate, :without_key, project: project)
end
@@ -224,6 +229,10 @@ shared_examples 'pages settings editing' do
within('#content-body') { click_link 'Edit' }
+ if ::Gitlab::LetsEncrypt.enabled?
+ find('.js-auto-ssl-toggle-container .project-feature-toggle').click
+ end
+
fill_in 'Certificate (PEM)', with: 'invalid data'
click_button 'Save Changes'
diff --git a/spec/workers/pages_domain_ssl_renewal_cron_worker_spec.rb b/spec/workers/pages_domain_ssl_renewal_cron_worker_spec.rb
index 08a3511f70b..10c23cbb6d4 100644
--- a/spec/workers/pages_domain_ssl_renewal_cron_worker_spec.rb
+++ b/spec/workers/pages_domain_ssl_renewal_cron_worker_spec.rb
@@ -13,7 +13,7 @@ describe PagesDomainSslRenewalCronWorker do
describe '#perform' do
let(:project) { create :project }
- let!(:domain) { create(:pages_domain, project: project) }
+ let!(:domain) { create(:pages_domain, project: project, auto_ssl_enabled: false) }
let!(:domain_with_enabled_auto_ssl) { create(:pages_domain, project: project, auto_ssl_enabled: true) }
let!(:domain_with_obtained_letsencrypt) do
create(:pages_domain, :letsencrypt, project: project, auto_ssl_enabled: true)