Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 2708b19

Browse files
committedSep 2, 2019
Use stages pipeline
- #11924 - change ci.yml to use stages and post-build.yml - add use of publish-build-assets.yml and post-build.yml - publish in last build step of each job - pass more MSBuild properties into builds - use distinct `$(AssetManifestFileName)` values per job - set global property to override what's hard-coded in Publish.proj - change codesign-xplat.yml to use empty.proj and normal Arcade signing and publication process - remove XPlatPackageSigner.proj - change default-build.yml to use job.yml - remove unused parameters e.g. `matrix`, `poolName`, `variables` - use `enableMicrobuild` and `enablePublishTestResults` to eliminate duplicate build steps - add .dll's and .exe's as files to sign w/ Microsoft400 - add signcheck exclusions - remove custom manifest generation i.e. the `GenerateBuildAssetManifest` target and related artifacts - use regular Arcade publish infrastructure - update docker infrastructure to use same paths in and out of the container - correct typo in build.sh nits: - upload logs in first artifact - remove attempts to package non-existent VSIX - follow-up to 29cf7ec - respect verbosity setting in build.sh - add more information to Artifacts.md - enable test signing in internal PRs
1 parent fe1c4c6 commit 2708b19

17 files changed

+804
-804
lines changed
 

Diff for: ‎.azure/pipelines/ci.yml

+553-489
Large diffs are not rendered by default.

Diff for: ‎.azure/pipelines/jobs/codesign-xplat.yml

+29-6
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,41 @@ jobs:
1414
agentOs: Windows
1515
installNodeJs: false
1616
installJdk: false
17+
variables:
18+
- DOTNET_HOME: $(Build.SourcesDirectory)/.dotnet
1719
steps:
1820
- task: DownloadBuildArtifacts@0
1921
displayName: Download ${{ parameters.inputName }} artifacts
2022
inputs:
2123
artifactName: ${{ parameters.inputName }}_Packages
22-
downloadPath: $(Build.StagingDirectory)/deps/
24+
downloadPath: $(Build.StagingDirectory)/downloaded_packages/
2325
itemPattern: '**/*.nupkg'
24-
- task: MSBuild@1
25-
displayName: Code-sign .nupkg files
26+
- task: CopyFiles@2
27+
displayName: Copy packages to ArtifactsShippingPackagesDir
2628
inputs:
27-
solution: eng\tools\XplatPackageSigner\XplatPackageSigner.proj
28-
msbuildArguments: /p:SignType=$(_SignType) /p:DirectoryToSign=$(Build.StagingDirectory)\deps\${{ parameters.inputName }}_Packages\
29+
sourceFolder: $(Build.StagingDirectory)/downloaded_packages/
30+
contents: '**/*.nupkg'
31+
targetFolder: $(Build.SourcesDirectory)/artifacts/packages/$(BuildConfiguration)/shipping/
32+
flattenFolders: true
33+
- powershell: . ./activate.ps1
34+
displayName: Activate
35+
- script: restore.cmd -ci
36+
displayName: Restore tools
37+
- powershell: .\eng\common\build.ps1
38+
-ci
39+
-restore
40+
-sign
41+
-publish
42+
-configuration $(BuildConfiguration)
43+
-projects $(Build.SourcesDirectory)/eng/empty.proj
44+
/p:AssetManifestFileName=aspnetcore-${{ parameters.inputName }}-signed.xml
45+
/p:DotNetSignType=$(_SignType)
46+
$(_BuildArgs)
47+
$(_PublishArgs)
48+
displayName: Sign and publish packages
2949
artifacts:
3050
- name: ${{ parameters.inputName }}_Packages_Signed
31-
path: $(Build.StagingDirectory)\deps\${{ parameters.inputName }}_Packages\
51+
path: artifacts/packages/
52+
- name: CodeSign_Xplat_${{ parameters.inputName }}_Logs
53+
path: artifacts/log/
54+
publishOnError: true

Diff for: ‎.azure/pipelines/jobs/default-build.yml

+159-191
Large diffs are not rendered by default.

Diff for: ‎build.sh

