Skip to content

Exchange buy_ci_minutes links

Diana Zubova requested to merge dz/346251-update-links-to-ci-minutes into master

What does this MR do and why?

We are moving CI Minutes purchase flow form CustomersPortal to GitLab flow. This MR exchanges a few links that were still pointing on /buy_ci_minutes with tailored GitLab purchase links

Related to #346251 (closed)

Screenshots or screen recordings

Limit warning email Out of minutes
HTML Screenshot_2021-12-30_at_17.18.35 HTML Screenshot_2021-12-30_at_17.17.59
Plain text Screenshot_2021-12-30_at_17.18.43 Plain text Screenshot_2021-12-30_at_17.18.11

Alert notification Screenshot_2021-12-30_at_17.31.21

How to set up and validate locally

Check updated email templates:

  1. Open http://localhost:3000/rails/mailers/ci_minutes_usage_mailer/
  2. Check limit_warning and out_of_minutes template, both HTML and plain text

Check notification update, we show it on a group AND on a project page:

  1. You can either setup your group to run out minutes, or change the return value in ee/app/models/ci/minutes/context.rb
Patch
diff --git a/ee/app/models/ci/minutes/context.rb b/ee/app/models/ci/minutes/context.rb
index d6796329141..827172f674b 100644
--- a/ee/app/models/ci/minutes/context.rb
+++ b/ee/app/models/ci/minutes/context.rb
@@ -16,6 +16,7 @@ def initialize(project, namespace, tracking_strategy: nil)
       end
 
       def percent_total_minutes_remaining
+        return 5
         quota.percent_total_minutes_remaining
       end
 
  1. Go to your group page http://localhost:3000/test-group/ and check the Buy more Pipeline minutes link
  2. Go to a project within the group http://localhost:3000/test-group/test-project and check the Buy more Pipeline minutes link

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Diana Zubova

Merge request reports