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>
Patrick Steinhardt committed
Oct 2, 2025 at 13:04 UTC
5c2ebf604249ef522a2fc4db70216ed0c9322f7e
1 file changed
+6
-3
.gitlab-ci.yml
+6
-3
@@ -112,6 +112,9 @@ test:osx:
112
- t/failed-test-artifacts
113
when: on_failure
114
115
+.windows_before_script: &windows_before_script
116
+ - Set-MpPreference -DisableRealtimeMonitoring $true
117
+
118
build:mingw64:
119
stage: build
120
tags:
@@ -119,7 +122,7 @@ build:mingw64:
122
variables:
123
NO_PERL: 1
124
before_script:
122
- - Set-MpPreference -DisableRealtimeMonitoring $true
125
+ - *windows_before_script
126
- ./ci/install-sdk.ps1 -directory "git-sdk"
127
script:
128
- git-sdk/usr/bin/bash.exe -l -c 'ci/make-test-artifacts.sh artifacts'
@@ -136,7 +139,7 @@ test:mingw64:
139
- job: "build:mingw64"
140
artifacts: true
141
before_script:
139
- - Set-MpPreference -DisableRealtimeMonitoring $true
142
+ - *windows_before_script
143
- git-sdk/usr/bin/bash.exe -l -c 'tar xf artifacts/artifacts.tar.gz'
144
- New-Item -Path .git/info -ItemType Directory
145
- New-Item .git/info/exclude -ItemType File -Value "/git-sdk"
@@ -150,7 +153,7 @@ test:mingw64:
153
tags:
154
- saas-windows-medium-amd64
155
before_script:
153
- - Set-MpPreference -DisableRealtimeMonitoring $true
156
+ - *windows_before_script
157
- choco install -y git meson ninja openssl
158
- Import-Module $env:ChocolateyInstall\helpers\chocolateyProfile.psm1
159
- refreshenv