From 16527f6ffd0129f2f6e1728e388cdc14b60240ca Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Wed, 13 Sep 2023 13:36:26 +0100 Subject: [PATCH] ci: Only look at file changes for MRs Lists of files changed are only really relevant if we're pushing an MR. We don't want to trigger 'user added .ci-farms-disabled/igalia' because the user pushed a branch when this file was already present upstream. Signed-off-by: Daniel Stone Part-of: --- .gitlab-ci/farm-rules.yml | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/.gitlab-ci/farm-rules.yml b/.gitlab-ci/farm-rules.yml index 3337637..0f6619c 100644 --- a/.gitlab-ci/farm-rules.yml +++ b/.gitlab-ci/farm-rules.yml @@ -242,30 +242,41 @@ .disable-farm-rules: rules: # changes(disabled) + exists(disabled) = disabling the farm - - changes: [ .ci-farms-disabled/microsoft ] + # only run in MR context, because otherwise we get a false positive on + # files being 'created' when pushing to a branch, and nuke our pipeline + - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' + changes: [ .ci-farms-disabled/microsoft ] exists: [ .ci-farms-disabled/microsoft ] when: never - - changes: [ .ci-farms-disabled/collabora ] + - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' + changes: [ .ci-farms-disabled/collabora ] exists: [ .ci-farms-disabled/collabora ] when: never - - changes: [ .ci-farms-disabled/igalia ] + - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' + changes: [ .ci-farms-disabled/igalia ] exists: [ .ci-farms-disabled/igalia ] when: never - - changes: [ .ci-farms-disabled/lima ] + - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' + changes: [ .ci-farms-disabled/lima ] exists: [ .ci-farms-disabled/lima ] when: never - - changes: [ .ci-farms-disabled/anholt ] + - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' + changes: [ .ci-farms-disabled/anholt ] exists: [ .ci-farms-disabled/anholt ] when: never - - changes: [ .ci-farms-disabled/valve-mupuf ] + - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' + changes: [ .ci-farms-disabled/valve-mupuf ] exists: [ .ci-farms-disabled/valve-mupuf ] when: never - - changes: [ .ci-farms-disabled/valve-kws ] + - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' + changes: [ .ci-farms-disabled/valve-kws ] exists: [ .ci-farms-disabled/valve-kws ] when: never - - changes: [ .ci-farms-disabled/austriancoder ] + - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' + changes: [ .ci-farms-disabled/austriancoder ] exists: [ .ci-farms-disabled/austriancoder ] when: never - - changes: [ .ci-farms-disabled/freedreno ] + - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' + changes: [ .ci-farms-disabled/freedreno ] exists: [ .ci-farms-disabled/freedreno ] when: never -- 2.7.4