Add merge pipelines to registration features
What does this MR do and why?
We want to add Merged results pipelines to Registration features available to users who have service ping data sharing enabled.
Screenshots or screen recordings
Before | After |
---|---|
How to set up and validate locally
Requirements:
- Make sure you have gitlab runner installed.
- Make sure you have instance or project runner to process pipelines. Instance runner can be created the same way as project runner but from
Admin Area -> CI/CD -> Runners
(/admin/runners
).
- Testing previous behavior:
- Make sure you're on a Premium plan GitLab GDK instance
- Enable Merged results pipelines
Some Project -> Settings > Merge requests
in the Merge options section, select Enable merged results pipelines - Create new project (
test-merged-results
or your custom name) - Add CI/CD
.gitlab-ci.yml
with next content to main branch:
stages:
- build
- test
job_build:
stage: build
script:
- echo "Building the project"
job_test:
stage: test
script:
- echo "Running tests"
job_mr_test:
stage: test
rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
script:
- echo "Running MR tests"
- create new branch for MR
main_test
and modify.gitlab-ci.yml
with next content(added job_mr_test2):
stages:
- build
- test
job_build:
stage: build
script:
- echo "Building the project"
job_test:
stage: test
script:
- echo "Running tests"
job_mr_test:
stage: test
rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
script:
- echo "Running MR tests"
job_mr_test2:
stage: test
rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
script:
- echo "Running MR tests 2"
- Modify
.gitlab-ci.yml
pipeline inmain
branchBuilt -> Pipeline editor
with next content(addedjob_mr_test3
):
stages:
- build
- test
job_build:
stage: build
script:
- echo "Building the project"
job_test:
stage: test
script:
- echo "Running tests"
job_mr_test3:
stage: test
rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
script:
- echo "Running MR tests 3"
job_mr_test:
stage: test
rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
script:
- echo "Running MR tests"
- It's important to add new job in the
main
branch above thejob_mr_test
just not to have conflicts in MR. - Create MR from
main_test
tomain
and check you can see "merged results"(see screenshots).
- When registration features are enabled:
- Make sure you're on a free plan GitLab GDK instance (for example, remove current license or stub #current to return
nil
) - Make sure you have the Registration Features checkbox enabled (
Admin -> Settings -> Metrics and profiling -> Usage statistics -> Enable Service Ping & Enable Registration Features
) - Follow steps from 1. but using new project (or try to restart pipelines in existing MR).
- Make sure you're on a free plan GitLab GDK instance (for example, remove current license or stub #current to return
- When registration features are disabled:
- Make sure you're on a free plan GitLab GDK instance
- Make sure you have the registration features checkbox disabled (
Admin -> Settings -> Metrics and profiling -> Usage statistics -> Enable Registration Features
) - Check you don't have Merged results pipelines setting available(see screenshots)
- Make sure that the new text appears on the docs page:
- run
gdk restart gitlab-docs
- go to
<local_gitlab_docs_host>/ee/user/admin_area/settings/usage_statistics.html#registration-features-program
and make sure the new section is on the page and the link works
- run
Updated doc | Link page |
---|---|
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #422281 (closed)
Edited by Taras Tadai