Skip to content

Commit 71b3b2a

Browse files
authored
Publish Microsoft.Dotnet.Insntallation library to NuGet feed (#51575)
2 parents 8bedc10 + d6fb259 commit 71b3b2a

File tree

5 files changed

+26
-21
lines changed

5 files changed

+26
-21
lines changed

.vsts-dnup-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,4 +133,4 @@ extends:
133133
pool:
134134
name: $(DncEngInternalBuildPool)
135135
image: 1es-windows-2022
136-
os: windows
136+
os: windows

.vsts-dnup-pr.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,6 @@ pr:
77
include:
88
- dnup
99
- release/dnup
10-
paths:
11-
include:
12-
- src/Installer/dnup/
13-
- test/dnup.Tests/
14-
- global.json
15-
- .vsts-dnup-tests.yml
1610

1711
parameters:
1812
- name: enableArm64Job

eng/pipelines/templates/jobs/dnup/dnup-library-package.yml

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ jobs:
3131
enableSbom: ${{ parameters.enableSbom }}
3232
variables:
3333
- ${{ insert }}: ${{ parameters.variables }}
34+
- name: _officialBuildProperties
35+
value: /p:OfficialBuilder=Microsoft /p:OfficialBuildId=$(Build.BuildNumber)
3436
dependsOn: ${{ parameters.dependsOn }}
3537
preSteps: ${{ parameters.preSteps }}
3638
templateContext:
@@ -44,17 +46,30 @@ jobs:
4446
targetPath: '$(Build.SourcesDirectory)/artifacts/packages/Release/NonShipping/'
4547
artifactName: 'dnup-library-packages'
4648
publishLocation: Container
49+
- output: pipelineArtifact
50+
displayName: '📊 Publish dnup library build binlogs'
51+
condition: always()
52+
targetPath: '$(Build.SourcesDirectory)/artifacts/binlogs/'
53+
artifactName: 'dnup-library-binlogs'
54+
publishLocation: Container
4755
steps:
4856
- ${{ if eq(parameters.pool.os, 'windows') }}:
4957
- powershell: |
50-
& .\restore.cmd
58+
& .\restore.cmd $(_officialBuildProperties)
5159
displayName: 🍱 Bootstrap toolset (Windows)
5260
- powershell: |
53-
& .\.dotnet\dotnet build test\dnup.Tests\dnup.Tests.csproj -c Release
61+
& .\.dotnet\dotnet build test\dnup.Tests\dnup.Tests.csproj -c Release -bl:$(Build.SourcesDirectory)/artifacts/binlogs/dnup-library-build.binlog $(_officialBuildProperties)
5462
displayName: 💻 Build Windows
5563
- powershell: |
56-
& .\.dotnet\dotnet pack .\src\Installer\Microsoft.Dotnet.Installation\Microsoft.Dotnet.Installation.csproj
64+
& .\.dotnet\dotnet pack .\src\Installer\Microsoft.Dotnet.Installation\Microsoft.Dotnet.Installation.csproj -bl:$(Build.SourcesDirectory)/artifacts/binlogs/dnup-library-package.binlog $(_officialBuildProperties)
5765
displayName: 📦 Package dnup library
5866
- powershell: |
59-
& .\.dotnet\dotnet build .\src\Installer\Microsoft.Dotnet.Installation\Microsoft.Dotnet.Installation.sign.proj /t:Sign
67+
& .\.dotnet\dotnet build .\src\Installer\Installer.sign.proj /t:Sign -bl:$(Build.SourcesDirectory)/artifacts/binlogs/dnup-library-sign.binlog $(_officialBuildProperties)
6068
displayName: 🖋️ Sign dnup library packages with arcade signtool
69+
- task: 1ES.PublishNuget@1
70+
displayName: 🟣 Publish packages to AzDO
71+
inputs:
72+
useDotNetTask: true
73+
packagesToPush: '$(Build.SourcesDirectory)/artifacts/packages/Release/**/*.nupkg;!$(Build.SourcesDirectory)/artifacts/packages/Release/**/*.symbols.nupkg'
74+
packageParentPath: $(Build.SourcesDirectory)/artifacts/packages/Release
75+
publishVstsFeed: public/dotnet-tools
Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<TargetFramework>net10.0</TargetFramework>
4-
<!-- Determine repository root when the pipeline variables are unavailable (e.g. local invocations). -->
5-
<_RepoRoot Condition="'$(RepoRoot)' != ''">$(RepoRoot)</_RepoRoot>
6-
<_RepoRoot Condition="'$(_RepoRoot)' == ''">$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)..\..\..\'))</_RepoRoot>
7-
84
<!-- Allow callers to override these directories; fall back to repo-relative defaults. -->
9-
<PackagesDir Condition="'$(PackagesDir)' == ''">$(_RepoRoot)artifacts\packages\Release\</PackagesDir>
10-
<IntermediateOutputPath Condition="'$(IntermediateOutputPath)' == ''">$(_RepoRoot)artifacts\obj\Sign\</IntermediateOutputPath>
11-
<LogDir Condition="'$(LogDir)' == ''">$(_RepoRoot)artifacts\log\Sign\</LogDir>
5+
<PackagesDir Condition="'$(PackagesDir)' == ''">$(RepoRoot)artifacts\packages\Release\</PackagesDir>
6+
<IntermediateOutputPath Condition="'$(IntermediateOutputPath)' == ''">$(RepoRoot)artifacts\obj\Sign\</IntermediateOutputPath>
7+
<LogDir Condition="'$(LogDir)' == ''">$(RepoRoot)artifacts\log\Sign\</LogDir>
128

139
<!-- SignTool requires explicit dotnet path; default to repo-local SDK. -->
14-
<DotNetPath Condition="'$(DotNetPath)' == ''">$(_RepoRoot).dotnet\dotnet.exe</DotNetPath>
10+
<DotNetPath Condition="'$(DotNetPath)' == ''">$(RepoRoot).dotnet\dotnet.exe</DotNetPath>
1511

1612
<MicroBuild_DoNotStrongNameSign>true</MicroBuild_DoNotStrongNameSign>
1713
<MicroBuild_SigningEnabled>true</MicroBuild_SigningEnabled>

src/Installer/Microsoft.Dotnet.Installation/Microsoft.Dotnet.Installation.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
<PackageId>Microsoft.Dotnet.Installation</PackageId>
1414
<IsShipping>false</IsShipping>
1515
<Title>.NET Installation Library</Title>
16-
<Version>1.0.0-alpha</Version>
17-
<PackageVersion Condition="'$(PackageVersion)'==''">$(Version)</PackageVersion>
16+
<VersionPrefix>0.1.0</VersionPrefix>
17+
<PreReleaseVersionLabel>preview</PreReleaseVersionLabel>
1818
</PropertyGroup>
1919

2020
<ItemGroup>

0 commit comments

Comments
 (0)