Skip to content

Post message for action on MR when selective e2e tests are detected

What does this MR do and why?

Post message on MR when selective e2e tests are detected.

  • When QA_TESTS have folders, post the message
  • When QA_TESTS is empty or has specific e2e test files, don't post the message. (When there are specific e2e test files, the pipeline is run automatically)
  • When the message has already been posted, do not post again.

Related to: gitlab-org/quality/quality-engineering/team-tasks#1472 (comment 1421748026)

Work Item: https://gitlab.com/gitlab-com/gitlab-OKRs/-/work_items/2295

Testing:

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Screenshot_2023-06-13_at_1.43.48_PM

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

The CI_PROJECT_ID, CI_PIPELINE_ID and CI_MERGE_REQUEST_SOURCE_BRANCH_SHA in the below example are from this temporary MR: !121986 (closed). Feel free to use it or any other MR. Also, an example ENV_FILE is attached below.

Example ENV_FILE: qa_tests_vars.env

From your GitLab checkout directory, run:

CI_PROJECT_ID=278964 CI_PIPELINE_ID=883519399 CI_MERGE_REQUEST_SOURCE_BRANCH_SHA=9e963781aa12f156bbe8fe38c9a9dbaa08049640 PROJECT_TOKEN_FOR_CI_SCRIPTS_API_USAGE=<your_personal_access_token> ENV_FILE=</path/to/qa_tests_vars.env> scripts/generate-message-to-run-e2e-pipeline.rb

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Sanad Liaquat

Merge request reports

Loading