Skip to content

Commit

Permalink
[devops] Use the BUILD_REPOSITORY_TITLE variable instead of hardcodin…
Browse files Browse the repository at this point in the history
…g 'xamarin-macios'. (#21592)

And a few other minor cleanups as well.
  • Loading branch information
rolfbjarne authored Nov 19, 2024
1 parent 0a52c56 commit fa9294b
Show file tree
Hide file tree
Showing 41 changed files with 220 additions and 218 deletions.
2 changes: 1 addition & 1 deletion tools/devops/automation/build-lego.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ stages:

- pwsh: |
git remote remove origin
git remote add origin https://$(github--pat--vs-mobiletools-engineering-service2--repo-user)@github.com/xamarin/xamarin-macios.git
git remote add origin https://$(github--pat--vs-mobiletools-engineering-service2--repo-user)@github.com/$(Build.Repository.Name).git
git remote # don't add -v else we see the pat
git config user.email "[email protected]"
Expand Down
10 changes: 5 additions & 5 deletions tools/devops/automation/build-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -198,21 +198,21 @@ extends:
os: windows
sdl:
baseline:
baselineFile: '$(System.DefaultWorkingDirectory)\\xamarin-macios\\tools\\devops\\governance\\baselines.gdnbaselines'
baselineFile: '$(System.DefaultWorkingDirectory)\\$(BUILD_REPOSITORY_TITLE)\\tools\\devops\\governance\\baselines.gdnbaselines'
suppression:
suppressionFile: '$(System.DefaultWorkingDirectory)\\xamarin-macios\\tools\\devops\\governance\\suppress.gdnsuppress'
suppressionFile: '$(System.DefaultWorkingDirectory)\\$(BUILD_REPOSITORY_TITLE)\\tools\\devops\\governance\\suppress.gdnsuppress'
sourceAnalysisPool:
name: AzurePipelines-EO
image: 1ESPT-Windows2022
os: windows
tsa:
configFile: '$(System.DefaultWorkingDirectory)\\xamarin-macios\\tools\\devops\\governance\\tsa_config.gdntsa'
configFile: '$(System.DefaultWorkingDirectory)\\$(BUILD_REPOSITORY_TITLE)\\tools\\devops\\governance\\tsa_config.gdntsa'
sbom:
enabled: false # we run our on sbom generation
credscan:
suppressionsFile: '$(System.DefaultWorkingDirectory)\\xamarin-macios\\tools\\devops\\governance\\CredScanSuppressions.json'
suppressionsFile: '$(System.DefaultWorkingDirectory)\\$(BUILD_REPOSITORY_TITLE)\\tools\\devops\\governance\\CredScanSuppressions.json'
policheck:
exclusionsFile: '$(System.DefaultWorkingDirectory)\\xamarin-macios\\tools\\devops\\governance\\PoliCheckExclusions.xml'
exclusionsFile: '$(System.DefaultWorkingDirectory)\\$(BUILD_REPOSITORY_TITLE)\\tools\\devops\\governance\\PoliCheckExclusions.xml'
sourceRepositoriesToScan:
runInSingleJob: true # run both maccore and macios in the same job
include:
Expand Down
10 changes: 5 additions & 5 deletions tools/devops/automation/build-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -183,21 +183,21 @@ extends:
os: windows
sdl:
baseline:
baselineFile: '$(System.DefaultWorkingDirectory)\\xamarin-macios\\tools\\devops\\governance\\baselines.gdnbaselines'
baselineFile: '$(System.DefaultWorkingDirectory)\\$(BUILD_REPOSITORY_TITLE)\\tools\\devops\\governance\\baselines.gdnbaselines'
suppression:
suppressionFile: '$(System.DefaultWorkingDirectory)\\xamarin-macios\\tools\\devops\\governance\\suppress.gdnsuppress'
suppressionFile: '$(System.DefaultWorkingDirectory)\\$(BUILD_REPOSITORY_TITLE)\\tools\\devops\\governance\\suppress.gdnsuppress'
sourceAnalysisPool:
name: AzurePipelines-EO
image: 1ESPT-Windows2022
os: windows
tsa:
configFile: '$(System.DefaultWorkingDirectory)\\xamarin-macios\\tools\\devops\\governance\\tsa_config.gdntsa'
configFile: '$(System.DefaultWorkingDirectory)\\$(BUILD_REPOSITORY_TITLE)\\tools\\devops\\governance\\tsa_config.gdntsa'
sbom:
enabled: false # we run our on sbom generation
credscan:
suppressionsFile: '$(System.DefaultWorkingDirectory)\\xamarin-macios\\tools\\devops\\governance\\CredScanSuppressions.json'
suppressionsFile: '$(System.DefaultWorkingDirectory)\\$(BUILD_REPOSITORY_TITLE)\\tools\\devops\\governance\\CredScanSuppressions.json'
policheck:
exclusionsFile: '$(System.DefaultWorkingDirectory)\\xamarin-macios\\tools\\devops\\governance\\PoliCheckExclusions.xml'
exclusionsFile: '$(System.DefaultWorkingDirectory)\\$(BUILD_REPOSITORY_TITLE)\\tools\\devops\\governance\\PoliCheckExclusions.xml'
sourceRepositoriesToScan:
runInSingleJob: true # run both maccore and macios in the same job
include:
Expand Down
2 changes: 1 addition & 1 deletion tools/devops/automation/publish-pr-html-results.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ resources:
# but because we have device issues, and it needs to be gree to trigger, we will deal with it later
pipelines:
- pipeline: macios
source: xamarin-macios
source: $(BUILD_REPOSITORY_TITLE)

variables:
- group: xamops-azdev-secrets
Expand Down
10 changes: 5 additions & 5 deletions tools/devops/automation/run-post-ci-build-vs-insertion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,21 +54,21 @@ extends:
os: windows
sdl:
baseline:
baselineFile: '$(System.DefaultWorkingDirectory)\\xamarin-macios\\tools\\devops\\governance\\baselines.gdnbaselines'
baselineFile: '$(System.DefaultWorkingDirectory)\\$(BUILD_REPOSITORY_TITLE)\\tools\\devops\\governance\\baselines.gdnbaselines'
suppression:
suppressionFile: '$(System.DefaultWorkingDirectory)\\xamarin-macios\\tools\\devops\\governance\\suppress.gdnsuppress'
suppressionFile: '$(System.DefaultWorkingDirectory)\\$(BUILD_REPOSITORY_TITLE)\\tools\\devops\\governance\\suppress.gdnsuppress'
sourceAnalysisPool:
name: AzurePipelines-EO
image: 1ESPT-Windows2022
os: windows
tsa:
configFile: '$(System.DefaultWorkingDirectory)\\xamarin-macios\\tools\\devops\\governance\\tsa_config.gdntsa'
configFile: '$(System.DefaultWorkingDirectory)\\$(BUILD_REPOSITORY_TITLE)\\tools\\devops\\governance\\tsa_config.gdntsa'
sbom:
enabled: false # we run our on sbom generation
credscan:
suppressionsFile: '$(System.DefaultWorkingDirectory)\\xamarin-macios\\tools\\devops\\governance\\CredScanSuppressions.json'
suppressionsFile: '$(System.DefaultWorkingDirectory)\\$(BUILD_REPOSITORY_TITLE)\\tools\\devops\\governance\\CredScanSuppressions.json'
policheck:
exclusionsFile: '$(System.DefaultWorkingDirectory)\\xamarin-macios\\tools\\devops\\governance\\PoliCheckExclusions.xml'
exclusionsFile: '$(System.DefaultWorkingDirectory)\\$(BUILD_REPOSITORY_TITLE)\\tools\\devops\\governance\\PoliCheckExclusions.xml'
sourceRepositoriesToScan:
runInSingleJob: true # run both maccore and macios in the same job
include:
Expand Down
4 changes: 2 additions & 2 deletions tools/devops/automation/scripts/GitHub.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Describe 'New-GitHubComment' {
# assert the call and compare the expected parameters to the received ones
Assert-MockCalled -CommandName Invoke-RestMethod -Times 1 -Scope It -ParameterFilter {
# validate each of the params and the payload
if ($Uri -ne "https://api.github.com/repos/xamarin/xamarin-macios/commits/BUILD_SOURCEVERSION/comments") {
if ($Uri -ne "https://api.github.com/repos/$Env:BUILD_REPOSITORY_NAME/commits/BUILD_SOURCEVERSION/comments") {
return $False
}
if ($Headers.Authorization -ne ("token {0}" -f $envVariables["GITHUB_TOKEN"])) {
Expand Down Expand Up @@ -136,7 +136,7 @@ Describe 'Get-GitHubPRInfo' {
# assert the call and compare the expected parameters to the received ones
Assert-MockCalled -CommandName Invoke-RestMethod -Times 1 -Scope It -ParameterFilter {
# validate each of the params and the payload
if ($Uri -ne "https://api.github.com/repos/xamarin/xamarin-macios/pulls/$changeId") {
if ($Uri -ne "https://api.github.com/repos/$Env:BUILD_REPOSITORY_NAME/pulls/$changeId") {
return $False
}
if ($Headers.Authorization -ne ("token {0}" -f $envVariables["GITHUB_TOKEN"])) {
Expand Down
6 changes: 3 additions & 3 deletions tools/devops/automation/scripts/GitHub.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -765,9 +765,9 @@ function New-GitHubComment {
# calcualte the change ID which is the PR number
$buildSourceBranch = $Env:BUILD_SOURCEBRANCH
$changeId = $buildSourceBranch.Replace("refs/pull/", "").Replace("/merge", "")
$url = "https://api.github.com/repos/xamarin/xamarin-macios/issues/$changeId/comments"
$url = "https://api.github.com/repos/$Env:BUILD_REPOSITORY_NAME/issues/$changeId/comments"
} else {
$url = "https://api.github.com/repos/xamarin/xamarin-macios/commits/$Env:BUILD_SOURCEVERSION/comments"
$url = "https://api.github.com/repos/$Env:BUILD_REPOSITORY_NAME/commits/$Env:BUILD_SOURCEVERSION/comments"
}

# github has a max size for the comments to be added in a PR, it can be the case that because we failed so much, that we
Expand Down Expand Up @@ -822,7 +822,7 @@ function Get-GitHubPRInfo {
}
}

$url = "https://api.github.com/repos/xamarin/xamarin-macios/pulls/$ChangeId"
$url = "https://api.github.com/repos/$Env:BUILD_REPOSITORY_NAME/pulls/$ChangeId"

$headers = @{
Authorization = ("token {0}" -f $Env:GITHUB_TOKEN);
Expand Down
2 changes: 1 addition & 1 deletion tools/devops/automation/scripts/bash/compare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ fi

# Figure out the base hash we want to compare against
if [[ $PR_ID ]]; then
git fetch --no-tags --progress https://github.com/xamarin/xamarin-macios +refs/pull/"$PR_ID"/*:refs/remotes/origin/pr/"$PR_ID"/*
git fetch --no-tags --progress "https://github.com/$BUILD_REPOSITORY_NAME" +refs/pull/"$PR_ID"/*:refs/remotes/origin/pr/"$PR_ID"/*

# Compute the correct base hash to use for comparison by getting the merge base between the target branch and the commit we're building.
if MERGE_BASE=$(git merge-base "$SYSTEM_PULLREQUEST_SOURCECOMMITID" "refs/remotes/origin/$SYSTEM_PULLREQUEST_TARGETBRANCH"); then
Expand Down
30 changes: 15 additions & 15 deletions tools/devops/automation/scripts/bash/configure-platforms.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,34 @@ IFS=$'\n\t '

FILE=$(pwd)/tmp.txt

make -C "$BUILD_SOURCESDIRECTORY/xamarin-macios/tools/devops" print-variable-value-to-file FILE="$FILE" VARIABLE=DOTNET_PLATFORMS
make -C "$BUILD_SOURCESDIRECTORY/$BUILD_REPOSITORY_TITLE/tools/devops" print-variable-value-to-file FILE="$FILE" VARIABLE=DOTNET_PLATFORMS
DOTNET_PLATFORMS=$(cat "$FILE")

make -C "$BUILD_SOURCESDIRECTORY/xamarin-macios/tools/devops" print-variable-value-to-file FILE="$FILE" VARIABLE=ALL_DOTNET_PLATFORMS
make -C "$BUILD_SOURCESDIRECTORY/$BUILD_REPOSITORY_TITLE/tools/devops" print-variable-value-to-file FILE="$FILE" VARIABLE=ALL_DOTNET_PLATFORMS
ALL_DOTNET_PLATFORMS=$(cat "$FILE")

make -C "$BUILD_SOURCESDIRECTORY/xamarin-macios/tools/devops" print-variable-value-to-file FILE="$FILE" VARIABLE=INCLUDE_IOS
make -C "$BUILD_SOURCESDIRECTORY/$BUILD_REPOSITORY_TITLE/tools/devops" print-variable-value-to-file FILE="$FILE" VARIABLE=INCLUDE_IOS
INCLUDE_IOS=$(cat "$FILE")

make -C "$BUILD_SOURCESDIRECTORY/xamarin-macios/tools/devops" print-variable-value-to-file FILE="$FILE" VARIABLE=INCLUDE_TVOS
make -C "$BUILD_SOURCESDIRECTORY/$BUILD_REPOSITORY_TITLE/tools/devops" print-variable-value-to-file FILE="$FILE" VARIABLE=INCLUDE_TVOS
INCLUDE_TVOS=$(cat "$FILE")

make -C "$BUILD_SOURCESDIRECTORY/xamarin-macios/tools/devops" print-variable-value-to-file FILE="$FILE" VARIABLE=INCLUDE_MAC
make -C "$BUILD_SOURCESDIRECTORY/$BUILD_REPOSITORY_TITLE/tools/devops" print-variable-value-to-file FILE="$FILE" VARIABLE=INCLUDE_MAC
INCLUDE_MAC=$(cat "$FILE")

make -C "$BUILD_SOURCESDIRECTORY/xamarin-macios/tools/devops" print-variable-value-to-file FILE="$FILE" VARIABLE=INCLUDE_MACCATALYST
make -C "$BUILD_SOURCESDIRECTORY/$BUILD_REPOSITORY_TITLE/tools/devops" print-variable-value-to-file FILE="$FILE" VARIABLE=INCLUDE_MACCATALYST
INCLUDE_MACCATALYST=$(cat "$FILE")

make -C "$BUILD_SOURCESDIRECTORY/xamarin-macios/tools/devops" print-variable-value-to-file FILE="$FILE" VARIABLE=IOS_NUGET_OS_VERSION
make -C "$BUILD_SOURCESDIRECTORY/$BUILD_REPOSITORY_TITLE/tools/devops" print-variable-value-to-file FILE="$FILE" VARIABLE=IOS_NUGET_OS_VERSION
IOS_NUGET_OS_VERSION=$(cat "$FILE")

make -C "$BUILD_SOURCESDIRECTORY/xamarin-macios/tools/devops" print-variable-value-to-file FILE="$FILE" VARIABLE=TVOS_NUGET_OS_VERSION
make -C "$BUILD_SOURCESDIRECTORY/$BUILD_REPOSITORY_TITLE/tools/devops" print-variable-value-to-file FILE="$FILE" VARIABLE=TVOS_NUGET_OS_VERSION
TVOS_NUGET_OS_VERSION=$(cat "$FILE")

make -C "$BUILD_SOURCESDIRECTORY/xamarin-macios/tools/devops" print-variable-value-to-file FILE="$FILE" VARIABLE=MACOS_NUGET_OS_VERSION
make -C "$BUILD_SOURCESDIRECTORY/$BUILD_REPOSITORY_TITLE/tools/devops" print-variable-value-to-file FILE="$FILE" VARIABLE=MACOS_NUGET_OS_VERSION
MACOS_NUGET_OS_VERSION=$(cat "$FILE")

make -C "$BUILD_SOURCESDIRECTORY/xamarin-macios/tools/devops" print-variable-value-to-file FILE="$FILE" VARIABLE=MACCATALYST_NUGET_OS_VERSION
make -C "$BUILD_SOURCESDIRECTORY/$BUILD_REPOSITORY_TITLE/tools/devops" print-variable-value-to-file FILE="$FILE" VARIABLE=MACCATALYST_NUGET_OS_VERSION
MACCATALYST_NUGET_OS_VERSION=$(cat "$FILE")

# print it out, so turn off echoing since that confuses Azure DevOps
Expand All @@ -48,29 +48,29 @@ for platform in $DOTNET_PLATFORMS; do
DISABLED_DOTNET_PLATFORMS=${DISABLED_DOTNET_PLATFORMS/ $platform / }

VARIABLE="${PLATFORM_UPPER}_NUGET_VERSION_NO_METADATA"
make -C "$BUILD_SOURCESDIRECTORY/xamarin-macios/tools/devops" print-variable-value-to-file FILE="$FILE" VARIABLE="$VARIABLE"
make -C "$BUILD_SOURCESDIRECTORY/$BUILD_REPOSITORY_TITLE/tools/devops" print-variable-value-to-file FILE="$FILE" VARIABLE="$VARIABLE"
VALUE=$(cat "$FILE")
echo "##vso[task.setvariable variable=$VARIABLE;isOutput=true]$VALUE"

VARIABLE="${PLATFORM_UPPER}_NUGET_SDK_NAME"
make -C "$BUILD_SOURCESDIRECTORY/xamarin-macios/tools/devops" print-variable-value-to-file FILE="$FILE" VARIABLE="$VARIABLE"
make -C "$BUILD_SOURCESDIRECTORY/$BUILD_REPOSITORY_TITLE/tools/devops" print-variable-value-to-file FILE="$FILE" VARIABLE="$VARIABLE"
VALUE=$(cat "$FILE")
echo "##vso[task.setvariable variable=$VARIABLE;isOutput=true]$VALUE"

VARIABLE="${PLATFORM_UPPER}_NUGET_REF_NAME"
make -C "$BUILD_SOURCESDIRECTORY/xamarin-macios/tools/devops" print-variable-value-to-file FILE="$FILE" VARIABLE="$VARIABLE"
make -C "$BUILD_SOURCESDIRECTORY/$BUILD_REPOSITORY_TITLE/tools/devops" print-variable-value-to-file FILE="$FILE" VARIABLE="$VARIABLE"
VALUE=$(cat "$FILE")
echo "##vso[task.setvariable variable=$VARIABLE;isOutput=true]$VALUE"

VARIABLE="DOTNET_${PLATFORM_UPPER}_RUNTIME_IDENTIFIERS"
make -C "$BUILD_SOURCESDIRECTORY/xamarin-macios/tools/devops" print-variable-value-to-file FILE="$FILE" VARIABLE="$VARIABLE"
make -C "$BUILD_SOURCESDIRECTORY/$BUILD_REPOSITORY_TITLE/tools/devops" print-variable-value-to-file FILE="$FILE" VARIABLE="$VARIABLE"
VALUE=$(cat "$FILE")
echo "##vso[task.setvariable variable=$VARIABLE;isOutput=true]$VALUE"

RIDS=$VALUE
for rid in $RIDS; do
VARIABLE="${rid}_NUGET_RUNTIME_NAME"
make -C "$BUILD_SOURCESDIRECTORY/xamarin-macios/tools/devops" print-variable-value-to-file FILE="$FILE" VARIABLE="$VARIABLE"
make -C "$BUILD_SOURCESDIRECTORY/$BUILD_REPOSITORY_TITLE/tools/devops" print-variable-value-to-file FILE="$FILE" VARIABLE="$VARIABLE"
VALUE=$(cat "$FILE")
echo "##vso[task.setvariable variable=$VARIABLE;isOutput=true]$VALUE"
done
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,23 @@ if test -z "${BUILD_SOURCESDIRECTORY:-}"; then
fi
# Don't assume we're in the right directory (makes it easier to run the script
# locally).
cd "$BUILD_SOURCESDIRECTORY/xamarin-macios"
cd "$BUILD_SOURCESDIRECTORY/$BUILD_REPOSITORY_TITLE"

WORKLOAD_DST="$BUILD_SOURCESDIRECTORY/WorkloadRollback.json"

var=$(make -C "$BUILD_SOURCESDIRECTORY/xamarin-macios/tools/devops" print-variable VARIABLE=DOTNET_PLATFORMS)
var=$(make -C "$BUILD_SOURCESDIRECTORY/$BUILD_REPOSITORY_TITLE/tools/devops" print-variable VARIABLE=DOTNET_PLATFORMS)
DOTNET_PLATFORMS=${var#*=}
echo "Dotnet platforms are '$DOTNET_PLATFORMS'"

var=$(make -C "$BUILD_SOURCESDIRECTORY/xamarin-macios/tools/devops" print-variable VARIABLE=MACIOS_MANIFEST_VERSION_BAND)
var=$(make -C "$BUILD_SOURCESDIRECTORY/$BUILD_REPOSITORY_TITLE/tools/devops" print-variable VARIABLE=MACIOS_MANIFEST_VERSION_BAND)
MACIOS_MANIFEST_VERSION_BAND=${var#*=}

echo "{" > "$WORKLOAD_DST"
for platform in $DOTNET_PLATFORMS; do
CURRENT_UPPER=$(echo "$platform" | tr "[:lower:]" "[:upper:]")
CURRENT_LOWER=$(echo "$platform" | tr "[:upper:]" "[:lower:]")

var=$(make -C "$BUILD_SOURCESDIRECTORY"/xamarin-macios/tools/devops print-variable "VARIABLE=${CURRENT_UPPER}_NUGET_VERSION_FULL")
var=$(make -C "$BUILD_SOURCESDIRECTORY/$BUILD_REPOSITORY_TITLE/tools/devops" print-variable "VARIABLE=${CURRENT_UPPER}_NUGET_VERSION_FULL")
NUGET_VERSION_FULL=${var#*=}
NUGET_VERSION_FULL=$(echo "$NUGET_VERSION_FULL" | cut -d "+" -f1)

Expand Down
16 changes: 8 additions & 8 deletions tools/devops/automation/scripts/bash/install-workloads.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ env | sort

# This script can be executed locally by downloading the 'WorkloadRollback'
# and 'not-signed-package' artifacts from an Azure DevOps build, and then
# extracting the files into the xamarin-macios/../artifacts directory.
# extracting the files into the <repo>/../artifacts directory.

# If BUILD_SOURCESDIRECTORY is not set, it's likely we're executing locally.
# In which case we can figure out where we are from the current git checkout
Expand All @@ -18,7 +18,7 @@ if test -z "${BUILD_SOURCESDIRECTORY:-}"; then
fi
# Don't assume we're in the right directory (makes it easier to run the script
# locally).
cd "$BUILD_SOURCESDIRECTORY/xamarin-macios"
cd "$BUILD_SOURCESDIRECTORY/$BUILD_REPOSITORY_TITLE"

# Validate a few things
ARTIFACTS_PATH=$BUILD_SOURCESDIRECTORY/artifacts
Expand All @@ -42,15 +42,15 @@ make global.json

make -C builds dotnet

var=$(make -C "$BUILD_SOURCESDIRECTORY/xamarin-macios/tools/devops" print-variable VARIABLE=DOTNET)
var=$(make -C "$BUILD_SOURCESDIRECTORY/$BUILD_REPOSITORY_TITLE/tools/devops" print-variable VARIABLE=DOTNET)
DOTNET=${var#*=}
echo "Using dotnet found at $DOTNET"

var=$(make -C "$BUILD_SOURCESDIRECTORY/xamarin-macios/tools/devops" print-variable VARIABLE=DOTNET_PLATFORMS)
var=$(make -C "$BUILD_SOURCESDIRECTORY/$BUILD_REPOSITORY_TITLE/tools/devops" print-variable VARIABLE=DOTNET_PLATFORMS)
DOTNET_PLATFORMS=${var#*=}
echo "Dotnet platforms are '$DOTNET_PLATFORMS'"

var=$(make -C "$BUILD_SOURCESDIRECTORY/xamarin-macios/tools/devops" print-abspath-variable VARIABLE=DOTNET_NUPKG_DIR)
var=$(make -C "$BUILD_SOURCESDIRECTORY/$BUILD_REPOSITORY_TITLE/tools/devops" print-abspath-variable VARIABLE=DOTNET_NUPKG_DIR)
DOTNET_NUPKG_DIR=${var#*=}
echo "Using nuget dir $DOTNET_NUPKG_DIR"

Expand Down Expand Up @@ -80,9 +80,9 @@ done
for platform in $DOTNET_PLATFORMS; do
unzip -l "$DOTNET_NUPKG_DIR"/Microsoft."$platform".Bundle.*.zip
unzip "$DOTNET_NUPKG_DIR"/Microsoft."$platform".Bundle.*.zip -d tmpdir
rsync -av tmpdir/dotnet/sdk-manifests/* "$BUILD_SOURCESDIRECTORY"/xamarin-macios/builds/downloads/dotnet-*/sdk-manifests/
rsync -av tmpdir/dotnet/sdk-manifests/* "$BUILD_SOURCESDIRECTORY/$BUILD_REPOSITORY_TITLE"/builds/downloads/dotnet-*/sdk-manifests/
done
find "$BUILD_SOURCESDIRECTORY"/xamarin-macios/builds/downloads/dotnet-*
find "$BUILD_SOURCESDIRECTORY/$BUILD_REPOSITORY_TITLE"/builds/downloads/dotnet-*

# PLATFORMS may be empty/no values
set +u
Expand All @@ -91,6 +91,6 @@ if [ ${#PLATFORMS[@]} -gt 0 ]; then
fi
set -u

var=$(make -C "$BUILD_SOURCESDIRECTORY/xamarin-macios/tools/devops" print-variable VARIABLE=DOTNET_DIR)
var=$(make -C "$BUILD_SOURCESDIRECTORY/$BUILD_REPOSITORY_TITLE/tools/devops" print-variable VARIABLE=DOTNET_DIR)
DOTNET_DIR=${var#*=}
ls -lR "$DOTNET_DIR"
2 changes: 1 addition & 1 deletion tools/devops/automation/scripts/bash/vsts-compare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ echo "GH PR: $PR_ID"
cd "$XAM_TOP"

if [[ $PR_ID ]]; then
git fetch --no-tags --progress https://github.com/xamarin/xamarin-macios "+refs/pull/$PR_ID/*:refs/remotes/origin/pr/$PR_ID/*"
git fetch --no-tags --progress "https://github.com/$BUILD_REPOSITORY_NAME" "+refs/pull/$PR_ID/*:refs/remotes/origin/pr/$PR_ID/*"

# Compute the correct base hash to use for comparison by getting the merge base between the target branch and the commit we're building.
if MERGE_BASE=$(git merge-base "$SYSTEM_PULLREQUEST_SOURCECOMMITID" "refs/remotes/origin/$SYSTEM_PULLREQUEST_TARGETBRANCH"); then
Expand Down
Loading

6 comments on commit fa9294b

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

Please sign in to comment.