Commit b0bad997 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'mf-ep-exp-review-apps-seed' into 'master'

Populate sample project for review apps

See merge request gitlab-org/gitlab!75100
parents 768937a8 3d440c13
...@@ -65,6 +65,7 @@ review-deploy: ...@@ -65,6 +65,7 @@ review-deploy:
- deploy || (display_deployment_debug && exit 1) - deploy || (display_deployment_debug && exit 1)
- verify_deploy || exit 1 - verify_deploy || exit 1
- disable_sign_ups || (delete_release && exit 1) - disable_sign_ups || (delete_release && exit 1)
- create_sample_projects
after_script: 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. # 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. # Set DAST_RUN to true when jobs are manually scheduled.
......
...@@ -147,6 +147,13 @@ function disable_sign_ups() { ...@@ -147,6 +147,13 @@ function disable_sign_ups() {
fi 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() { function check_kube_domain() {
echoinfo "Checking that Kube domain exists..." true 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