Skip to content

Commit 3892f51

Browse files
authored
Pass the --ci argument to darc in SDK's CI (#45248)
1 parent 1ca74eb commit 3892f51

File tree

4 files changed

+22
-2
lines changed

4 files changed

+22
-2
lines changed

.devcontainer/vmr/init.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ vmr_branch=$(git -C "$sdk_dir" log --pretty=format:'%D' HEAD^ \
2525
| sed 's@origin/@@' \
2626
| sed 's@,.*@@')
2727

28-
"$workspace_dir/synchronize-vmr.sh" --branch "$vmr_branch" --debug
28+
"$workspace_dir/synchronize-vmr.sh" --branch "$vmr_branch" --ci --debug
2929

3030
cd "$vmr_dir"

eng/pipelines/templates/steps/vmr-pull-updates.yml

+2
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ steps:
5353
--remote "sdk:$(Agent.BuildDirectory)/sdk"
5454
--component-template $(Agent.BuildDirectory)/sdk/src/VirtualMonoRepo/Component.template.md
5555
--tpn-template $(Agent.BuildDirectory)/sdk/src/VirtualMonoRepo/THIRD-PARTY-NOTICES.template.txt
56+
--ci
5657
--debug
5758
||
5859
(echo "##vso[task.logissue type=error]Failed to synchronize the VMR" && exit 1)
@@ -76,6 +77,7 @@ steps:
7677
# -remote "sdk:$(Agent.BuildDirectory)/sdk"
7778
-componentTemplate $(Agent.BuildDirectory)/sdk/src/VirtualMonoRepo/Component.template.md `
7879
-tpnTemplate $(Agent.BuildDirectory)/sdk/src/VirtualMonoRepo/THIRD-PARTY-NOTICES.template.txt `
80+
-ci
7981
-debugOutput
8082
8183
if ($LASTEXITCODE -ne 0) {

eng/vmr-sync.ps1

+9-1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ Optional. Path to the dotnet/dotnet repository. When null, gets cloned to the te
6565
6666
.PARAMETER debugOutput
6767
Optional. Enables debug logging in the darc vmr command.
68+
69+
.PARAMETER ci
70+
Optional. Denotes that the script is running in a CI environment.
6871
#>
6972
param (
7073
[Parameter(Mandatory=$true, HelpMessage="Path to the temporary folder where repositories will be cloned")]
@@ -77,6 +80,7 @@ param (
7780
[string]$tpnTemplate = "src/VirtualMonoRepo/THIRD-PARTY-NOTICES.template.txt",
7881
[string]$azdevPat,
7982
[string][Alias('v', 'vmr')]$vmrDir,
83+
[switch]$ci,
8084
[switch]$debugOutput
8185
)
8286

@@ -189,12 +193,16 @@ $darcArgs = (
189193
"--discard-patches",
190194
"--generate-credscansuppressions",
191195
$repository
192-
)
196+
)
193197

194198
if ($recursive) {
195199
$darcArgs += ("--recursive")
196200
}
197201

202+
if ($ci) {
203+
$darcArgs += ("--ci")
204+
}
205+
198206
if ($additionalRemotes) {
199207
$darcArgs += ("--additional-remotes", $additionalRemotes)
200208
}

eng/vmr-sync.sh

+10
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ verbosity=verbose
107107
component_template="$sdk_dir/src/VirtualMonoRepo/Component.template.md"
108108
tpn_template="$sdk_dir/src/VirtualMonoRepo/THIRD-PARTY-NOTICES.template.txt"
109109
azdev_pat=''
110+
ci=false
110111

111112
# If sdk is a repo, we're in an sdk and not in the dotnet/dotnet repo
112113
if [[ -d "$sdk_dir/.git" ]]; then
@@ -151,6 +152,9 @@ while [[ $# -gt 0 ]]; do
151152
azdev_pat=$2
152153
shift
153154
;;
155+
--ci)
156+
ci=true
157+
;;
154158
-d|--debug)
155159
verbosity=debug
156160
;;
@@ -259,6 +263,11 @@ if [[ -n "$azdev_pat" ]]; then
259263
azdev_pat="--azdev-pat $azdev_pat"
260264
fi
261265

266+
ci_arg=''
267+
if [[ "$ci" == "true" ]]; then
268+
ci_arg="--ci"
269+
fi
270+
262271
# Synchronize the VMR
263272

264273
"$dotnet" darc vmr update \
@@ -267,6 +276,7 @@ fi
267276
$azdev_pat \
268277
--$verbosity \
269278
$recursive_arg \
279+
$ci_arg \
270280
$additional_remotes \
271281
--component-template "$component_template" \
272282
--tpn-template "$tpn_template" \

0 commit comments

Comments
 (0)