From 02c48d0a6bf00afd66a603253ec59db4e1412392 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Mon, 30 May 2022 15:08:03 +0000 Subject: [PATCH] Add latest changes from gitlab-org/gitlab@master --- .gitlab/ci/rules.gitlab-ci.yml | 6 +- .gitlab/ci/yaml.gitlab-ci.yml | 19 +- .yamllint | 40 ++- .../components/value_stream_metrics.vue | 8 +- .../javascripts/groups/components/app.vue | 2 +- app/assets/javascripts/logo.js | 4 +- .../pages/profiles/two_factor_auths/index.js | 2 +- .../permissions/components/settings_panel.vue | 82 ++++++- .../drawer/cards/first_pipeline_card.vue | 11 +- .../cards/pipeline_config_reference_card.vue | 43 +++- .../components/editor/ci_editor_header.vue | 13 +- .../javascripts/pipeline_editor/constants.js | 17 +- .../pipeline_wizard/templates/.gitkeep | 0 app/controllers/projects_controller.rb | 2 + app/helpers/projects_helper.rb | 1 + app/models/ci/job_artifact.rb | 3 +- app/models/ci/pipeline.rb | 1 + .../project_features_compatibility.rb | 4 + app/models/deployment.rb | 44 ++++ app/models/environment.rb | 12 +- app/models/project.rb | 21 +- app/models/project_feature.rb | 20 +- .../projects/build_artifacts_size_refresh.rb | 5 +- app/serializers/environment_serializer.rb | 22 +- .../resource_access_tokens/create_service.rb | 10 +- app/views/profiles/preferences/show.html.haml | 11 +- ...load_environment_last_deployment_group.yml | 8 + .../package_registry_access_level.yml | 8 + ...stry_access_level_into_project_features.rb | 13 + ...h_start_to_build_artifacts_size_refresh.rb | 7 + db/schema_migrations/20220314094841 | 1 + db/schema_migrations/20220519141345 | 1 + db/structure.sql | 6 +- doc/administration/monitoring/ip_whitelist.md | 4 +- doc/api/project_access_tokens.md | 2 + .../cicd/img/pipeline_wizard_sample_step1.png | Bin 0 -> 111572 bytes .../cicd/img/pipeline_wizard_sample_step2.png | Bin 0 -> 63127 bytes .../cicd/img/pipeline_wizard_sample_step3.png | Bin 0 -> 62711 bytes doc/development/cicd/pipeline_wizard.md | 229 ++++++++++++++++++ doc/raketasks/backup_restore.md | 15 +- doc/user/gitlab_com/index.md | 2 +- .../project/settings/project_access_tokens.md | 2 + .../import_export/project/import_export.yml | 2 + locale/gitlab.pot | 6 + spec/factories/environments.rb | 2 +- spec/factories/projects.rb | 2 + .../projects/environments/environment_spec.rb | 2 + .../projects/features_visibility_spec.rb | 2 +- .../settings/packages_settings_spec.rb | 24 +- .../value_stream_metrics_spec.js | 6 +- .../components/settings_panel_spec.js | 109 ++++++++- .../drawer/cards/first_pipeline_card_spec.js | 27 ++- .../pipeline_config_reference_card_spec.js | 48 +++- .../editor/ci_editor_header_spec.js | 33 ++- spec/lib/gitlab/import_export/all_models.yml | 1 + .../import_export/safe_model_attributes.yml | 1 + spec/models/ci/job_artifact_spec.rb | 19 +- spec/models/ci/pipeline_spec.rb | 11 + .../project_features_compatibility_spec.rb | 2 +- spec/models/deployment_spec.rb | 137 +++++++++++ spec/models/environment_spec.rb | 40 +-- spec/models/project_feature_spec.rb | 50 +++- spec/models/project_spec.rb | 38 +++ .../build_artifacts_size_refresh_spec.rb | 19 +- spec/requests/api/project_attributes.yml | 1 + .../environment_serializer_spec.rb | 26 +- .../environments/stop_service_spec.rb | 39 ++- ..._artifacts_size_statistics_service_spec.rb | 13 +- .../create_service_spec.rb | 40 ++- .../environment_serializer_shared_examples.rb | 10 +- 70 files changed, 1262 insertions(+), 149 deletions(-) create mode 100644 app/assets/javascripts/pipeline_wizard/templates/.gitkeep create mode 100644 config/feature_flags/development/batch_load_environment_last_deployment_group.yml create mode 100644 config/feature_flags/development/package_registry_access_level.yml create mode 100644 db/migrate/20220314094841_add_package_registry_access_level_into_project_features.rb create mode 100644 db/migrate/20220519141345_add_job_artifact_id_on_refresh_start_to_build_artifacts_size_refresh.rb create mode 100644 db/schema_migrations/20220314094841 create mode 100644 db/schema_migrations/20220519141345 create mode 100644 doc/development/cicd/img/pipeline_wizard_sample_step1.png create mode 100644 doc/development/cicd/img/pipeline_wizard_sample_step2.png create mode 100644 doc/development/cicd/img/pipeline_wizard_sample_step3.png create mode 100644 doc/development/cicd/pipeline_wizard.md diff --git a/.gitlab/ci/rules.gitlab-ci.yml b/.gitlab/ci/rules.gitlab-ci.yml index 83f42982dab..87f011aa132 100644 --- a/.gitlab/ci/rules.gitlab-ci.yml +++ b/.gitlab/ci/rules.gitlab-ci.yml @@ -175,10 +175,8 @@ - ".gitlab/ci/workhorse.gitlab-ci.yml" .yaml-lint-patterns: &yaml-lint-patterns - - ".gitlab-ci.yml" - - ".gitlab/ci/**/*.yml" - - "data/**/*.yml" - - "lib/gitlab/ci/templates/**/*.yml" + - "*.yml" + - "**/*.yml" .docs-patterns: &docs-patterns - ".gitlab/route-map.yml" diff --git a/.gitlab/ci/yaml.gitlab-ci.yml b/.gitlab/ci/yaml.gitlab-ci.yml index ac32e4226e2..a0665d712dc 100644 --- a/.gitlab/ci/yaml.gitlab-ci.yml +++ b/.gitlab/ci/yaml.gitlab-ci.yml @@ -1,6 +1,21 @@ -# Yamllint of CI-related yaml. +# Yamllint of yaml files. + # This uses rules from project root `.yamllint`. lint-yaml: + extends: + - .default-retry + - .yaml-lint:rules + image: pipelinecomponents/yamllint:latest + stage: lint + needs: [] + script: + - yamllint --strict -f colored . + +# The jobs below will not use the configuration present in `.yamllint` (it's because of the -d option) +# +# Docs: https://yamllint.readthedocs.io/en/stable/configuration.html#custom-configuration-without-a-config-file + +lint-pipeline-yaml: extends: - .default-retry - .yaml-lint:rules @@ -10,7 +25,7 @@ lint-yaml: variables: LINT_PATHS: .gitlab-ci.yml .gitlab/ci lib/gitlab/ci/templates data/deprecations data/removals data/whats_new script: - - yamllint --strict -f colored $LINT_PATHS + - 'yamllint -d "{extends: default, rules: {line-length: disable, document-start: disable}}" $LINT_PATHS' lint-metrics-yaml: extends: diff --git a/.yamllint b/.yamllint index df7cdf404bc..2fddf9ee3c4 100644 --- a/.yamllint +++ b/.yamllint @@ -2,6 +2,44 @@ extends: default +# Ideally, we should have nothing in this ignore section. +# +# Please consider removing entries below by fixing them. +ignore: | + #### Files #### + + # Contains ruby code + config/mail_room.yml + generator_templates/snowplow_event_definition/event_definition.yml + generator_templates/usage_metric_definition/metric_definition.yml + + # Has some special indentation + doc/user/project/integrations/samples/cloudwatch.yml + + # Broken on purpose (for testing) + spec/fixtures/lib/gitlab/metrics/dashboard/broken_yml_syntax.yml + + #### Folders #### + node_modules/ + tmp/ + +# Why disabling all of those rules? +# +# For the scope of https://gitlab.com/gitlab-org/gitlab/-/issues/359968, +# we would like to catch syntax errors as soon as possible. +# Style "errors" are not as important right now, but they should ideally be added later on. +# +# Please consider enabling a rule, and fixing the issues you'll see in an MR. rules: - line-length: disable + braces: disable + colons: disable + comments-indentation: disable + comments: disable document-start: disable + empty-lines: disable + indentation: disable + key-duplicates: disable + line-length: disable + new-line-at-end-of-file: disable + trailing-spaces: disable + truthy: disable diff --git a/app/assets/javascripts/analytics/shared/components/value_stream_metrics.vue b/app/assets/javascripts/analytics/shared/components/value_stream_metrics.vue index 6ac1bce4032..567e534d9cf 100644 --- a/app/assets/javascripts/analytics/shared/components/value_stream_metrics.vue +++ b/app/assets/javascripts/analytics/shared/components/value_stream_metrics.vue @@ -1,5 +1,5 @@