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 <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Patrick Steinhardt
2025-10-02 13:04:36 +02:00
committed by Junio C Hamano
parent 821f583da6
commit 5c2ebf6042

View File

@@ -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