Commit a6c3d03f authored by Robert Speicher's avatar Robert Speicher

Merge branch 'cc-license-check-test-for-license' into 'master'

Update ee/lib/tasks/gitlab/license.rake to check if a license exists rather than crashing with an error

See merge request gitlab-org/gitlab!39143
parents cefb1b44 085ebf8b
---
title: Fix gitlab-rake gitlab:license:info crashing when no license exists
merge_request: 39143
author:
type: fixed
...@@ -5,6 +5,7 @@ namespace :gitlab do ...@@ -5,6 +5,7 @@ namespace :gitlab do
desc 'GitLab | License | Gather license related information' desc 'GitLab | License | Gather license related information'
task info: :gitlab_environment do task info: :gitlab_environment do
license = Gitlab::UsageData.license_usage_data license = Gitlab::UsageData.license_usage_data
abort("No license has been applied.") unless license[:license_plan]
puts "Today's Date: #{Date.today}" puts "Today's Date: #{Date.today}"
puts "Current User Count: #{license[:active_user_count]}" puts "Current User Count: #{license[:active_user_count]}"
puts "Max Historical Count: #{license[:historical_max_users]}" puts "Max Historical Count: #{license[:historical_max_users]}"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment