From 60713194680884e8e106af29788125e809426758 Mon Sep 17 00:00:00 2001 From: TC Date: Tue, 8 Apr 2025 04:17:15 +0000 Subject: [PATCH] =?UTF-8?q?Trying=20something=20new=20with=20pipeline=20ru?= =?UTF-8?q?les.=20The=20jobs=20for=20build=5Fcache=20and=20test=5Fbuild=20?= =?UTF-8?q?should=20only=20fire=20against=20merge=20requests=20OR=20commit?= =?UTF-8?q?s=20to=20Main=20WHEN=20code=20changes=20occur.=20For=20example,?= =?UTF-8?q?=20this=20commit=20should=20NOT=20trigger=20either=20job.=20Her?= =?UTF-8?q?e=20we=20go=20=F0=9F=A4=9E=F0=9F=8F=BB=20this=20one's=20for=20y?= =?UTF-8?q?ou=20@bmv437=20/=20@bgrift?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitlab-ci.yml | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 41edbb94..4019cce5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -70,13 +70,12 @@ build_cache: - echo "No need to rebuild" - fi rules: - - if: $CI_COMMIT_MESSAGE =~ /\[ci dryrun]/ + - if: $CI_COMMIT_MESSAGE =~ /\[ci dryrun]/ || $IS_NIGHTLY == "true" when: never - - if: $IS_NIGHTLY == "true" - when: never - - if: $CI_PIPELINE_SOURCE == "merge_request_event" - - if: $CI_PIPELINE_SOURCE == "push" - - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + - if: $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + changes: + - veilid-*/**/* + - '**/*[Cc]argo*' # Runs a basic unit test build, this task will use the `build-cache:latest` as set up in the projects Container Registry @@ -88,12 +87,7 @@ test_build: - earthly --use-inline-cache +unit-tests-linux --BASE=container $project_args resource_group: test rules: - - if: $CI_PIPELINE_SOURCE == "merge_request_event" - changes: - - veilid-*/**/* - - '**/*[Cc]argo*' - when: always - - if: $CI_PIPELINE_SOURCE == "push" + - if: $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH changes: - veilid-*/**/* - '**/*[Cc]argo*'