From 68d7192881c41305da9c6aa1e3f7dd8b47f286a7 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Tue, 15 Jun 2021 15:10:04 +0000 Subject: [PATCH] Add latest changes from gitlab-org/gitlab@master --- GITALY_SERVER_VERSION | 2 +- app/assets/images/mailers/members/issues.png | Bin 0 -> 316 bytes .../mailers/members/merge-request-open.png | Bin 0 -> 327 bytes app/assets/images/mailers/members/users.png | Bin 0 -> 371 bytes .../shared/wikis/components/wiki_form.vue | 8 +- app/assets/stylesheets/mailer.scss | 21 ++ .../admin/application_settings_controller.rb | 2 +- .../infrastructure_registry_controller.rb | 2 +- .../members/invite_email_experiment.rb | 2 +- app/helpers/notify_helper.rb | 32 +- app/models/group.rb | 12 + app/models/project.rb | 2 +- .../notify/member_invited_email.html.haml | 52 ++- .../infrastructure_registry/show.html.haml | 4 +- app/workers/bulk_import_worker.rb | 7 +- config/application.rb | 4 + config/environments/production.rb | 3 + .../infrastructure_registry_page.yml | 2 +- doc/administration/whats-new.md | 3 +- doc/api/graphql/reference/index.md | 17 +- doc/ci/docker/using_kaniko.md | 4 +- doc/ci/environments/index.md | 16 +- doc/ci/migration/jenkins.md | 8 +- doc/ci/parent_child_pipelines.md | 2 +- doc/ci/pipelines/schedules.md | 21 +- doc/ci/triggers/README.md | 12 +- .../variables/where_variables_can_be_used.md | 7 +- doc/ci/yaml/README.md | 37 +- doc/ci/yaml/includes.md | 4 +- doc/development/snowplow/index.md | 2 +- doc/development/usage_ping/index.md | 12 +- doc/user/admin_area/broadcast_messages.md | 79 ++-- doc/user/admin_area/license.md | 14 +- .../dast/browser_based.md | 224 +----------- doc/user/application_security/dast/index.md | 340 ++++++++++-------- doc/user/project/issues/design_management.md | 6 +- .../groups/pipelines/entity_finisher.rb | 18 +- .../menus/packages_registries_menu.rb | 2 +- locale/gitlab.pot | 48 +-- ...infrastructure_registry_controller_spec.rb | 45 +++ .../members/invite_email_experiment_spec.rb | 10 +- spec/factories/bulk_import/trackers.rb | 6 + .../shared/wikis/components/wiki_form_spec.js | 20 +- spec/helpers/notify_helper_spec.rb | 32 +- spec/initializers/database_config_spec.rb | 26 +- .../groups/pipelines/entity_finisher_spec.rb | 34 +- spec/mailers/notify_spec.rb | 19 +- spec/models/group_spec.rb | 52 ++- spec/models/project_spec.rb | 33 ++ spec/support/capybara.rb | 3 +- spec/workers/bulk_import_worker_spec.rb | 22 ++ 51 files changed, 714 insertions(+), 619 deletions(-) create mode 100644 app/assets/images/mailers/members/issues.png create mode 100644 app/assets/images/mailers/members/merge-request-open.png create mode 100644 app/assets/images/mailers/members/users.png create mode 100644 spec/controllers/projects/packages/infrastructure_registry_controller_spec.rb diff --git a/GITALY_SERVER_VERSION b/GITALY_SERVER_VERSION index ad59f7f93a8..8bc2e1d2e8a 100644 --- a/GITALY_SERVER_VERSION +++ b/GITALY_SERVER_VERSION @@ -1 +1 @@ -56aaf62b7d7045b9f6bdcd25566c005e5eca72fd +86d069ca736dfde9fa61f8476e974c7b8c15a1e9 diff --git a/app/assets/images/mailers/members/issues.png b/app/assets/images/mailers/members/issues.png new file mode 100644 index 0000000000000000000000000000000000000000..b68a0a33d24c61391056a0a9609b45616f843192 GIT binary patch literal 316 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbK}T7XZ8E07Ki4RvsEFgG_hHa0dj zH8nCaf{;LliHQkN5Xb*VPj zlvO!#%HCraZ{L0N_{p>9uiyOo^Y_H&!X%(t#w2fd7sVqvykbC3gr|#Rh{WaGbLK(~ z20W~RlYP%6e7g64ipUJ7wp^3XQngF%p0Y9c4=Ei@Zy5DL-!Nv?m&*KUXOC=cN z{8bmEd|}NI`NX|;^Wz@bj5#l>e>kM2UV61%I&}v3p(7$0H9$KUJYD@<);T3K0RZz& BWCj2L literal 0 HcmV?d00001 diff --git a/app/assets/images/mailers/members/merge-request-open.png b/app/assets/images/mailers/members/merge-request-open.png new file mode 100644 index 0000000000000000000000000000000000000000..2485b0ca970792c24f686b83082f55745acce463 GIT binary patch literal 327 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbK}LV!<*E0Bf&V`F1WOG|5OYjbmR zAX{Hw-_+C;$S^T6F#-c11IUGlKm_3;5OGZM|Ns9_?6xieS|C>vS4;N1tJp6&}! W=3MM>{8KI{I6PhbT-G@yGywqT*KElE literal 0 HcmV?d00001 diff --git a/app/assets/images/mailers/members/users.png b/app/assets/images/mailers/members/users.png new file mode 100644 index 0000000000000000000000000000000000000000..b3954ecbf610d08042cbb27fea49e59bfd5b6ce4 GIT binary patch literal 371 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbK}b%0NZE0EUK*4Ee8H#avo1p@;E z12Z!-6B83dLqni|v9Ylc7yw0pY&aLfhLaFAa4tc{|NsA^mv4vxTCZLbh)W;9eDKk$+=#JbY^+Pvm?rR$^h48b? zE9Ne}##pkfSbExWt=EZ*cP+cLsr{w%`@`lvQCCk}tUkrc(E8i4=0k+Z_PZ<#Oxs*S sce4aA{JwA2AR)A#anH5>e+R?;&A$k+ojvk?G0=JjPgg&ebxsLQ0J?yCsQ>@~ literal 0 HcmV?d00001 diff --git a/app/assets/javascripts/pages/shared/wikis/components/wiki_form.vue b/app/assets/javascripts/pages/shared/wikis/components/wiki_form.vue index 1d70958356b..8b7e894667a 100644 --- a/app/assets/javascripts/pages/shared/wikis/components/wiki_form.vue +++ b/app/assets/javascripts/pages/shared/wikis/components/wiki_form.vue @@ -119,7 +119,7 @@ export default { return { title: this.pageInfo.title?.trim() || '', format: this.pageInfo.format || 'markdown', - content: this.pageInfo.content?.trim() || '', + content: this.pageInfo.content || '', isContentEditorLoading: true, useContentEditor: false, commitMessage: '', @@ -131,7 +131,7 @@ export default { computed: { noContent() { if (this.isContentEditorActive) return this.contentEditor?.empty; - return !this.content; + return !this.content.trim(); }, csrfToken() { return csrf.token; @@ -326,7 +326,7 @@ export default {
'.html_safe, + bold_end: ''.html_safe } + %li + %div + %img.mailer-icon{ alt: '', src: image_url("mailers/members/issues.png") } + %span + - issue_count = member_source.open_issues_count(member.created_by) + = n_('%{bold_start}%{count}%{bold_end} issue', '%{bold_start}%{count}%{bold_end} issues', + issue_count).html_safe % { count: number_with_delimiter(issue_count), + bold_start: ''.html_safe, + bold_end: ''.html_safe } + %li + %div + %img.mailer-icon{ alt: '', src: image_url("mailers/members/merge-request-open.png") } + %span + - mr_count = member_source.open_merge_requests_count(member.created_by) + = n_('%{bold_start}%{count}%{bold_end} opened merge request', '%{bold_start}%{count}%{bold_end} opened merge requests', + mr_count).html_safe % { count: number_with_delimiter(mr_count), + bold_start: ''.html_safe, + bold_end: ''.html_safe } + %td.text-content.mailer-align-left.half-width %h4 - = s_('InviteEmail|What can I do with the %{role} permission level?') % { role: member.human_access.downcase } - %p= invited_role_description(member.human_access) + = s_("InviteEmail|What's it about?") + %p + = invited_to_description(member_source) diff --git a/app/views/projects/packages/infrastructure_registry/show.html.haml b/app/views/projects/packages/infrastructure_registry/show.html.haml index 1d826466aad..e5701343b83 100644 --- a/app/views/projects/packages/infrastructure_registry/show.html.haml +++ b/app/views/projects/packages/infrastructure_registry/show.html.haml @@ -1,5 +1,5 @@ -- add_to_breadcrumbs _("Infrastructure Registry"), project_packages_path(@project) -- add_to_breadcrumbs @package.name, project_packages_path(@project) +- add_to_breadcrumbs _("Infrastructure Registry"), project_infrastructure_registry_index_path(@project) +- add_to_breadcrumbs @package.name, project_infrastructure_registry_index_path(@project) - breadcrumb_title @package.version - page_title _("Infrastructure Registry") - @content_class = "limit-container-width" unless fluid_layout diff --git a/app/workers/bulk_import_worker.rb b/app/workers/bulk_import_worker.rb index 8ad31c68374..25a86ead76e 100644 --- a/app/workers/bulk_import_worker.rb +++ b/app/workers/bulk_import_worker.rb @@ -15,7 +15,8 @@ class BulkImportWorker # rubocop:disable Scalability/IdempotentWorker @bulk_import = BulkImport.find_by_id(bulk_import_id) return unless @bulk_import - return if @bulk_import.finished? + return if @bulk_import.finished? || @bulk_import.failed? + return @bulk_import.fail_op! if all_entities_failed? return @bulk_import.finish! if all_entities_processed? && @bulk_import.started? return re_enqueue if max_batch_size_exceeded? # Do not start more jobs if max allowed are already running @@ -55,6 +56,10 @@ class BulkImportWorker # rubocop:disable Scalability/IdempotentWorker entities.all? { |entity| entity.finished? || entity.failed? } end + def all_entities_failed? + entities.all? { |entity| entity.failed? } + end + def max_batch_size_exceeded? started_entities.count >= DEFAULT_BATCH_SIZE end diff --git a/config/application.rb b/config/application.rb index 58b3164ec9f..5e350cb80dd 100644 --- a/config/application.rb +++ b/config/application.rb @@ -165,6 +165,10 @@ module Gitlab # like if you have constraints or database-specific column types config.active_record.schema_format = :sql + # Use new connection handling so that we can use Rails 6.1+ multiple + # database support. + config.active_record.legacy_connection_handling = false + config.action_mailer.delivery_job = "ActionMailer::MailDeliveryJob" # Enable the asset pipeline diff --git a/config/environments/production.rb b/config/environments/production.rb index e1a7db8d860..f1d6b6c8bbc 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -54,6 +54,9 @@ Rails.application.configure do # Enable serving of images, stylesheets, and JavaScripts from an asset server config.action_controller.asset_host = ENV['GITLAB_CDN_HOST'] if ENV['GITLAB_CDN_HOST'].present? + # We use a env var to keep at old default until we enable this for GitLab.com + config.active_record.legacy_connection_handling = !Gitlab::Utils.to_boolean(ENV.fetch('ENABLE_RAILS_61_CONNECTION_HANDLING', false)) + # Do not dump schema after migrations. config.active_record.dump_schema_after_migration = false diff --git a/config/feature_flags/development/infrastructure_registry_page.yml b/config/feature_flags/development/infrastructure_registry_page.yml index fcb34f9d05b..af78744280a 100644 --- a/config/feature_flags/development/infrastructure_registry_page.yml +++ b/config/feature_flags/development/infrastructure_registry_page.yml @@ -5,4 +5,4 @@ rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/326460 milestone: '13.11' type: development group: group::package -default_enabled: false +default_enabled: true diff --git a/doc/administration/whats-new.md b/doc/administration/whats-new.md index a5e3a232890..ae19e0f0341 100644 --- a/doc/administration/whats-new.md +++ b/doc/administration/whats-new.md @@ -29,7 +29,8 @@ in the first patch release, such as `13.10.1`. You can configure the What's new variant: -1. Navigate to **Admin Area > Settings > Preferences**, then expand **What's new**. +1. On the top bar, select **Menu >** **{admin}** **Admin**. +1. On the left sidebar, select **Settings > Preferences**, then expand **What's new**. 1. Choose one of the following options: | Option | Description | diff --git a/doc/api/graphql/reference/index.md b/doc/api/graphql/reference/index.md index fceb3cc9de4..cf5c09c74bb 100644 --- a/doc/api/graphql/reference/index.md +++ b/doc/api/graphql/reference/index.md @@ -9686,12 +9686,27 @@ A block of time for which a participant is on-call. | Name | Type | Description | | ---- | ---- | ----------- | -| `projects` | [`ProjectConnection!`](#projectconnection) | Projects selected in Instance Security Dashboard. (see [Connections](#connections)) | | `vulnerabilityGrades` | [`[VulnerableProjectsByGrade!]!`](#vulnerableprojectsbygrade) | Represents vulnerable project counts for each grade. | | `vulnerabilityScanners` | [`VulnerabilityScannerConnection`](#vulnerabilityscannerconnection) | Vulnerability scanners reported on the vulnerabilities from projects selected in Instance Security Dashboard. (see [Connections](#connections)) | #### Fields with arguments +##### `InstanceSecurityDashboard.projects` + +Projects selected in Instance Security Dashboard. + +Returns [`ProjectConnection!`](#projectconnection). + +This field returns a [connection](#connections). It accepts the +four standard [pagination arguments](#connection-pagination-arguments): +`before: String`, `after: String`, `first: Int`, `last: Int`. + +###### Arguments + +| Name | Type | Description | +| ---- | ---- | ----------- | +| `search` | [`String`](#string) | Search query for project name, path, or description. | + ##### `InstanceSecurityDashboard.vulnerabilitySeveritiesCount` Counts for each vulnerability severity from projects selected in Instance Security Dashboard. diff --git a/doc/ci/docker/using_kaniko.md b/doc/ci/docker/using_kaniko.md index 6e169baf68a..05769cc8f75 100644 --- a/doc/ci/docker/using_kaniko.md +++ b/doc/ci/docker/using_kaniko.md @@ -99,8 +99,8 @@ build: KANIKOCFG="${KANIKOCFG} }" echo "${KANIKOCFG}" > /kaniko/.docker/config.json - /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile $KANIKOPROXYBUILDARGS --destination $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG - only: - - tags + rules: + - if: $CI_COMMIT_TAG ``` ## Using a registry with a custom certificate diff --git a/doc/ci/environments/index.md b/doc/ci/environments/index.md index d7796895964..62c58302886 100644 --- a/doc/ci/environments/index.md +++ b/doc/ci/environments/index.md @@ -99,10 +99,10 @@ deploy_review: environment: name: review/$CI_COMMIT_REF_NAME url: https://$CI_ENVIRONMENT_SLUG.example.com - only: - - branches - except: - - master + rules: + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + when: never + - if: $CI_COMMIT_BRANCH ``` In this example: @@ -158,8 +158,8 @@ deploy_prod: name: production url: https://example.com when: manual - only: - - master + rules: + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH ``` The `when: manual` action: @@ -200,8 +200,8 @@ deploy: url: https://example.com kubernetes: namespace: production - only: - - master + rules: + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH ``` When you use the GitLab Kubernetes integration to deploy to a Kubernetes cluster, diff --git a/doc/ci/migration/jenkins.md b/doc/ci/migration/jenkins.md index 9d3aab4872a..812f1caa5d1 100644 --- a/doc/ci/migration/jenkins.md +++ b/doc/ci/migration/jenkins.md @@ -349,12 +349,14 @@ variable entry. GitLab does support a [`when` keyword](../yaml/README.md#when) which is used to indicate when a job should be run in case of (or despite) failure, but most of the logic for controlling pipelines can be found in -our very powerful [`only/except` rules system](../yaml/README.md#only--except) -(see also our [advanced syntax](../yaml/README.md#only--except)): +our very powerful [`rules` system](../yaml/README.md#rules): ```yaml my_job: - only: [branches] + script: + - echo + rules: + - if: $CI_COMMIT_BRANCH ``` ## Additional resources diff --git a/doc/ci/parent_child_pipelines.md b/doc/ci/parent_child_pipelines.md index 735a04a18b6..82bac7c51d2 100644 --- a/doc/ci/parent_child_pipelines.md +++ b/doc/ci/parent_child_pipelines.md @@ -38,7 +38,7 @@ set of concurrently running child pipelines, but within the same project: Child pipelines work well with other GitLab CI/CD features: -- Use [`only: changes`](yaml/README.md#onlychanges--exceptchanges) to trigger pipelines only when +- Use [`rules: changes`](yaml/README.md#ruleschanges) to trigger pipelines only when certain files change. This is useful for monorepos, for example. - Since the parent pipeline in `.gitlab-ci.yml` and the child pipeline run as normal pipelines, they can have their own behaviors and sequencing in relation to triggers. diff --git a/doc/ci/pipelines/schedules.md b/doc/ci/pipelines/schedules.md index 137e1729c0b..c6a40039816 100644 --- a/doc/ci/pipelines/schedules.md +++ b/doc/ci/pipelines/schedules.md @@ -8,9 +8,6 @@ type: reference, howto # Pipeline schedules **(FREE)** -> - Introduced in GitLab 9.1 as [Trigger Schedule](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/10533). -> - [Renamed to Pipeline Schedule](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/10853) in GitLab 9.2. - Pipelines are normally run based on certain conditions being met. For example, when a branch is pushed to repository. Pipeline schedules can be used to also run [pipelines](index.md) at specific intervals. For example: @@ -54,31 +51,29 @@ is installed on. ### Using variables -> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/12328) in GitLab 9.4. - You can pass any number of arbitrary variables. They are available in GitLab CI/CD so that they can be used in your [`.gitlab-ci.yml` file](../../ci/yaml/README.md). ![Scheduled pipeline variables](img/pipeline_schedule_variables.png) -### Using only and except +### Using `rules` To configure a job to be executed only when the pipeline has been -scheduled (or the opposite), use -[only and except](../yaml/README.md#only--except) configuration keywords. +scheduled, use the [`rules`](../yaml/README.md#rules) keyword. -In the example below `make world` runs in scheduled pipelines, and `make build` runs in pipelines that are not scheduled: +In this example, `make world` runs in scheduled pipelines, and `make build` +runs in branch and tag pipelines: ```yaml job:on-schedule: - only: - - schedules + rules: + - if: $CI_PIPELINE_SOURCE == "schedule" script: - make world job: - except: - - schedules + rules: + - if: $CI_PIPELINE_SOURCE = "push" script: - make build ``` diff --git a/doc/ci/triggers/README.md b/doc/ci/triggers/README.md index 815a43bf3d2..b8d0df44598 100644 --- a/doc/ci/triggers/README.md +++ b/doc/ci/triggers/README.md @@ -57,8 +57,8 @@ trigger_pipeline: stage: deploy script: - curl --request POST --form "token=$CI_JOB_TOKEN" --form ref=main "https://gitlab.example.com/api/v4/projects/9/trigger/pipeline" - only: - - tags + rules: + - if: $CI_COMMIT_TAG ``` Pipelines triggered that way also expose a special variable: @@ -83,8 +83,8 @@ build_submodule: - apt update && apt install -y unzip - curl --location --output artifacts.zip "https://gitlab.example.com/api/v4/projects/1/jobs/artifacts/main/download?job=test&job_token=$CI_JOB_TOKEN" - unzip artifacts.zip - only: - - tags + rules: + - if: $CI_COMMIT_TAG ``` This allows you to use that for multi-project pipelines and download artifacts @@ -163,8 +163,8 @@ trigger_pipeline: stage: deploy script: - 'curl --request POST --form token=TOKEN --form ref=main "https://gitlab.example.com/api/v4/projects/9/trigger/pipeline"' - only: - - tags + rules: + - if: $CI_COMMIT_TAG ``` This means that whenever a new tag is pushed on project A, the job runs and the diff --git a/doc/ci/variables/where_variables_can_be_used.md b/doc/ci/variables/where_variables_can_be_used.md index c449d2f86da..76d4d929ff0 100644 --- a/doc/ci/variables/where_variables_can_be_used.md +++ b/doc/ci/variables/where_variables_can_be_used.md @@ -35,7 +35,7 @@ There are two places defined variables can be used. On the: | `cache:key` | yes | Runner | The variable expansion is made by GitLab Runner's [internal variable expansion mechanism](#gitlab-runner-internal-variable-expansion-mechanism) | | `artifacts:name` | yes | Runner | The variable expansion is made by GitLab Runner's shell environment | | `script`, `before_script`, `after_script` | yes | Script execution shell | The variable expansion is made by the [execution shell environment](#execution-shell-environment) | -| `only:variables:[]`, `except:variables:[]`, `rules:if` | no | n/a | The variable must be in the form of `$variable`. Not supported are the following:

