Skip to content

Commit 5c2ebf6

Browse files
pks-tgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 821f583 commit 5c2ebf6

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

.gitlab-ci.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,14 +112,17 @@ test:osx:
112112
- t/failed-test-artifacts
113113
when: on_failure
114114

115+
.windows_before_script: &windows_before_script
116+
- Set-MpPreference -DisableRealtimeMonitoring $true
117+
115118
build:mingw64:
116119
stage: build
117120
tags:
118121
- saas-windows-medium-amd64
119122
variables:
120123
NO_PERL: 1
121124
before_script:
122-
- Set-MpPreference -DisableRealtimeMonitoring $true
125+
- *windows_before_script
123126
- ./ci/install-sdk.ps1 -directory "git-sdk"
124127
script:
125128
- git-sdk/usr/bin/bash.exe -l -c 'ci/make-test-artifacts.sh artifacts'
@@ -136,7 +139,7 @@ test:mingw64:
136139
- job: "build:mingw64"
137140
artifacts: true
138141
before_script:
139-
- Set-MpPreference -DisableRealtimeMonitoring $true
142+
- *windows_before_script
140143
- git-sdk/usr/bin/bash.exe -l -c 'tar xf artifacts/artifacts.tar.gz'
141144
- New-Item -Path .git/info -ItemType Directory
142145
- New-Item .git/info/exclude -ItemType File -Value "/git-sdk"
@@ -150,7 +153,7 @@ test:mingw64:
150153
tags:
151154
- saas-windows-medium-amd64
152155
before_script:
153-
- Set-MpPreference -DisableRealtimeMonitoring $true
156+
- *windows_before_script
154157
- choco install -y git meson ninja openssl
155158
- Import-Module $env:ChocolateyInstall\helpers\chocolateyProfile.psm1
156159
- refreshenv

0 commit comments

Comments
 (0)