Skip to content

Update release build images #600

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 27, 2022
Merged
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 .ci/ci_auto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ stages:
pool:
name: 1ES
demands:
- ImageOverride -equals MMS2019
- ImageOverride -equals PSMMS2019-Secure

steps:

Expand Down Expand Up @@ -275,7 +275,7 @@ stages:
pool:
name: 1ES
demands:
- ImageOverride -equals MMS2019
- ImageOverride -equals PSMMS2019-Secure

steps:
- checkout: self
Expand Down
4 changes: 2 additions & 2 deletions .ci/ci_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ stages:
pool:
name: 1ES
demands:
- ImageOverride -equals MMS2019
- ImageOverride -equals PSMMS2019-Secure

steps:

Expand Down Expand Up @@ -281,7 +281,7 @@ stages:
pool:
name: 1ES
demands:
- ImageOverride -equals MMS2019
- ImageOverride -equals PSMMS2019-Secure

steps:
- checkout: self
Expand Down
2 changes: 1 addition & 1 deletion .ci/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
pool:
name: 1ES
demands:
- ImageOverride -equals MMS2019
- ImageOverride -equals PSMMS2019-Secure
displayName: ${{ parameters.displayName }}

steps:
Expand Down
20 changes: 19 additions & 1 deletion doBuild.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,28 @@ function DoBuild
# Build code and place it in the staging location
Push-Location "${SrcPath}/code"
try {
# Get dotnet.exe command path.
$dotnetCommand = Get-Command -Name 'dotnet' -ErrorAction Ignore

# Check for dotnet for Windows (we only build on Windows platforms).
if ($null -eq $dotnetCommand) {
Write-Verbose -Verbose -Message "dotnet.exe cannot be found in current path. Looking in ProgramFiles path."
$dotnetCommandPath = Join-Path -Path $env:ProgramFiles -ChildPath "dotnet\dotnet.exe"
$dotnetCommand = Get-Command -Name $dotnetCommandPath -ErrorAction Ignore
if ($null -eq $dotnetCommand) {
throw "Dotnet.exe cannot be found: $dotnetCommandPath is unavailable for build."
}
}

Write-Verbose -Verbose -Message "dotnet.exe command found in path: $($dotnetCommand.Path)"

# Check dotnet version
Write-Verbose -Verbose -Message "DotNet version: $(& ($dotnetCommand) --version)"

# Build source
Write-Verbose -Verbose -Message "Building with configuration: $BuildConfiguration, framework: $BuildFramework"
Write-Verbose -Verbose -Message "Build location: PSScriptRoot: $PSScriptRoot, PWD: $pwd"
dotnet publish --configuration $BuildConfiguration --framework $BuildFramework --output $BuildSrcPath -warnaserror
& ($dotnetCommand) publish --configuration $BuildConfiguration --framework $BuildFramework --output $BuildSrcPath -warnaserror
if ($LASTEXITCODE -ne 0) {
throw "Build failed with exit code: $LASTEXITCODE"
}
Expand Down