Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<ProductDependencies>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="11.0.0-beta.26163.2">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="11.0.0-beta.26171.1">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>2e8c949b4e75b05c3a33e848f36cf5b263707338</Sha>
<Sha>e385506c3dcbeea64fa1aae811e0ff9232815666</Sha>
</Dependency>
</ToolsetDependencies>
</Dependencies>
2 changes: 2 additions & 0 deletions eng/common/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Param(
[string][Alias('v')]$verbosity = "minimal",
[string] $msbuildEngine = $null,
[bool] $warnAsError = $true,
[string] $warnNotAsError = '',
[bool] $nodeReuse = $true,
[switch] $buildCheck = $false,
[switch][Alias('r')]$restore,
Expand Down Expand Up @@ -70,6 +71,7 @@ function Print-Usage() {
Write-Host " -excludeCIBinarylog Don't output binary log (short: -nobl)"
Write-Host " -prepareMachine Prepare machine for CI run, clean up processes after build"
Write-Host " -warnAsError <value> Sets warnaserror msbuild parameter ('true' or 'false')"
Write-Host " -warnNotAsError <value> Sets a semi-colon delimited list of warning codes that should not be treated as errors"
Write-Host " -msbuildEngine <value> Msbuild engine to use to run build ('dotnet', 'vs', or unspecified)."
Write-Host " -excludePrereleaseVS Set to exclude build engines in prerelease versions of Visual Studio"
Write-Host " -nativeToolsOnMachine Sets the native tools on machine environment variable (indicating that the script should use native tools on machine)"
Expand Down
6 changes: 6 additions & 0 deletions eng/common/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ usage()
echo " --prepareMachine Prepare machine for CI run, clean up processes after build"
echo " --nodeReuse <value> Sets nodereuse msbuild parameter ('true' or 'false')"
echo " --warnAsError <value> Sets warnaserror msbuild parameter ('true' or 'false')"
echo " --warnNotAsError <value> Sets a semi-colon delimited list of warning codes that should not be treated as errors"
echo " --buildCheck <value> Sets /check msbuild parameter"
echo " --fromVMR Set when building from within the VMR"
echo ""
Expand Down Expand Up @@ -78,6 +79,7 @@ ci=false
clean=false

warn_as_error=true
warn_not_as_error=''
node_reuse=true
build_check=false
binary_log=false
Expand Down Expand Up @@ -176,6 +178,10 @@ while [[ $# -gt 0 ]]; do
warn_as_error=$2
shift
;;
-warnnotaserror)
warn_not_as_error=$2
shift
;;
-nodereuse)
node_reuse=$2
shift
Expand Down
75 changes: 68 additions & 7 deletions eng/common/core-templates/job/renovate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,30 @@ parameters:
type: boolean
default: false

# Name of the arcade repository resource in the pipeline.
# This allows repos which haven't been onboarded to Arcade to still use this
# template by checking out the repo as a resource with a custom name and pointing
# this parameter to it.
- name: arcadeRepoResource
type: string
default: self

# Directory name for the self repo under $(Build.SourcesDirectory) in multi-checkout.
# In multi-checkout (when arcadeRepoResource != 'self'), Azure DevOps checks out the
# self repo to $(Build.SourcesDirectory)/<repoName>. Set this to match the auto-generated
# directory name. Using the auto-generated name is necessary rather than explicitly
# defining a checkout path because container jobs expect repos to live under the agent's
# workspace ($(Pipeline.Workspace)). On some self-hosted setups the host path
# (e.g., /mnt/vss/_work) differs from the container path (e.g., /__w), and a custom checkout
# path can fail validation. Using the default checkout location keeps the paths consistent
# and avoids this issue.
- name: selfRepoName
type: string
default: ''
- name: arcadeRepoName
type: string
default: ''

# Pool configuration for the job.
- name: pool
type: object
Expand All @@ -71,16 +95,36 @@ jobs:
# Changing the variable name here would require updating the name in https://github.com/dotnet/arcade/blob/main/eng/renovate.json as well.
- name: renovateVersion
value: '42'
readonly: true
- name: renovateLogFilePath
value: '$(Build.ArtifactStagingDirectory)/renovate.json'
readonly: true
- name: dryRunArg
readonly: true
${{ if eq(parameters.dryRun, true) }}:
value: 'full'
${{ else }}:
value: ''
- name: recreateWhenArg
readonly: true
${{ if eq(parameters.forceRecreatePR, true) }}:
value: 'always'
${{ else }}:
value: ''
# In multi-checkout (without custom paths), Azure DevOps places each repo under
# $(Build.SourcesDirectory)/<repoName>. selfRepoName must be provided in that case.
- name: selfRepoPath
readonly: true
${{ if eq(parameters.arcadeRepoResource, 'self') }}:
value: '$(Build.SourcesDirectory)'
${{ else }}:
value: '$(Build.SourcesDirectory)/${{ parameters.selfRepoName }}'
- name: arcadeRepoPath
readonly: true
${{ if eq(parameters.arcadeRepoResource, 'self') }}:
value: '$(Build.SourcesDirectory)'
${{ else }}:
value: '$(Build.SourcesDirectory)/${{ parameters.arcadeRepoName }}'
pool: ${{ parameters.pool }}

templateContext:
Expand All @@ -96,17 +140,34 @@ jobs:
steps:
- checkout: self
fetchDepth: 1

- ${{ if ne(parameters.arcadeRepoResource, 'self') }}:
- checkout: ${{ parameters.arcadeRepoResource }}
fetchDepth: 1

- script: renovate-config-validator $(Build.SourcesDirectory)/${{parameters.renovateConfigPath}}
- script: |
renovate-config-validator $(selfRepoPath)/${{parameters.renovateConfigPath}} 2>&1 | tee /tmp/renovate-config-validator.out
validatorExit=${PIPESTATUS[0]}
if grep -q '^ WARN:' /tmp/renovate-config-validator.out; then
echo "##vso[task.logissue type=warning]Renovate config validator produced warnings."
echo "##vso[task.complete result=SucceededWithIssues]"
fi
exit $validatorExit
displayName: Validate Renovate config
env:
LOG_LEVEL: info
LOG_FILE_LEVEL: debug
LOG_FILE: $(Build.ArtifactStagingDirectory)/renovate-config-validator.json
- script: |
. $(Build.SourcesDirectory)/eng/common/renovate.env
renovate
. $(arcadeRepoPath)/eng/common/renovate.env
renovate 2>&1 | tee /tmp/renovate.out
renovateExit=${PIPESTATUS[0]}
if grep -q '^ WARN:' /tmp/renovate.out; then
echo "##vso[task.logissue type=warning]Renovate produced warnings."
echo "##vso[task.complete result=SucceededWithIssues]"
fi
exit $renovateExit
displayName: Run Renovate
env:
RENOVATE_FORK_TOKEN: $(BotAccount-dotnet-renovate-bot-PAT)
Expand All @@ -117,13 +178,13 @@ jobs:
RENOVATE_RECREATE_WHEN: $(recreateWhenArg)
LOG_LEVEL: info
LOG_FILE_LEVEL: debug
LOG_FILE: $(Build.ArtifactStagingDirectory)/renovate.json
RENOVATE_CONFIG_FILE: $(Build.SourcesDirectory)/${{parameters.renovateConfigPath}}
LOG_FILE: $(renovateLogFilePath)
RENOVATE_CONFIG_FILE: $(selfRepoPath)/${{parameters.renovateConfigPath}}
- script: |
echo "PRs created by Renovate:"
if [ -s "$(Build.ArtifactStagingDirectory)/renovate-log.json" ]; then
if ! jq -r 'select(.msg == "PR created" and .pr != null) | "https://github.com/\(.repository)/pull/\(.pr)"' "$(Build.ArtifactStagingDirectory)/renovate-log.json" | sort -u; then
if [ -s "$(renovateLogFilePath)" ]; then
if ! jq -r 'select(.msg == "PR created" and .pr != null) | "https://github.com/\(.repository)/pull/\(.pr)"' "$(renovateLogFilePath)" | sort -u; then
echo "##vso[task.logissue type=warning]Failed to parse Renovate log file with jq."
echo "##vso[task.complete result=SucceededWithIssues]"
fi
Expand Down
32 changes: 0 additions & 32 deletions eng/common/core-templates/jobs/codeql-build.yml

This file was deleted.

16 changes: 3 additions & 13 deletions eng/common/core-templates/post-build/post-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,6 @@ parameters:
type: boolean
default: false

- name: SDLValidationParameters
type: object
default:
enable: false
publishGdn: false
continueOnError: false
params: ''
artifactNames: ''
downloadArtifacts: true

- name: isAssetlessBuild
type: boolean
displayName: Is Assetless Build
Expand Down Expand Up @@ -103,7 +93,7 @@ parameters:
default: false

stages:
- ${{ if or(eq( parameters.enableNugetValidation, 'true'), eq(parameters.enableSigningValidation, 'true'), eq(parameters.enableSourceLinkValidation, 'true'), eq(parameters.SDLValidationParameters.enable, 'true')) }}:
- ${{ if or(eq( parameters.enableNugetValidation, 'true'), eq(parameters.enableSigningValidation, 'true'), eq(parameters.enableSourceLinkValidation, 'true')) }}:
- stage: Validate
dependsOn: ${{ parameters.validateDependsOn }}
displayName: Validate Build Assets
Expand Down Expand Up @@ -206,7 +196,7 @@ stages:
displayName: Validate
inputs:
filePath: eng\common\sdk-task.ps1
arguments: -task SigningValidation -restore -msbuildEngine vs
arguments: -task SigningValidation -restore
/p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts'
/p:SignCheckExclusionsFile='$(System.DefaultWorkingDirectory)/eng/SignCheckExclusionsFile.txt'
${{ parameters.signingValidationAdditionalParameters }}
Expand Down Expand Up @@ -268,7 +258,7 @@ stages:

- ${{ if ne(parameters.publishAssetsImmediately, 'true') }}:
- stage: publish_using_darc
${{ if or(eq(parameters.enableNugetValidation, 'true'), eq(parameters.enableSigningValidation, 'true'), eq(parameters.enableSourceLinkValidation, 'true'), eq(parameters.SDLValidationParameters.enable, 'true')) }}:
${{ if or(eq(parameters.enableNugetValidation, 'true'), eq(parameters.enableSigningValidation, 'true'), eq(parameters.enableSourceLinkValidation, 'true')) }}:
dependsOn: ${{ parameters.publishDependsOn }}
${{ else }}:
dependsOn: ${{ parameters.validateDependsOn }}
Expand Down
27 changes: 26 additions & 1 deletion eng/common/core-templates/stages/renovate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,21 @@ parameters:
type: boolean
default: false

# Name of the arcade repository resource in the pipeline.
# This allows repos which haven't been onboarded to Arcade to still use this
# template by checking out the repo as a resource with a custom name and pointing
# this parameter to it.
- name: arcadeRepoResource
type: string
default: 'self'

- name: selfRepoName
type: string
default: ''
- name: arcadeRepoName
type: string
default: ''

# Pool configuration for the pipeline.
- name: pool
type: object
Expand Down Expand Up @@ -69,18 +84,28 @@ extends:
pool: ${{ parameters.pool }}
sdl:
sourceAnalysisPool: ${{ parameters.sdlPool }}
# When repos that aren't onboarded to Arcade use this template, they set the
# arcadeRepoResource parameter to point to their Arcade repo resource. In that case,
# Aracde will be excluded from SDL analysis.
${{ if ne(parameters.arcadeRepoResource, 'self') }}:
sourceRepositoriesToScan:
exclude:
- repository: ${{ parameters.arcadeRepoResource }}
containers:
RenovateContainer:
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-renovate-${{ parameters.renovateVersion }}-amd64
stages:
- stage: Renovate
displayName: Run Renovate
jobs:
- template: /eng/common/core-templates/job/renovate.yml
- template: /eng/common/core-templates/job/renovate.yml@${{ parameters.arcadeRepoResource }}
parameters:
renovateConfigPath: ${{ parameters.renovateConfigPath }}
gitHubRepo: ${{ parameters.gitHubRepo }}
baseBranches: ${{ parameters.baseBranches }}
dryRun: ${{ parameters.dryRun }}
forceRecreatePR: ${{ parameters.forceRecreatePR }}
pool: ${{ parameters.pool }}
arcadeRepoResource: ${{ parameters.arcadeRepoResource }}
selfRepoName: ${{ parameters.selfRepoName }}
arcadeRepoName: ${{ parameters.arcadeRepoName }}
33 changes: 27 additions & 6 deletions eng/common/cross/build-rootfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ __FreeBSDPackages+=" krb5"
__FreeBSDPackages+=" terminfo-db"

__OpenBSDVersion="7.8"
__OpenBSDPackages="heimdal-libs"
__OpenBSDPackages+=" icu4c"
__OpenBSDPackages+=" inotify-tools"
__OpenBSDPackages+=" openssl"
__OpenBSDPackages+=" heimdal-libs"

__IllumosPackages="icu"
__IllumosPackages+=" mit-krb5"
Expand Down Expand Up @@ -632,19 +632,40 @@ elif [[ "$__CodeName" == "openbsd" ]]; then

echo "Installing packages into sysroot..."

# Fetch package index once
if [[ "$__hasWget" == 1 ]]; then
PKG_INDEX=$(wget -qO- "$PKG_MIRROR/")
else
PKG_INDEX=$(curl -s "$PKG_MIRROR/")
fi

for pkg in $__OpenBSDPackages; do
echo "Resolving package filename for $pkg..."
PKG_FILE=$(echo "$PKG_INDEX" | grep -Po ">\K${pkg}-[0-9][^\" ]*\.tgz" \
| sort -V | tail -n1)

echo "Resolved package filename for $pkg: $PKG_FILE"

[[ -z "$PKG_FILE" ]] && { echo "ERROR: Package $pkg not found"; exit 1; }

if [[ "$__hasWget" == 1 ]]; then
PKG_FILE=$(wget -qO- "$PKG_MIRROR/" | grep -Eo "${pkg}-[0-9][^\" ]*\.tgz" | head -n1)
[[ -z "$PKG_FILE" ]] && { echo "ERROR: Package $pkg not found"; exit 1; }
wget -O- "$PKG_MIRROR/$PKG_FILE" | tar -C "$__RootfsDir" -xzpf -
else
PKG_FILE=$(curl -s "$PKG_MIRROR/" | grep -Eo "${pkg}-[0-9][^\" ]*\.tgz" | head -n1)
[[ -z "$PKG_FILE" ]] && { echo "ERROR: Package $pkg not found"; exit 1; }
curl -SL "$PKG_MIRROR/$PKG_FILE" | tar -C "$__RootfsDir" -xzpf -
fi
done

echo "Creating versionless symlinks for shared libraries..."
# Find all versioned .so files and create the base .so symlink
for lib in "$__RootfsDir/usr/lib/libc++.so."* "$__RootfsDir/usr/lib/libc++abi.so."* "$__RootfsDir/usr/lib/libpthread.so."*; do
if [ -f "$lib" ]; then
# Extract the filename (e.g., libc++.so.12.0)
VERSIONED_NAME=$(basename "$lib")
# Remove the trailing version numbers (e.g., libc++.so)
BASE_NAME=${VERSIONED_NAME%.so.*}.so
# Create the symlink in the same directory
ln -sf "$VERSIONED_NAME" "$__RootfsDir/usr/lib/$BASE_NAME"
fi
done
elif [[ "$__CodeName" == "illumos" ]]; then
mkdir "$__RootfsDir/tmp"
pushd "$__RootfsDir/tmp"
Expand Down
2 changes: 2 additions & 0 deletions eng/common/native/init-distro-rid.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ getNonPortableDistroRid()
# $rootfsDir can be empty. freebsd-version is a shell script and should always work.
__freebsd_major_version=$("$rootfsDir"/bin/freebsd-version | cut -d'.' -f1)
nonPortableRid="freebsd.$__freebsd_major_version-${targetArch}"
elif [ "$targetOs" = "openbsd" ]; then
nonPortableRid="openbsd.$(uname -r)-${targetArch}"
elif command -v getprop >/dev/null && getprop ro.product.system.model | grep -qi android; then
__android_sdk_version=$(getprop ro.build.version.sdk)
nonPortableRid="android.$__android_sdk_version-${targetArch}"
Expand Down
3 changes: 3 additions & 0 deletions eng/common/renovate.env
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,6 @@ export RENOVATE_PR_BODY_TEMPLATE='{{{header}}}{{{table}}}{{{warnings}}}{{{notes}
# https://docs.renovatebot.com/self-hosted-configuration/#globalextends
# Disable the Dependency Dashboard issue that tracks all updates
export RENOVATE_GLOBAL_EXTENDS='[":disableDependencyDashboard"]'

# Allow all commands for post-upgrade commands.
export RENOVATE_ALLOWED_COMMANDS='[".*"]'
Loading
Loading