Welcome to mirror list, hosted at ThFree Co, Russian Federation.

28_integrations.rb « development « fixtures « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: db54593ae27f973d49685c7eb975e1a885fbb722 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# frozen_string_literal: true

Gitlab::Seeder.quiet do
  # This is only enabled if you're going to be using the customer portal in
  # development.
  # CUSTOMER_PORTAL_URL=https://your.ngrok.io FILTER=integrations rake db:seed_fu
  flag = 'CUSTOMER_PORTAL_URL'

  if ENV[flag]
    ApplicationSetting.current_without_cache.update!(check_namespace_plan: true)

    print '.'

    Doorkeeper::Application.create!(
      name: 'Customer Portal Development',
      uid: '28cc28f03b415fbc737a7364dc06af0adf12688e1b0c6669baf6850a6855132b',
      secret: '74c96596ec3f82dd137dd5775f31eba919f77b0a3114611f0411d148d727c64c',
      redirect_uri: "#{ENV['CUSTOMER_PORTAL_URL']}/auth/gitlab/callback",
      scopes: 'api read_user openid',
      trusted: true,
      confidential: true
    )

    print '.'
  else
    puts "Skipped. To enable, set the `#{flag}` environment variable to your development customer's portal url."
  end
end