From 3e78ae6ec18bcd692f8250091e053db40801bf09 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Thu, 25 Jun 2020 21:08:39 +0000 Subject: [PATCH] Add latest changes from gitlab-org/gitlab@master --- ...00624075411_add_storage_size_limit_to_plan_limit.rb | 9 +++++++++ db/structure.sql | 4 +++- doc/ci/variables/predefined_variables.md | 3 --- doc/development/fe_guide/accessibility.md | 2 +- doc/user/packages/container_registry/index.md | 10 +++++++--- spec/models/plan_limits_spec.rb | 1 + 6 files changed, 21 insertions(+), 8 deletions(-) create mode 100644 db/migrate/20200624075411_add_storage_size_limit_to_plan_limit.rb diff --git a/db/migrate/20200624075411_add_storage_size_limit_to_plan_limit.rb b/db/migrate/20200624075411_add_storage_size_limit_to_plan_limit.rb new file mode 100644 index 00000000000..7d1b081be02 --- /dev/null +++ b/db/migrate/20200624075411_add_storage_size_limit_to_plan_limit.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +class AddStorageSizeLimitToPlanLimit < ActiveRecord::Migration[6.0] + DOWNTIME = false + + def change + add_column :plan_limits, :storage_size_limit, :integer, default: 0, null: false + end +end diff --git a/db/structure.sql b/db/structure.sql index d93bd9ec212..540d0166b47 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -5032,7 +5032,8 @@ CREATE TABLE public.plan_limits ( ci_project_subscriptions integer DEFAULT 2 NOT NULL, ci_pipeline_schedules integer DEFAULT 10 NOT NULL, offset_pagination_limit integer DEFAULT 50000 NOT NULL, - ci_instance_level_variables integer DEFAULT 25 NOT NULL + ci_instance_level_variables integer DEFAULT 25 NOT NULL, + storage_size_limit integer DEFAULT 0 NOT NULL ); CREATE SEQUENCE public.plan_limits_id_seq @@ -14163,5 +14164,6 @@ COPY "schema_migrations" (version) FROM STDIN; 20200623000148 20200623000320 20200623121135 +20200624075411 \. diff --git a/doc/ci/variables/predefined_variables.md b/doc/ci/variables/predefined_variables.md index c6cf33e5610..a57a464cddf 100644 --- a/doc/ci/variables/predefined_variables.md +++ b/doc/ci/variables/predefined_variables.md @@ -25,7 +25,6 @@ You can add a command to your `.gitlab-ci.yml` file to | Variable | GitLab | Runner | Description | |-----------------------------------------------|--------|--------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `ARTIFACT_DOWNLOAD_ATTEMPTS` | 8.15 | 1.9 | Number of attempts to download artifacts running a job | | `CHAT_CHANNEL` | 10.6 | all | Source chat channel which triggered the [ChatOps](../chatops/README.md) command | | `CHAT_INPUT` | 10.6 | all | Additional arguments passed in the [ChatOps](../chatops/README.md) command | | `CI` | all | 0.4 | Mark that job is executed in CI environment | @@ -130,11 +129,9 @@ You can add a command to your `.gitlab-ci.yml` file to | `CI_SERVER_VERSION_MINOR` | 11.4 | all | GitLab version minor component | | `CI_SERVER_VERSION_PATCH` | 11.4 | all | GitLab version patch component | | `CI_SHARED_ENVIRONMENT` | all | 10.1 | Marks that the job is executed in a shared environment (something that is persisted across CI invocations like `shell` or `ssh` executor). If the environment is shared, it is set to true, otherwise it is not defined at all. | -| `GET_SOURCES_ATTEMPTS` | 8.15 | 1.9 | Number of attempts to fetch sources running a job | | `GITLAB_CI` | all | all | Mark that job is executed in GitLab CI/CD environment | | `GITLAB_FEATURES` | 10.6 | all | The comma separated list of licensed features available for your instance and plan | | `GITLAB_USER_EMAIL` | 8.12 | all | The email of the user who started the job | | `GITLAB_USER_ID` | 8.12 | all | The ID of the user who started the job | | `GITLAB_USER_LOGIN` | 10.0 | all | The login username of the user who started the job | | `GITLAB_USER_NAME` | 10.0 | all | The real name of the user who started the job | -| `RESTORE_CACHE_ATTEMPTS` | 8.15 | 1.9 | Number of attempts to restore the cache running a job | diff --git a/doc/development/fe_guide/accessibility.md b/doc/development/fe_guide/accessibility.md index 998c71135fb..669c93eb251 100644 --- a/doc/development/fe_guide/accessibility.md +++ b/doc/development/fe_guide/accessibility.md @@ -1,4 +1,4 @@ -# Accessibility +# Accessibility & Readability ## Resources diff --git a/doc/user/packages/container_registry/index.md b/doc/user/packages/container_registry/index.md index c204bb0b5d5..ee455eeda8e 100644 --- a/doc/user/packages/container_registry/index.md +++ b/doc/user/packages/container_registry/index.md @@ -495,15 +495,19 @@ older tags and images are regularly removed from the Container Registry. > [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/15398) in GitLab 12.8. +For a specific project, if you want to remove tags you no longer need, +you can create an expiration policy. When the policy is applied, tags matching the regex pattern are removed. +The underlying layers and images remain. + +To delete the underlying layers and images no longer associated with any tags, Instance Administrators can use +[garbage collection](../../../administration/packages/container_registry.md#removing-unused-layers-not-referenced-by-manifests) with the `-m` switch. + NOTE: **Note:** For GitLab.com, expiration policies are not available for projects created before GitLab 12.8. For self-managed instances, expiration policies may be enabled by an admin in the [CI/CD Package Registry settings](./../../admin_area/settings/index.md#cicd). Note the inherent [risks involved](./index.md#use-with-external-container-registries). -It is possible to create a per-project expiration policy, so that you can make sure that -older tags and images are regularly removed from the Container Registry. - The expiration policy algorithm starts by collecting all the tags for a given repository in a list, then goes through a process of excluding tags from it until only the ones to be deleted remain: diff --git a/spec/models/plan_limits_spec.rb b/spec/models/plan_limits_spec.rb index 0eecdfc643e..788b7d92bd2 100644 --- a/spec/models/plan_limits_spec.rb +++ b/spec/models/plan_limits_spec.rb @@ -52,6 +52,7 @@ RSpec.describe PlanLimits do ci_active_pipelines ci_pipeline_size ci_active_jobs + storage_size_limit ] end