Commit 3d440c13 authored by Mark Fletcher's avatar Mark Fletcher

Populate sample project for review apps

Dogfood existing sample data projects to create sample projects for
review apps users.

Current sample data project will populate repo, issues, and MRs
parent d55a23a2
......@@ -65,6 +65,7 @@ review-deploy:
- deploy || (display_deployment_debug && exit 1)
- verify_deploy || exit 1
- disable_sign_ups || (delete_release && exit 1)
- create_sample_projects
after_script:
# Run seed-dast-test-data.sh only when DAST_RUN is set to true. This is to pupulate review app with data for DAST scan.
# Set DAST_RUN to true when jobs are manually scheduled.
......
......@@ -147,6 +147,13 @@ function disable_sign_ups() {
fi
}
function create_sample_projects() {
local create_sample_projects_rb="root_user = User.find_by_username('root'); 1.times { |i| params = { namespace_id: root_user.namespace.id, name: 'sample-project' + i.to_s, path: 'sample-project' + i.to_s, template_name: 'sample' }; ::Projects::CreateFromTemplateService.new(root_user, params).execute }"
# Queue jobs to create sample projects for root user namespace from sample data project template
retry "run_task \"${create_sample_projects_rb}\""
}
function check_kube_domain() {
echoinfo "Checking that Kube domain exists..." true
......
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