diff options
Diffstat (limited to 'db/fixtures/development/28_integrations.rb')
-rw-r--r-- | db/fixtures/development/28_integrations.rb | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/db/fixtures/development/28_integrations.rb b/db/fixtures/development/28_integrations.rb new file mode 100644 index 00000000000..db54593ae27 --- /dev/null +++ b/db/fixtures/development/28_integrations.rb @@ -0,0 +1,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 |