- Variables that are based on the environment's name (`CI_ENVIRONMENT_NAME`, `CI_ENVIRONMENT_SLUG`).
- Any other variables related to environment (currently only `CI_ENVIRONMENT_URL`).
- [Persisted variables](#persisted-variables). | +| `only:variables:[]`, `except:variables:[]`, `rules:if` | no | n/a | The variable must be in the form of `$variable`. Not supported are the following:

- Variables that are based on the environment's name (`CI_ENVIRONMENT_NAME`, `CI_ENVIRONMENT_SLUG`).
- Any other variables related to environment (currently only `CI_ENVIRONMENT_URL`).
- [Persisted variables](#persisted-variables). | ### `config.toml` file @@ -193,7 +193,6 @@ my-job: name: review/$CI_JOB_STAGE/deploy script: - 'deploy staging' - only: - variables: - - $STAGING_SECRET == 'something' + rules: + - if: $STAGING_SECRET == 'something' ``` diff --git a/doc/ci/yaml/README.md b/doc/ci/yaml/README.md index 446be98ec27..d757d0f6016 100644 --- a/doc/ci/yaml/README.md +++ b/doc/ci/yaml/README.md @@ -991,8 +991,8 @@ but you can use as many as eleven. The following example has two levels of inher ```yaml .tests: - only: - - pushes + rules: + - if: $CI_PIPELINE_SOURCE == "push" .rspec: extends: .tests @@ -1028,9 +1028,9 @@ levels. For example: variables: URL: "http://my-url.internal" IMPORTANT_VAR: "the details" - only: - - main - - stable + rules: + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + - if: $CI_COMMIT_BRANCH == "stable" tags: - production script: @@ -1061,9 +1061,9 @@ rspec: URL: "http://docker-url.internal" IMPORTANT_VAR: "the details" GITLAB: "is-awesome" - only: - - main - - stable + rules: + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + - if: $CI_COMMIT_BRANCH == "stable" tags: - docker image: alpine @@ -2333,8 +2333,8 @@ To protect a manual job: name: production url: https://example.com when: manual - only: - - main + rules: + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH ``` 1. In the [protected environments settings](../environments/protected_environments.md#protecting-environments), @@ -3281,8 +3281,8 @@ Create artifacts only for tags (`default-job` doesn't create artifacts): default-job: script: - mvn test -U - except: - - tags + rules: + - if: $CI_COMMIT_BRANCH release-job: script: @@ -3290,8 +3290,8 @@ release-job: artifacts: paths: - target/*.war - only: - - tags + rules: + - if: $CI_COMMIT_TAG ``` You can use wildcards for directories too. For example, if you want to get all the files inside the directories that end with `xyz`: @@ -4370,7 +4370,10 @@ job: description: 'Release description' ``` -It is also possible to create any unique tag, in which case `only: tags` is not mandatory. +It is also possible for the release job to automatically create a new unique tag. In that case, +do not use [`rules`](#rules) or [`only`](#only--except) to configure the job to +only run for tags. + A semantic versioning example: ```yaml @@ -4626,8 +4629,8 @@ pages: artifacts: paths: - public - only: - - main + rules: + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH ``` View the [GitLab Pages user documentation](../../user/project/pages/index.md). diff --git a/doc/ci/yaml/includes.md b/doc/ci/yaml/includes.md index e18d7345d97..549a6fb964b 100644 --- a/doc/ci/yaml/includes.md +++ b/doc/ci/yaml/includes.md @@ -111,8 +111,8 @@ production: environment: name: production url: https://$CI_PROJECT_PATH_SLUG.$KUBE_INGRESS_BASE_DOMAIN - only: - - main + rules: + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH ``` Content of `.gitlab-ci.yml`: diff --git a/doc/development/snowplow/index.md b/doc/development/snowplow/index.md index 2ca678e6b0c..ab69f7b7d53 100644 --- a/doc/development/snowplow/index.md +++ b/doc/development/snowplow/index.md @@ -53,7 +53,7 @@ Snowplow tracking is enabled on GitLab.com, and we use it for most of our tracki To enable Snowplow tracking on a self-managed instance: -1. Go to the Admin Area (**{admin}**) and select **Settings > General**. +1. On the top bar, select **Menu >** **{admin}** **Admin**, then select **Settings > General**. Alternatively, go to `admin/application_settings/general` in your browser. 1. Expand **Snowplow**. diff --git a/doc/development/usage_ping/index.md b/doc/development/usage_ping/index.md index 30059a3cfd5..95dc4f2979a 100644 --- a/doc/development/usage_ping/index.md +++ b/doc/development/usage_ping/index.md @@ -50,10 +50,10 @@ More links: You can view the exact JSON payload sent to GitLab Inc. in the administration panel. To view the payload: 1. Sign in as a user with [Administrator](../../user/permissions.md) permissions. -1. In the top navigation bar, click **(admin)** **Admin Area**. -1. In the left sidebar, go to **Settings > Metrics and profiling**. +1. On the top bar, select **Menu >** **{admin}** **Admin**. +1. On the left sidebar, select **Settings > Metrics and profiling**. 1. Expand the **Usage statistics** section. -1. Click the **Preview payload** button. +1. Select **Preview payload**. For an example payload, see [Example Usage Ping payload](#example-usage-ping-payload). @@ -62,10 +62,10 @@ For an example payload, see [Example Usage Ping payload](#example-usage-ping-pay To disable Usage Ping in the GitLab UI: 1. Sign in as a user with [Administrator](../../user/permissions.md) permissions. -1. In the top navigation bar, click **(admin)** **Admin Area**. -1. In the left sidebar, go to **Settings > Metrics and profiling**. +1. On the top bar, select **Menu >** **{admin}** **Admin**. +1. On the left sidebar, select **Settings > Metrics and profiling**. 1. Expand the **Usage statistics** section. -1. Clear the **Usage Ping** checkbox and click **Save changes**. +1. Clear the **Enable usage ping** checkbox and select **Save changes**. To disable Usage Ping and prevent it from being configured in the future through the administration panel, Omnibus installs can set the following in diff --git a/doc/user/admin_area/broadcast_messages.md b/doc/user/admin_area/broadcast_messages.md index 67a89f896ff..93e6aa9bb16 100644 --- a/doc/user/admin_area/broadcast_messages.md +++ b/doc/user/admin_area/broadcast_messages.md @@ -5,21 +5,14 @@ info: To determine the technical writer assigned to the Stage/Group associated w type: reference, howto --- -# Broadcast Messages **(FREE SELF)** +# Broadcast messages **(FREE SELF)** GitLab can display broadcast messages to all users of a GitLab instance. There are two types of broadcast messages: -- banners -- notifications +- Banners +- Notifications -You can style a message's content using the `a` and `br` HTML tags. The `br` tag inserts a line break. The `a` HTML tag accepts `class` and `style` attributes with the following CSS properties: - -- `color` -- `border` -- `background` -- `padding` -- `margin` -- `text-decoration` +Broadcast messages can be managed using the [broadcast messages API](../../api/broadcast_messages.md). ## Banners @@ -36,6 +29,8 @@ remote: ... ``` +If more than one banner is active at one time, they are displayed in a stack in order of creation. + ## Notifications Notifications are shown on the bottom right of a page and can contain placeholders. A placeholder is replaced with an attribute of the active user. Placeholders must be surrounded by curly braces, for example `{{name}}`. @@ -51,65 +46,63 @@ If the user is not signed in, user related values are empty. ![Broadcast Message Notification](img/broadcast_messages_notification_v12_10.png) -Broadcast messages can be managed using the [broadcast messages API](../../api/broadcast_messages.md). +If more than one notification is active at one time, only the newest is shown. -NOTE: -If more than one banner message is active at one time, they are displayed in a stack in order of creation. -If more than one notification message is active at one time, only the newest is shown. +## Add a broadcast message -## Adding a broadcast message - -To display messages to users on your GitLab instance, add broadcast message. +To display messages to users on your GitLab instance, add a broadcast message. To add a broadcast message: -1. Navigate to the **Admin Area > Messages** page. -1. Add the text for the message to the **Message** field. Markdown and emoji are supported. +1. On the top bar, select **Menu >** **{admin}** **Admin**. +1. On the left sidebar, select **Messages**. +1. Add the text for the message to the **Message** field. You can style a message's content using Markdown, emoji, and the `a` and `br` HTML tags. + The `br` tag inserts a line break. The `a` HTML tag accepts `class` and `style` attributes with the following CSS properties: + - `color` + - `border` + - `background` + - `padding` + - `margin` + - `text-decoration` 1. Select one of the suggested background colors, or add the hex code of a different color. The default color is orange. +1. Select the **Dismissable** checkbox to enable users to dismiss the broadcast message. 1. If required, add a **Target Path** to only show the broadcast message on URLs matching that path. You can use the wildcard character `*` to match multiple URLs, for example `mygroup/myproject*`. 1. Select a date for the message to start and end. -1. Click the **Add broadcast message** button. - -NOTE: -When scoping messages, you can't use preceding or trailing slashes. For example, -instead of `/mygroup/myproject/`, you must use `mygroup/myproject`. A fix is -[planned for GitLab 13.12](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/59482). +1. Select **Add broadcast message**. NOTE: The **Background color** field expects the value to be a hexadecimal code because the form uses the [color_field](https://api.rubyonrails.org/v6.0.3.4/classes/ActionView/Helpers/FormHelper.html#method-i-color_field) helper method, which generates the proper HTML to render. -NOTE: -Once a broadcast message has expired, it is no longer displayed in the UI but is still listed in the -list of broadcast messages. User can also dismiss a broadcast message if the option **Dismissable** is set. +When a broadcast message expires, it no longer displays in the user interface but is still listed in the +list of broadcast messages. -## Editing a broadcast message +## Edit a broadcast message -If changes are required to a broadcast message, they can be edited. +If you need to make changes to a broadcast message, you can edit it. To edit a broadcast message: -1. Navigate to the **Admin Area > Messages** page. -1. From the list of broadcast messages, click the appropriate button to edit the message. -1. After making the required changes, click the **Update broadcast message** button. +1. On the top bar, select **Menu >** **{admin}** **Admin**. +1. On the left sidebar, select **Messages**. +1. From the list of broadcast messages, select the edit button for the message. +1. After making the required changes, select **Update broadcast message**. -NOTE: Expired messages can be made active again by changing their end date. -## Deleting a broadcast message +## Delete a broadcast message -Broadcast messages that are no longer required can be deleted. +If you no longer require a broadcast message, you can delete it. +You can delete a broadcast message while it's active. To delete a broadcast message: -1. Navigate to the **Admin Area > Messages** page. -1. From the list of broadcast messages, click the appropriate button to delete the message. +1. On the top bar, select **Menu >** **{admin}** **Admin**. +1. On the left sidebar, select **Messages**. +1. From the list of broadcast messages, select the delete button for the message. -Once deleted, the broadcast message is removed from the list of broadcast messages. - -NOTE: -Broadcast messages can be deleted while active. +When a broadcast message is deleted, it's removed from the list of broadcast messages.