From 51873e3d3f01e79584674164ba120f847bc96d02 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Fri, 25 Dec 2020 18:10:00 +0000 Subject: [PATCH] Add latest changes from gitlab-org/gitlab@master --- .../289803-enable-ci_rules_variables.yml | 5 + .../development/ci_rules_variables.yml | 2 +- doc/ci/yaml/README.md | 15 ++- lib/gitlab/ci/features.rb | 2 +- package.json | 2 +- spec/frontend/__mocks__/@gitlab/ui.js | 2 +- .../alerts_settings_form_spec.js.snap | 124 +++++++++--------- .../boards/components/board_form_spec.js | 2 +- .../boards/components/boards_selector_spec.js | 2 +- .../components/ci_variable_modal_spec.js | 2 +- .../components/ci_variable_table_spec.js | 2 +- .../components/deploy_freeze_modal_spec.js | 2 +- .../components/deploy_freeze_table_spec.js | 2 +- .../design_notes/design_reply_form_spec.js | 2 +- .../list/__snapshots__/item_spec.js.snap | 6 + .../design_management/pages/index_spec.js | 2 +- .../components/charts/stacked_column_spec.js | 2 +- .../components/charts/time_series_spec.js | 2 +- .../duplicate_dashboard_form_spec.js | 2 +- .../components/commit/commit_form_spec.js | 4 +- .../pipeline_editor_app_spec.js | 4 +- .../components/dag/dag_graph_spec.js | 2 +- .../pipelines_filtered_search_spec.js | 2 +- spec/frontend/pipelines/stage_spec.js | 2 +- .../sidebar/sidebar_assignees_spec.js | 2 +- spec/frontend/test_setup.js | 14 +- .../project_selector/project_selector_spec.js | 2 +- .../components/tooltip_on_truncate_spec.js | 4 +- .../vue_shared/directives/tooltip_spec.js | 2 +- .../vue_shared/directives/validation_spec.js | 2 +- yarn.lock | 8 +- 31 files changed, 126 insertions(+), 102 deletions(-) create mode 100644 changelogs/unreleased/289803-enable-ci_rules_variables.yml diff --git a/changelogs/unreleased/289803-enable-ci_rules_variables.yml b/changelogs/unreleased/289803-enable-ci_rules_variables.yml new file mode 100644 index 00000000000..84febffd245 --- /dev/null +++ b/changelogs/unreleased/289803-enable-ci_rules_variables.yml @@ -0,0 +1,5 @@ +--- +title: Implement variables for pipeline job rules +merge_request: 50501 +author: +type: added diff --git a/config/feature_flags/development/ci_rules_variables.yml b/config/feature_flags/development/ci_rules_variables.yml index fdd9de19472..8ea2e21af14 100644 --- a/config/feature_flags/development/ci_rules_variables.yml +++ b/config/feature_flags/development/ci_rules_variables.yml @@ -5,4 +5,4 @@ rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/289803 milestone: '13.7' type: development group: group::pipeline authoring -default_enabled: false +default_enabled: true diff --git a/doc/ci/yaml/README.md b/doc/ci/yaml/README.md index 58d3aec5bcd..b865a7952f1 100644 --- a/doc/ci/yaml/README.md +++ b/doc/ci/yaml/README.md @@ -1437,10 +1437,11 @@ In this example, if the first rule matches, then the job has `when: manual` and #### `rules:variables` > - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/209864) in GitLab 13.7. -> - It's [deployed behind a feature flag](../../user/feature_flags.md), disabled by default. -> - It's disabled on GitLab.com. -> - It's not recommended for production use. -> - To use it in GitLab self-managed instances, ask a GitLab administrator to [enable it](#enable-or-disable-rulesvariables). **(CORE ONLY)** +> - It was [deployed behind a feature flag](../../user/feature_flags.md), disabled by default. +> - [Became enabled by default](https://gitlab.com/gitlab-org/gitlab/-/issues/289803) on GitLab 13.8. +> - It's enabled on GitLab.com. +> - It's recommended for production use. +> - For GitLab self-managed instances, GitLab administrators can opt to [disable it](#enable-or-disable-rulesvariables). **(CORE ONLY)** WARNING: This feature might not be available to you. Check the **version history** note above for details. @@ -1467,10 +1468,10 @@ job: ##### Enable or disable rules:variables **(CORE ONLY)** -rules:variables is under development and not ready for production use. It is -deployed behind a feature flag that is **disabled by default**. +rules:variables is under development but ready for production use. +It is deployed behind a feature flag that is **enabled by default**. [GitLab administrators with access to the GitLab Rails console](../../administration/feature_flags.md) -can enable it. +can opt to disable it. To enable it: diff --git a/lib/gitlab/ci/features.rb b/lib/gitlab/ci/features.rb index af1df933b36..0c362e53742 100644 --- a/lib/gitlab/ci/features.rb +++ b/lib/gitlab/ci/features.rb @@ -72,7 +72,7 @@ module Gitlab end def self.rules_variables_enabled?(project) - ::Feature.enabled?(:ci_rules_variables, project, default_enabled: false) + ::Feature.enabled?(:ci_rules_variables, project, default_enabled: true) end end end diff --git a/package.json b/package.json index 30ffa9b09bc..741ca7b5285 100644 --- a/package.json +++ b/package.json @@ -163,7 +163,7 @@ "@babel/plugin-transform-modules-commonjs": "^7.10.1", "@gitlab/eslint-plugin": "5.0.0", "@testing-library/dom": "^7.16.2", - "@vue/test-utils": "1.0.0-beta.30", + "@vue/test-utils": "1.1.2", "acorn": "^6.3.0", "axios-mock-adapter": "^1.15.0", "babel-jest": "^26.5.2", diff --git a/spec/frontend/__mocks__/@gitlab/ui.js b/spec/frontend/__mocks__/@gitlab/ui.js index e27aba2dd8f..7cdecefab05 100644 --- a/spec/frontend/__mocks__/@gitlab/ui.js +++ b/spec/frontend/__mocks__/@gitlab/ui.js @@ -2,7 +2,7 @@ export * from '@gitlab/ui'; /** * The @gitlab/ui tooltip directive requires awkward and distracting set up in tests - * for components that use it (e.g., `attachToDocument: true` and `sync: true` passed + * for components that use it (e.g., `attachTo: document.body` and `sync: true` passed * to the `mount` helper from `vue-test-utils`). * * This mock decouples those tests from the implementation, removing the need to set diff --git a/spec/frontend/alerts_settings/__snapshots__/alerts_settings_form_spec.js.snap b/spec/frontend/alerts_settings/__snapshots__/alerts_settings_form_spec.js.snap index a1ced8910b3..90a0c32dc25 100644 --- a/spec/frontend/alerts_settings/__snapshots__/alerts_settings_form_spec.js.snap +++ b/spec/frontend/alerts_settings/__snapshots__/alerts_settings_form_spec.js.snap @@ -16,82 +16,84 @@ exports[`AlertsSettingsFormNew with default values renders the initial template -
-
-
-
- - - -
-
-
-
Utilize the URL and authorization key below to authorize an external service to send alerts to GitLab. Review your external service's documentation to learn where to add these details, and the GitLab documentation to learn more about configuring your endpoint.