-To publish a website with Pages, you can use any SSG, -like Gatsby, Jekyll, Hugo, Middleman, Harp, Hexo, and Brunch, just to name a few. You can also -publish any website written directly in plain HTML, CSS, and JavaScript.
-Pages does not support dynamic server-side processing, for instance, as .php and .asp requires. Learn more about
-static websites vs dynamic websites.
Learn more about GitLab Pages:
+
-Optional features:
-
-- Use a [custom domain or subdomain](custom_domains_ssl_tls_certification/index.md#set-up-pages-with-a-custom-domain).
-- Add an [SSL/TLS certificate to secure your site under the HTTPS protocol](custom_domains_ssl_tls_certification/index.md#adding-an-ssltls-certificate-to-pages).
+## Access to your Pages site
If you're using GitLab Pages default domain (`.gitlab.io`),
your website will be automatically secure and available under
HTTPS. If you're using your own custom domain, you can
optionally secure it with SSL/TLS certificates.
-## Access to your Pages site
-
If you're using GitLab.com, your website will be publicly available to the internet.
-
To restrict access to your website, enable [GitLab Pages Access Control](pages_access_control.md).
If you're using a self-managed instance (Core, Starter, Premium, or Ultimate),
@@ -113,7 +120,7 @@ to use and adapt to your own needs:
## Administer GitLab Pages for self-managed instances
-Enable and configure GitLab Pages on your own instance (GitLab Community Edition and Enterprise Editions) with
-the [admin guide](../../../administration/pages/index.md).
+If you are running a self-managed instance of GitLab (GitLab Community Edition and Enterprise Editions),
+[follow the administration steps](../../../administration/pages/index.md) to configure Pages.
-** Watch a [video tutorial](https://www.youtube.com/watch?v=dD8c7WNcc6s) for getting started with GitLab Pages admin!**
+ Watch a [video tutorial](https://www.youtube.com/watch?v=dD8c7WNcc6s) about how to get started with GitLab Pages administration.
diff --git a/lib/gitlab/ci/templates/Jobs/Deploy/ECS.gitlab-ci.yml b/lib/gitlab/ci/templates/Jobs/Deploy/ECS.gitlab-ci.yml
index cba7746cf8d..bb3d5526f3a 100644
--- a/lib/gitlab/ci/templates/Jobs/Deploy/ECS.gitlab-ci.yml
+++ b/lib/gitlab/ci/templates/Jobs/Deploy/ECS.gitlab-ci.yml
@@ -25,7 +25,9 @@ review_ecs:
when: never
- if: '$REVIEW_DISABLED'
when: never
- - if: '$CI_COMMIT_BRANCH != "master"'
+ - if: '$CI_COMMIT_BRANCH == "master"'
+ when: never
+ - if: '$CI_COMMIT_TAG || $CI_COMMIT_BRANCH'
production_ecs:
extends: .deploy_to_ecs
@@ -37,4 +39,6 @@ production_ecs:
when: never
- if: '$CI_KUBERNETES_ACTIVE'
when: never
- - if: '$CI_COMMIT_BRANCH == "master"'
+ - if: '$CI_COMMIT_BRANCH != "master"'
+ when: never
+ - if: '$CI_COMMIT_TAG || $CI_COMMIT_BRANCH'
diff --git a/lib/gitlab/import_export/snippet_repo_restorer.rb b/lib/gitlab/import_export/snippet_repo_restorer.rb
index b58ea14a3a8..3cf2fb1e79c 100644
--- a/lib/gitlab/import_export/snippet_repo_restorer.rb
+++ b/lib/gitlab/import_export/snippet_repo_restorer.rb
@@ -34,14 +34,7 @@ module Gitlab
end
def create_repository_from_db
- snippet.create_repository
-
- commit_attrs = {
- branch_name: 'master',
- message: 'Initial commit'
- }
-
- repository.create_file(@user, snippet.file_name, snippet.content, commit_attrs)
+ Gitlab::BackgroundMigration::BackfillSnippetRepositories.new.perform_by_ids([snippet.id])
end
end
end
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index e800d116408..b93d56bd8b2 100644
--- a/locale/gitlab.pot
+++ b/locale/gitlab.pot
@@ -3726,6 +3726,9 @@ msgstr ""
msgid "Can override approvers and approvals required per merge request"
msgstr ""
+msgid "Can't create snippet: %{err}"
+msgstr ""
+
msgid "Can't edit as source branch was deleted"
msgstr ""
@@ -18384,9 +18387,6 @@ msgstr ""
msgid "Reports|Metrics reports failed loading results"
msgstr ""
-msgid "Reports|Scanner"
-msgstr ""
-
msgid "Reports|Severity"
msgstr ""
@@ -19340,10 +19340,10 @@ msgstr ""
msgid "SecurityReports|Remove project from dashboard"
msgstr ""
-msgid "SecurityReports|Return to dashboard"
+msgid "SecurityReports|Report type"
msgstr ""
-msgid "SecurityReports|Scanner type"
+msgid "SecurityReports|Return to dashboard"
msgstr ""
msgid "SecurityReports|Security Dashboard"
@@ -25958,7 +25958,7 @@ msgstr ""
msgid "ciReport|All projects"
msgstr ""
-msgid "ciReport|All scanner types"
+msgid "ciReport|All report types"
msgstr ""
msgid "ciReport|All severities"
diff --git a/spec/frontend/snippets/components/edit_spec.js b/spec/frontend/snippets/components/edit_spec.js
index ba62a0a92ca..aaaa774b7a0 100644
--- a/spec/frontend/snippets/components/edit_spec.js
+++ b/spec/frontend/snippets/components/edit_spec.js
@@ -1,5 +1,6 @@
import { shallowMount } from '@vue/test-utils';
import axios from '~/lib/utils/axios_utils';
+import Flash from '~/flash';
import { GlLoadingIcon } from '@gitlab/ui';
import { joinPaths, redirectTo } from '~/lib/utils/url_utility';
@@ -10,6 +11,7 @@ import SnippetVisibilityEdit from '~/snippets/components/snippet_visibility_edit
import SnippetBlobEdit from '~/snippets/components/snippet_blob_edit.vue';
import TitleField from '~/vue_shared/components/form/title.vue';
import FormFooterActions from '~/vue_shared/components/form/form_footer_actions.vue';
+import { SNIPPET_CREATE_MUTATION_ERROR, SNIPPET_UPDATE_MUTATION_ERROR } from '~/snippets/constants';
import UpdateSnippetMutation from '~/snippets/mutations/updateSnippet.mutation.graphql';
import CreateSnippetMutation from '~/snippets/mutations/createSnippet.mutation.graphql';
@@ -27,6 +29,8 @@ jest.mock('~/lib/utils/url_utility', () => ({
.mockReturnValue('contentApiURL'),
}));
+jest.mock('~/flash');
+
let flashSpy;
const contentMock = 'Foo Bar';
@@ -290,6 +294,26 @@ describe('Snippet Edit app', () => {
expect(flashSpy).toHaveBeenCalledWith(apiError);
});
});
+
+ it.each`
+ isNew | status | expectation
+ ${true} | ${`new`} | ${SNIPPET_CREATE_MUTATION_ERROR.replace('%{err}', '')}
+ ${false} | ${`existing`} | ${SNIPPET_UPDATE_MUTATION_ERROR.replace('%{err}', '')}
+ `(
+ `renders the correct error message if mutation fails for $status snippet`,
+ ({ isNew, expectation }) => {
+ createComponent({
+ data: {
+ newSnippet: isNew,
+ },
+ mutationRes: mutationTypes.REJECT,
+ });
+ wrapper.vm.handleFormSubmit();
+ return waitForPromises().then(() => {
+ expect(Flash).toHaveBeenCalledWith(expect.stringContaining(expectation));
+ });
+ },
+ );
});
});
});
diff --git a/spec/lib/gitlab/ci/status/stage/play_manual_spec.rb b/spec/lib/gitlab/ci/status/stage/play_manual_spec.rb
index b0113b00ef0..bdcbfed918f 100644
--- a/spec/lib/gitlab/ci/status/stage/play_manual_spec.rb
+++ b/spec/lib/gitlab/ci/status/stage/play_manual_spec.rb
@@ -31,7 +31,7 @@ describe Gitlab::Ci::Status::Stage::PlayManual do
subject { play_manual.action_path }
- it { is_expected.to eq("/#{pipeline.project.full_path}/pipelines/#{pipeline.id}/stages/#{stage.name}/play_manual") }
+ it { is_expected.to eq("/#{pipeline.project.full_path}/-/pipelines/#{pipeline.id}/stages/#{stage.name}/play_manual") }
end
describe '#action_method' do
diff --git a/spec/lib/gitlab/etag_caching/router_spec.rb b/spec/lib/gitlab/etag_caching/router_spec.rb
index b69e4668d61..d9eeb5b9a2b 100644
--- a/spec/lib/gitlab/etag_caching/router_spec.rb
+++ b/spec/lib/gitlab/etag_caching/router_spec.rb
@@ -23,7 +23,7 @@ describe Gitlab::EtagCaching::Router do
it 'matches issue title endpoint' do
result = described_class.match(
- '/my-group/my-project/issues/123/realtime_changes'
+ '/my-group/my-project/-/issues/123/realtime_changes'
)
expect(result).to be_present
@@ -32,7 +32,7 @@ describe Gitlab::EtagCaching::Router do
it 'matches with a project name that includes a suffix of create' do
result = described_class.match(
- '/group/test-create/issues/123/realtime_changes'
+ '/group/test-create/-/issues/123/realtime_changes'
)
expect(result).to be_present
@@ -41,7 +41,7 @@ describe Gitlab::EtagCaching::Router do
it 'matches with a project name that includes a prefix of create' do
result = described_class.match(
- '/group/create-test/issues/123/realtime_changes'
+ '/group/create-test/-/issues/123/realtime_changes'
)
expect(result).to be_present
@@ -50,7 +50,7 @@ describe Gitlab::EtagCaching::Router do
it 'matches project pipelines endpoint' do
result = described_class.match(
- '/my-group/my-project/pipelines.json'
+ '/my-group/my-project/-/pipelines.json'
)
expect(result).to be_present
@@ -95,7 +95,7 @@ describe Gitlab::EtagCaching::Router do
it 'does not match blob with confusing name' do
result = described_class.match(
- '/my-group/my-project/blob/master/pipelines.json'
+ '/my-group/my-project/-/blob/master/pipelines.json'
)
expect(result).to be_blank
@@ -121,7 +121,7 @@ describe Gitlab::EtagCaching::Router do
it 'matches pipeline#show endpoint' do
result = described_class.match(
- '/my-group/my-project/pipelines/2.json'
+ '/my-group/my-project/-/pipelines/2.json'
)
expect(result).to be_present
diff --git a/spec/lib/gitlab/import_export/snippet_repo_restorer_spec.rb b/spec/lib/gitlab/import_export/snippet_repo_restorer_spec.rb
index 3ce950d6a64..737c3e97bb1 100644
--- a/spec/lib/gitlab/import_export/snippet_repo_restorer_spec.rb
+++ b/spec/lib/gitlab/import_export/snippet_repo_restorer_spec.rb
@@ -25,10 +25,9 @@ describe Gitlab::ImportExport::SnippetRepoRestorer do
expect(snippet.repository_exists?).to be_falsey
aggregate_failures do
- expect(restorer.restore).to be_truthy
-
- expect(snippet.repository_exists?).to be_truthy
- expect(snippet.snippet_repository).not_to be_nil
+ expect do
+ expect(restorer.restore).to be_truthy
+ end.to change { SnippetRepository.count }.by(1)
blob = snippet.repository.blob_at('HEAD', snippet.file_name)
expect(blob).not_to be_nil
diff --git a/spec/lib/gitlab/patch/action_dispatch_journey_formatter_spec.rb b/spec/lib/gitlab/patch/action_dispatch_journey_formatter_spec.rb
index 5f0e1f40231..b1c7f73489d 100644
--- a/spec/lib/gitlab/patch/action_dispatch_journey_formatter_spec.rb
+++ b/spec/lib/gitlab/patch/action_dispatch_journey_formatter_spec.rb
@@ -7,7 +7,7 @@ describe Gitlab::Patch::ActionDispatchJourneyFormatter do
let(:project) { create(:project, namespace: group) }
let(:pipeline) { create(:ci_empty_pipeline, project: project) }
let(:url) { Gitlab::Routing.url_helpers.project_pipeline_url(project, pipeline) }
- let(:expected_path) { "#{project.full_path}/pipelines/#{pipeline.id}" }
+ let(:expected_path) { "#{project.full_path}/-/pipelines/#{pipeline.id}" }
context 'custom implementation of #missing_keys' do
before do
diff --git a/spec/models/ci/build_spec.rb b/spec/models/ci/build_spec.rb
index e17471e4527..f5f2d176636 100644
--- a/spec/models/ci/build_spec.rb
+++ b/spec/models/ci/build_spec.rb
@@ -2286,7 +2286,7 @@ describe Ci::Build do
let(:predefined_variables) do
[
{ key: 'CI_PIPELINE_ID', value: pipeline.id.to_s, public: true, masked: false },
- { key: 'CI_PIPELINE_URL', value: project.web_url + "/pipelines/#{pipeline.id}", public: true, masked: false },
+ { key: 'CI_PIPELINE_URL', value: project.web_url + "/-/pipelines/#{pipeline.id}", public: true, masked: false },
{ key: 'CI_JOB_ID', value: build.id.to_s, public: true, masked: false },
{ key: 'CI_JOB_URL', value: project.web_url + "/-/jobs/#{build.id}", public: true, masked: false },
{ key: 'CI_JOB_TOKEN', value: 'my-token', public: false, masked: true },
diff --git a/spec/models/project_services/chat_message/pipeline_message_spec.rb b/spec/models/project_services/chat_message/pipeline_message_spec.rb
index 7c3e48f572a..a7171577063 100644
--- a/spec/models/project_services/chat_message/pipeline_message_spec.rb
+++ b/spec/models/project_services/chat_message/pipeline_message_spec.rb
@@ -61,8 +61,8 @@ describe ChatMessage::PipelineMessage do
it "returns the pipeline summary in the activity's title" do
expect(subject.activity[:title]).to eq(
- "Pipeline [#123](http://example.gitlab.com/pipelines/123)" \
- " of branch [develop](http://example.gitlab.com/commits/develop)" \
+ "Pipeline [#123](http://example.gitlab.com/-/pipelines/123)" \
+ " of branch [develop](http://example.gitlab.com/-/commits/develop)" \
" by The Hacker (hacker) has passed"
)
end
@@ -74,8 +74,8 @@ describe ChatMessage::PipelineMessage do
it "returns the summary with a 'failed' status" do
expect(subject.activity[:title]).to eq(
- "Pipeline [#123](http://example.gitlab.com/pipelines/123)" \
- " of branch [develop](http://example.gitlab.com/commits/develop)" \
+ "Pipeline [#123](http://example.gitlab.com/-/pipelines/123)" \
+ " of branch [develop](http://example.gitlab.com/-/commits/develop)" \
" by The Hacker (hacker) has failed"
)
end
@@ -88,8 +88,8 @@ describe ChatMessage::PipelineMessage do
it "returns the summary with a 'passed with warnings' status" do
expect(subject.activity[:title]).to eq(
- "Pipeline [#123](http://example.gitlab.com/pipelines/123)" \
- " of branch [develop](http://example.gitlab.com/commits/develop)" \
+ "Pipeline [#123](http://example.gitlab.com/-/pipelines/123)" \
+ " of branch [develop](http://example.gitlab.com/-/commits/develop)" \
" by The Hacker (hacker) has passed with warnings"
)
end
@@ -102,8 +102,8 @@ describe ChatMessage::PipelineMessage do
it "returns the summary with 'API' as the username" do
expect(subject.activity[:title]).to eq(
- "Pipeline [#123](http://example.gitlab.com/pipelines/123)" \
- " of branch [develop](http://example.gitlab.com/commits/develop)" \
+ "Pipeline [#123](http://example.gitlab.com/-/pipelines/123)" \
+ " of branch [develop](http://example.gitlab.com/-/commits/develop)" \
" by API has passed"
)
end
@@ -134,8 +134,8 @@ describe ChatMessage::PipelineMessage do
it "returns the pipeline summary as the attachment's fallback property" do
expect(subject.attachments.first[:fallback]).to eq(
"