From: Patrick Steinhardt Date: Thu, 2 Oct 2025 11:04:36 +0000 (+0200) Subject: gitlab-ci: dedup instructions to disable realtime monitoring X-Git-Tag: v2.52.0-rc0~71^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5c2ebf604249ef522a2fc4db70216ed0c9322f7e;p=thirdparty%2Fgit.git gitlab-ci: dedup instructions to disable realtime monitoring The instruction to disable realtime monitoring are shared across all of our Windows-based jobs. Deduplicate it so that we can more readily iterate on it. Signed-off-by: Patrick Steinhardt Signed-off-by: Junio C Hamano --- diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cf122e706f..552c033fb0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -112,6 +112,9 @@ test:osx: - t/failed-test-artifacts when: on_failure +.windows_before_script: &windows_before_script + - Set-MpPreference -DisableRealtimeMonitoring $true + build:mingw64: stage: build tags: @@ -119,7 +122,7 @@ build:mingw64: variables: NO_PERL: 1 before_script: - - Set-MpPreference -DisableRealtimeMonitoring $true + - *windows_before_script - ./ci/install-sdk.ps1 -directory "git-sdk" script: - git-sdk/usr/bin/bash.exe -l -c 'ci/make-test-artifacts.sh artifacts' @@ -136,7 +139,7 @@ test:mingw64: - job: "build:mingw64" artifacts: true before_script: - - Set-MpPreference -DisableRealtimeMonitoring $true + - *windows_before_script - git-sdk/usr/bin/bash.exe -l -c 'tar xf artifacts/artifacts.tar.gz' - New-Item -Path .git/info -ItemType Directory - New-Item .git/info/exclude -ItemType File -Value "/git-sdk" @@ -150,7 +153,7 @@ test:mingw64: tags: - saas-windows-medium-amd64 before_script: - - Set-MpPreference -DisableRealtimeMonitoring $true + - *windows_before_script - choco install -y git meson ninja openssl - Import-Module $env:ChocolateyInstall\helpers\chocolateyProfile.psm1 - refreshenv