Skip to content

Commit d1ca149

Browse files
kubafloCopilot
andcommitted
[net11.0] Isolate Helix job monitor setup
Install the monitor only in its Linux job after bootstrapping the pinned SDK, so repository-wide tool restores remain compatible and the non-executable Arcade bootstrap script is invoked through bash. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent e9efd01 commit d1ca149

2 files changed

Lines changed: 56 additions & 13 deletions

File tree

.config/dotnet-tools.json

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,6 @@
1616
],
1717
"rollForward": false
1818
},
19-
"microsoft.dotnet.helix.jobmonitor": {
20-
"version": "11.0.0-beta.26379.102",
21-
"commands": [
22-
"dotnet-helix-job-monitor"
23-
],
24-
"rollForward": false
25-
},
2619
"api-tools": {
2720
"version": "1.3.5",
2821
"commands": [

eng/pipelines/arcade/stage-helix-tests.yml

Lines changed: 56 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,59 @@ stages:
9797
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
9898
HelixAccessToken: ${{ parameters.HelixAccessToken }}
9999

100-
- template: /eng/common/core-templates/job/helix-job-monitor.yml
101-
parameters:
102-
timeoutInMinutes: 360
103-
organization: dotnet
104-
repository: maui
105-
helixAccessToken: ${{ parameters.HelixAccessToken }}
100+
- job: HelixJobMonitor
101+
displayName: Monitor Helix Jobs
102+
timeoutInMinutes: 360
103+
pool:
104+
${{ if eq(variables['System.TeamProject'], 'public') }}:
105+
name: $(DncEngPublicBuildPool)
106+
demands: ImageOverride -equals build.azurelinux.3.amd64.open
107+
${{ else }}:
108+
name: $(DncEngInternalBuildPool)
109+
demands: ImageOverride -equals build.azurelinux.3.amd64
110+
steps:
111+
- checkout: self
112+
fetchDepth: 1
113+
114+
- bash: |
115+
set -euo pipefail
116+
117+
toolPath="$AGENT_TEMPDIRECTORY/helix-job-monitor"
118+
bash ./eng/common/dotnet.sh
119+
toolVersion=$(bash ./eng/common/dotnet.sh msbuild eng/Versions.props -getProperty:MicrosoftDotNetHelixSdkPackageVersion -nologo | tail -n 1)
120+
if [[ -z "$toolVersion" || "$toolVersion" =~ [[:space:]] ]]; then
121+
echo "Could not read the Helix SDK package version from eng/Versions.props." >&2
122+
exit 1
123+
fi
124+
125+
bash ./eng/common/dotnet.sh tool install \
126+
--tool-path "$toolPath" \
127+
Microsoft.DotNet.Helix.JobMonitor \
128+
--version "$toolVersion"
129+
130+
toolDll=$(find "$toolPath/.store" -path '*/tools/*/any/Microsoft.DotNet.Helix.JobMonitor.dll' -type f -print -quit)
131+
if [ ! -f "$toolDll" ]; then
132+
echo "Could not find the Helix Job Monitor DLL in '$toolPath/.store'." >&2
133+
exit 1
134+
fi
135+
136+
echo "##vso[task.setvariable variable=HelixJobMonitorDll]$toolDll"
137+
displayName: Install Helix Job Monitor
138+
139+
- bash: |
140+
set -euo pipefail
141+
142+
bash ./eng/common/dotnet.sh exec "$(HelixJobMonitorDll)" \
143+
--helix-base-uri 'https://helix.dot.net/' \
144+
--polling-interval-seconds 30 \
145+
--fail-on-failed-tests true \
146+
--max-wait-minutes 355 \
147+
--stage-name '$(System.StageName)' \
148+
--organization dotnet \
149+
--repository maui \
150+
--build-reason '$(Build.Reason)' \
151+
--source-branch '$(Build.SourceBranch)'
152+
displayName: Monitor Helix Jobs
153+
env:
154+
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
155+
HELIX_ACCESSTOKEN: ${{ parameters.HelixAccessToken }}

0 commit comments

Comments
 (0)