diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/ci/templates/Bash.gitlab-ci.yml | 1 | ||||
-rw-r--r-- | lib/gitlab/ci/templates/ThemeKit.gitlab-ci.yml | 2 | ||||
-rw-r--r-- | lib/gitlab/ci/templates/dotNET.gitlab-ci.yml | 1 | ||||
-rw-r--r-- | lib/gitlab/usage_data_counters/known_events/work_items.yml | 8 | ||||
-rw-r--r-- | lib/tasks/gitlab/openapi.rake | 9 |
5 files changed, 21 insertions, 0 deletions
diff --git a/lib/gitlab/ci/templates/Bash.gitlab-ci.yml b/lib/gitlab/ci/templates/Bash.gitlab-ci.yml index 004c2897b60..fb062683397 100644 --- a/lib/gitlab/ci/templates/Bash.gitlab-ci.yml +++ b/lib/gitlab/ci/templates/Bash.gitlab-ci.yml @@ -41,3 +41,4 @@ deploy1: stage: deploy script: - echo "Do your deploy here" + environment: production diff --git a/lib/gitlab/ci/templates/ThemeKit.gitlab-ci.yml b/lib/gitlab/ci/templates/ThemeKit.gitlab-ci.yml index 8a0913e8f66..47329a602b1 100644 --- a/lib/gitlab/ci/templates/ThemeKit.gitlab-ci.yml +++ b/lib/gitlab/ci/templates/ThemeKit.gitlab-ci.yml @@ -8,6 +8,7 @@ stages: - deploy:production staging: + environment: staging image: python:2 stage: deploy:staging script: @@ -18,6 +19,7 @@ staging: - $CI_DEFAULT_BRANCH == $CI_COMMIT_BRANCH production: + environment: production image: python:2 stage: deploy:production script: diff --git a/lib/gitlab/ci/templates/dotNET.gitlab-ci.yml b/lib/gitlab/ci/templates/dotNET.gitlab-ci.yml index 50ce181095e..8dfb6c38b55 100644 --- a/lib/gitlab/ci/templates/dotNET.gitlab-ci.yml +++ b/lib/gitlab/ci/templates/dotNET.gitlab-ci.yml @@ -89,3 +89,4 @@ deploy_job: dependencies: - build_job - test_job + environment: production diff --git a/lib/gitlab/usage_data_counters/known_events/work_items.yml b/lib/gitlab/usage_data_counters/known_events/work_items.yml index ee828fc0f72..afa6663de07 100644 --- a/lib/gitlab/usage_data_counters/known_events/work_items.yml +++ b/lib/gitlab/usage_data_counters/known_events/work_items.yml @@ -27,3 +27,11 @@ redis_slot: users aggregation: weekly feature_flag: track_work_items_activity +- name: users_updating_weight_estimate + # The event tracks an EE feature. + # It's added here so it can be aggregated into the CE/EE 'OR' aggregate metrics. + # It will report 0 for CE instances and should not be used with 'AND' aggregators. + category: work_items + redis_slot: users + aggregation: weekly + feature_flag: track_work_items_activity diff --git a/lib/tasks/gitlab/openapi.rake b/lib/tasks/gitlab/openapi.rake index fd067a1bf0b..dee365de11c 100644 --- a/lib/tasks/gitlab/openapi.rake +++ b/lib/tasks/gitlab/openapi.rake @@ -9,6 +9,13 @@ end namespace :gitlab do namespace :openapi do + task :validate do + raise 'This task can only be run in the development environment' unless Rails.env.development? + + success = system('yarn swagger:validate doc/api/openapi/openapi_v2.yaml') + abort('Validation of swagger document failed') unless success + end + task :generate do raise 'This task can only be run in the development environment' unless Rails.env.development? @@ -19,5 +26,7 @@ namespace :gitlab do File.write("doc/api/openapi/openapi_v2.yaml", yaml_content) end + + task generate_and_check: [:generate, :validate] end end |