+5-1
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ if [ "$build_deps" = false ]; then
221221
msbuild_args[${#msbuild_args[*]}]="-p:BuildProjectReferences=false"
222222
fi
223223

224-
if [ "$build_managed" = true ] || (["$build_all" = true ] && [ "$build_managed" != false ]); then
224+
if [ "$build_managed" = true ] || ([ "$build_all" = true ] && [ "$build_managed" != false ]); then
225225
if [ -z "$build_nodejs" ]; then
226226
if [ -x "$(command -v node)" ]; then
227227
__warn "Building of C# project is enabled and has dependencies on NodeJS projects. Building of NodeJS projects is enabled since node is detected on PATH."
@@ -266,6 +266,10 @@ if [ -z "$configuration" ]; then
266266
fi
267267
msbuild_args[${#msbuild_args[*]}]="-p:Configuration=$configuration"
268268

269+
# Set verbosity
270+
echo "Setting msbuild verbosity to $verbosity"
271+
msbuild_args[${#msbuild_args[*]}]="-verbosity:$verbosity"
272+
269273
# Initialize global variables need to be set before the import of Arcade is imported
270274
restore=$run_restore
271275

Diff for: ‎dockerbuild.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ docker build "$(dirname "$dockerfile")" \
124124
--build-arg "USER=$(whoami)" \
125125
--build-arg "USER_ID=$(id -u)" \
126126
--build-arg "GROUP_ID=$(id -g)" \
127+
--build-arg "WORKDIR=$DIR" \
127128
--tag $tagname \
128129
-f "$dockerfile"
129130

@@ -138,7 +139,7 @@ docker run \
138139
-e BUILD_SOURCEBRANCH \
139140
-e DOTNET_CLI_TELEMETRY_OPTOUT \
140141
-e Configuration \
141-
-v "$DIR:/code/build" \
142+
-v "$DIR:$DIR" \
142143
${docker_args[@]+"${docker_args[@]}"} \
143144
$tagname \
144145
./build.sh \

Diff for: ‎docs/Artifacts.md

+24-10
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,36 @@ Artifacts
33

44
Building this repo produces build artifacts in the directory structure described below. Build outputs are organized into logical groups based on artifact type and the intended usage of the artifacts.
55

6+
See also https://github.com/dotnet/arcade/blob/master/Documentation/ArcadeSdk.md This repo follows _most_ of the conventions described there.
7+
68
```
79
artifacts/
810
installers/
911
$(Configuration)/
10-
*.msi = Windows installers
11-
*.deb, *.rpm = Linux installers
12-
*.zip, *.tar.gz = archives versions of installers
12+
*.msi = Windows installers
13+
*.deb, *.rpm = Linux installers
14+
*.zip, *.tar.gz = archives versions of installers
15+
log/
16+
runningProcesses*.txt = Process list from just before build completed
17+
runningProcesses*.bak = Process list from two minutes before runningProcesses*.txt files were written
18+
*.binlog = Binary logs for a few build phases e.g. site extension build
19+
**/
20+
*.log = Log files for test runs and individual tests
21+
$(Configuration)/
22+
*.binlog = Binary logs for most build phases
1323
packages/
1424
$(Configuration)/
15-
Shipping/ = Packages which are intended for use by customers. These, along with installers, represent the 'product'.
16-
*.nupkg = NuGet packages which ship to nuget.org
17-
*.jar = Java packages which ship to Maven Central and others
18-
*.tgz = NPM packages which ship to npmjs.org
19-
NonShipping/
20-
*.nupkg = NuGet packages for internal use only. Used to hand off bits to Microsoft partner teams. Not intended for use by customers.
25+
Shipping/ = Packages which are intended for use by customers. These, along with installers, represent the 'product'.
26+
*.nupkg = NuGet packages which ship to nuget.org
27+
*.jar = Java packages which ship to Maven Central and others
28+
*.tgz = NPM packages which ship to npmjs.org
29+
NonShipping/
30+
*.nupkg = NuGet packages for internal use only. Used to hand off bits to Microsoft partner teams. Not intended for use by customers.
31+
symbols/
32+
$(Configuration)/
33+
$(TargetFramework)/
34+
*.pdb = Loose symbol files for symbol server publication. Special cases where *.symbols.nupkg packaging is cumbersome.
2135
VSSetup/
2236
$(Configuration)/
23-
*.vsix = Visual Studio extensions
37+
*.vsix = Visual Studio extensions. None currently exist.
2438
```

Diff for: ‎eng/AfterSolutionBuild.targets

-11
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,4 @@
1717
SharedFrameworkTargetFramework="netcoreapp$(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion)" />
1818
</Target>
1919

20-
<Target Name="GenerateBuildAssetManifest" AfterTargets="Pack" Condition="'$(ContinuousIntegrationBuild)' == 'true' and '$(DotNetBuildFromSource)' != 'true'">
21-
<!-- Generate build manifests. These manifests are used by Maestro and the Build Asset Registry to flow dependencies to other repos. -->
22-
<MSBuild Projects="$(MSBuildThisFileDirectory)tools\Maestro\Maestro.csproj"
23-
Targets="Restore"
24-
Properties="__DummyTarget=Restore" />
25-
26-
<MSBuild Projects="$(MSBuildThisFileDirectory)tools\Maestro\Maestro.csproj"
27-
Targets="GenerateBuildAssetManifest"
28-
Properties="__DummyTarget=GenerateBuildAssetManifest" />
29-
</Target>
30-
3120
</Project>

Diff for: ‎eng/Publishing.props

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<Project>
2+
<!-- The one use of ArtifactsDir in Publish.proj adds an additional slash, confusing itself. -->
3+
<PropertyGroup Condition=" HasTrailingSlash('$(ArtifactsDir)') ">
4+
<ArtifactsDir>$(ArtifactsDir.Substring(0, $([MSBuild]::Subtract($(ArtifactsDir.Length), 1))))</ArtifactsDir>
5+
</PropertyGroup>
6+
7+
<!-- Include our "loose" PDBs when publishing. -->
8+
<ItemGroup>
9+
<FilesToPublishToSymbolServer Include="$(SymbolsOutputPath)**\*.pdb" />
10+
</ItemGroup>
11+
</Project>

Diff for: ‎eng/Signing.props

+8
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
-->
2222
<FileExtensionSignInfo Include=".jar" CertificateName="MicrosoftJARSHA2" />
2323
<FileExtensionSignInfo Include=".ps1;.psd1;.psm1;.psc1" CertificateName="Microsoft400" />
24+
<FileExtensionSignInfo Include=".dll;.exe" CertificateName="Microsoft400" />
2425
<FileExtensionSignInfo Include=".nupkg" CertificateName="NuGet" />
2526
<FileExtensionSignInfo Include=".vsix" CertificateName="VsixSHA2" />
2627
<FileExtensionSignInfo Include=".zip" CertificateName="None" />
@@ -84,6 +85,13 @@
8485
<!-- Exclude the apphost because this is expected to be code-signed by customers after the SDK modifies it. -->
8586
<FileSignInfo Include="apphost.exe" CertificateName="None" />
8687

88+
<SignValidationExclusionList Include="**/*.js" />
89+
<SignValidationExclusionList Include="**/*.otf" />
90+
<SignValidationExclusionList Include="**/*.ttf" />
91+
<SignValidationExclusionList Include="**/ancm.mof" />
92+
<SignValidationExclusionList Include="**/apphost.exe" />
93+
<SignValidationExclusionList Include="**/wix*" />
94+
8795
<!--
8896
These files should already be signed by the .NET Core team. They have to be listed again here because we recreate a redistributable which includes the Microsoft.NETCore.App runtime.
8997
List all combinations of Windows RID's because CI may build multiple combinations of artitectures on the same machine.

Diff for: ‎eng/docker/alpine.Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ FROM microsoft/dotnet:2.1.0-preview1-runtime-deps-alpine
22
ARG USER
33
ARG USER_ID
44
ARG GROUP_ID
5+
ARG WORKDIR
56

6-
WORKDIR /code/build
7+
WORKDIR ${WORKDIR}
78
RUN mkdir -p "/home/$USER" && chown "${USER_ID}:${GROUP_ID}" "/home/$USER"
89
ENV HOME "/home/$USER"
910

Diff for: ‎eng/docker/bionic.Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ FROM microsoft/dotnet:2.1-runtime-deps-bionic
33
ARG USER
44
ARG USER_ID
55
ARG GROUP_ID
6+
ARG WORKDIR
67

7-
WORKDIR /code/build
8+
WORKDIR ${WORKDIR}
89
RUN mkdir -p "/home/$USER" && chown "${USER_ID}:${GROUP_ID}" "/home/$USER"
910
ENV HOME "/home/$USER"
1011

Diff for: ‎eng/docker/rhel.Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ FROM mcr.microsoft.com/dotnet-buildtools/prereqs:rhel-7-rpmpkg-e1b4a89-201753110
55
ARG USER
66
ARG USER_ID
77
ARG GROUP_ID
8+
ARG WORKDIR
89

9-
WORKDIR /code/build
10+
WORKDIR ${WORKDIR}
1011

1112
RUN useradd -m ${USER} --uid ${USER_ID} -g root
1213
RUN echo '${USER} ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers

Diff for: ‎eng/docker/ubuntu-alpine37.Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ FROM mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-cross-arm64-alpine
22
ARG USER
33
ARG USER_ID
44
ARG GROUP_ID
5+
ARG WORKDIR
56

6-
WORKDIR /code/build
7+
WORKDIR ${WORKDIR}
78
RUN mkdir -p "/home/$USER" && chown "${USER_ID}:${GROUP_ID}" "/home/$USER"
89
ENV HOME "/home/$USER"
910

Diff for: ‎eng/empty.proj

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<!-- eng\common\build.ps1 fails without a project to build, so we give it this empty project to satisfy its desires -->
2+
<Project>
3+
<Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" />
4+
<Import Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" />
5+
</Project>

Diff for: ‎eng/tools/Maestro/Maestro.csproj

-38
This file was deleted.

Diff for: ‎eng/tools/XplatPackageSigner/XplatPackageSigner.proj

-38
This file was deleted.

Diff for: ‎eng/tools/XplatPackageSigner/sign-packages.cmd

-15
This file was deleted.

0 commit comments

Comments
 (0)