Trigger master pipeline when MR is merged & Fix flaky test
What does this MR do?
-
fixes an issue that was introduced in Conditionally run child pipelines based on MR t... (!339 - merged) which prevents master pipelines from triggering. In that MR, the Workflows/MergeRequest-Pipelines.gitlab-ci.yml was included in order to enable Merge Request Pipelines, however, the behaviour was overridden by the following workaround:
workflow: rules: - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' variables: CI_COMMIT_BRANCH: $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME
This MR fixes this issue by inlining the contents of the Workflows/MergeRequest-Pipelines.gitlab-ci.yml template and adding the above workaround to it in a different order.
-
disables a spec that fails frequently because the expectations are a moving target, for example, here are three jobs that have failed within the past week, all caused by this same test:
-
https://gitlab.com/gitlab-org/security-products/analyzers/gemnasium/-/jobs/2659867659
json atom at path "components/2/purl" is not equal to expected value: expected: "pkg:pypi/cryptography@37.0.2" got: "pkg:pypi/cryptography@37.0.3"
-
https://gitlab.com/gitlab-org/security-products/analyzers/gemnasium/-/jobs/2666056042
json atom at path "components/1/purl" is not equal to expected value: expected: "pkg:pypi/cffi@1.15.0" got: "pkg:pypi/cffi@1.15.1"
-
https://gitlab.com/gitlab-org/security-products/analyzers/gemnasium/-/jobs/2659867659
json atom at path "components/3/purl" is not equal to expected value: expected: "pkg:pypi/importlib-metadata@4.11.4" got: "pkg:pypi/importlib-metadata@4.12.0"
This test should be re-enabled when Update integration-test project to skip fields ... (gitlab-org/gitlab#336332 - closed) has been completed.
-
What are the relevant issue numbers?
gitlab-org/gitlab#365313 (closed)
Testing
This has been tested on a local GitLab instance and works as expected
Does this MR meet the acceptance criteria?
- [-] Changelog entry added
-
Documentation created/updated for GitLab EE, if necessary -
Documentation created/updated for this project, if necessary -
Documentation reviewed by technical writer or follow-up review issue created -
Tests added for this feature/bug -
Job definition updated, if necessary -
Conforms to the code review guidelines -
Conforms to the Go guidelines -
Security reports checked/validated by reviewer