Skip to content

Commit 41891aa

Browse files
authored
save and publish log from package publishing step (#6141)
save and publish log from package publishing step
1 parent 12e4d2a commit 41891aa

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+4793
-24
lines changed

.gitignore

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
# output location
22
artifacts/
33

4-
/tests/scripts/current
4+
packages/
55

6-
# auto-generated during the build
7-
global.json
6+
/tests/scripts/current
87

98
# Patches that may have been generated by scripts.
109
# (These aren't generally useful to commit directly; if anything, they should be applied.)

.vsts-signed.yaml

Lines changed: 49 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
1+
variables:
2+
- name: PB_PublishBlobFeedUrl
3+
value: https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json
4+
- group: DotNet-Blob-Feed
5+
- name: PB_PublishBlobFeedKey
6+
value: $(dotnetfeed-storage-access-key-1)
7+
18
jobs:
29
- job: Full_Signed
310
pool:
411
name: VSEng-MicroBuildVS2017
512
timeoutInMinutes: 300
613
variables:
7-
MSBuildConfiguration: 'Release'
14+
BuildConfiguration: 'Release'
815
steps:
916
# Install Signing Plugin
1017
- task: ms-vseng.MicroBuildTasks.30666190-6959-11e5-9f96-f56098202fef.MicroBuildSigningPlugin@1
@@ -29,15 +36,44 @@ jobs:
2936
displayName: Publish nightly package to MyGet
3037
inputs:
3138
scriptName: 'setup\publish-assets.ps1'
32-
arguments: '-binariesPath artifacts\bin -configuration $(MSBuildConfiguration) -branchName $(Build.SourceBranch) -apiKey $(FSharp.MyGetApiKey)'
39+
arguments: '-binariesPath artifacts\bin -configuration $(BuildConfiguration) -branchName $(Build.SourceBranch) -apiKey $(FSharp.MyGetApiKey)'
3340
condition: and(succeeded(), contains(variables['PB_PublishType'], 'myget'))
3441

35-
# Publish packages to Azure Blob Storage
42+
# Package publish
43+
- task: CmdLine@1
44+
displayName: Restore package publishing
45+
inputs:
46+
filename: '.nuget\NuGet.exe'
47+
arguments: 'restore packages.config -PackagesDirectory packages -Source https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json'
48+
condition: and(succeeded(), contains(variables['PB_PublishType'], 'blob'))
3649
- task: MSBuild@1
3750
displayName: Publish packages to Azure Blob Storage
3851
inputs:
3952
solution: PublishToBlob.proj
40-
msbuildArguments: '/t:Build /p:ExpectedFeedUrl=$(PB_PublishBlobFeedUrl) /p:AccountKey=$(PB_PublishBlobFeedKey) /p:ManifestBranch=$(SourceBranch) /p:ManifestCommit=$(SourceVersion) /p:ManifestBuildId=$(OfficialBuildId)'
53+
msbuildArguments: '/t:Build /p:Configuration=$(BuildConfiguration) /p:ExpectedFeedUrl=$(PB_PublishBlobFeedUrl) /p:AccountKey=$(PB_PublishBlobFeedKey) /p:ManifestRepouri=$(Build.Repository.Uri) /p:ManifestBranch=$(Build.SourceBranch) /p:ManifestCommit=$(Build.SourceVersion) /p:ManifestBuildId=$(Build.BuildNumber) /bl:$(Build.SourcesDirectory)/artifacts/log/$(BuildConfiguration)/pub/publish.binlog'
54+
condition: and(succeeded(), contains(variables['PB_PublishType'], 'blob'))
55+
- task: PublishBuildArtifacts@1
56+
displayName: Publish publishing bin log
57+
inputs:
58+
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/log/$(BuildConfiguration)/pub'
59+
ArtifactName: 'Publish_bin_log'
60+
publishLocation: Container
61+
continueOnError: true
62+
condition: and(succeeded(), contains(variables['PB_PublishType'], 'blob'))
63+
- task: CopyFiles@2
64+
displayName: Gather Asset Manifests
65+
inputs:
66+
SourceFolder: '$(Build.SourcesDirectory)/artifacts/log/$(BuildConfiguration)/AssetManifest'
67+
TargetFolder: '$(Build.StagingDirectory)/AssetManifests'
68+
continueOnError: true
69+
condition: and(succeeded(), contains(variables['PB_PublishType'], 'blob'))
70+
- task: PublishBuildArtifacts@1
71+
displayName: Push Asset Manifests
72+
inputs:
73+
PathtoPublish: '$(Build.StagingDirectory)/AssetManifests'
74+
PublishLocation: Container
75+
ArtifactName: AssetManifests
76+
continueOnError: true
4177
condition: and(succeeded(), contains(variables['PB_PublishType'], 'blob'))
4278

4379
# Create static drop
@@ -69,7 +105,7 @@ jobs:
69105
- task: ms-vseng.MicroBuildTasks.4305a8de-ba66-4d8b-b2d1-0dc4ecbbf5e8.MicroBuildUploadVstsDropFolder@1
70106
displayName: Upload VSTS Drop
71107
inputs:
72-
DropFolder: '$(Build.SourcesDirectory)\artifacts\VSSetup\$(MSBuildConfiguration)\Insertion'
108+
DropFolder: '$(Build.SourcesDirectory)\artifacts\VSSetup\$(BuildConfiguration)\Insertion'
73109
condition: and(succeeded(), contains(variables['PB_PublishType'], 'vsts'))
74110

75111
# Execute cleanup tasks
@@ -94,3 +130,11 @@ jobs:
94130
sourcePath: '$(DropRoot)\$(Build.DefinitionName)\$(Build.SourceBranchName)\$(Build.BuildNumber)\SymStore'
95131
usePat: false
96132
condition: and(succeeded(), contains(variables['PB_PublishType'], 'symweb'))
133+
134+
- template: /eng/common/templates/job/publish-build-assets.yml
135+
parameters:
136+
dependsOn:
137+
- Full_Signed
138+
pool:
139+
vmImage: vs2017-win2016
140+
enablePublishBuildArtifacts: true

Makefile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@ all: proto restore build test
88
tools:
99
$(CURDIR)/scripts/dotnet-install.sh --version $(DotNetVersion) --install-dir "$(DotNetToolPath)"
1010

11-
global.json: tools
12-
echo { \"sdk\": { \"version\": \"$(DotNetVersion)\" } }>global.json
13-
14-
proto: global.json
11+
proto: tools
1512
$(DotNetExe) build-server shutdown
1613
$(DotNetExe) restore src/buildtools/buildtools.proj
1714
$(DotNetExe) restore src/fsharp/FSharp.Build/FSharp.Build.fsproj
@@ -20,7 +17,7 @@ proto: global.json
2017
$(DotNetExe) build src/fsharp/FSharp.Build/FSharp.Build.fsproj -f netstandard2.0 -c Proto
2118
$(DotNetExe) build src/fsharp/fsc/fsc.fsproj -f netcoreapp2.1 -c Proto
2219

23-
restore: global.json
20+
restore:
2421
$(DotNetExe) restore src/fsharp/FSharp.Core/FSharp.Core.fsproj
2522
$(DotNetExe) restore src/fsharp/FSharp.Build/FSharp.Build.fsproj
2623
$(DotNetExe) restore src/fsharp/FSharp.Compiler.Private/FSharp.Compiler.Private.fsproj

NuGet.Config

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,13 @@
33
<solution>
44
<add key="disableSourceControlIntegration" value="true" />
55
</solution>
6+
<!-- Only specify feed for Arcade SDK (see https://github.com/Microsoft/msbuild/issues/2982) -->
7+
<packageSources>
8+
<clear />
9+
<add key="dotnet-core" value="https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json" />
10+
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
11+
</packageSources>
12+
<disabledPackageSources>
13+
<clear />
14+
</disabledPackageSources>
615
</configuration>

PublishToBlob.proj

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,33 @@
1010
<PropertyGroup>
1111
<FeedTasksPackage>Microsoft.DotNet.Build.Tasks.Feed</FeedTasksPackage>
1212
<!-- This version should be kept in sync with `packages.config` -->
13-
<FeedTasksPackageVersion>2.1.0-prerelease-02419-02</FeedTasksPackageVersion>
13+
<FeedTasksPackageVersion>2.2.0-beta.19066.1</FeedTasksPackageVersion>
1414
</PropertyGroup>
1515

1616
<Import Project="$(MSBuildThisFileDirectory)packages\$(FeedTasksPackage).$(FeedTasksPackageVersion)\build\$(FeedTasksPackage).targets" />
1717

1818
<ItemGroup>
19-
<!-- this should pick up both *.nupkg and *.symbols.nupkg -->
20-
<NuGetPackages Include="$(MSBuildThisFileDirectory)\artifacts\packages\$(Configuration)\Microsoft.FSharp.Compiler.*.nupkg" />
19+
<!-- the string '-rtm-' is important, because that's the package with a per-build unique version number -->
20+
<NuGetPackages Include="$(MSBuildThisFileDirectory)artifacts\packages\$(Configuration)\Microsoft.FSharp.Compiler.*-rtm-*.nupkg" />
2121
</ItemGroup>
2222

23+
<PropertyGroup>
24+
<ArtifactsLogDir>$(MSBuildThisFileDirectory)artifacts\log\$(Configuration)\</ArtifactsLogDir>
25+
<Platform Condition="'$(Platform)' == ''">AnyCPU</Platform>
26+
<PlatformName Condition="'$(PlatformName)' == ''">$(Platform)</PlatformName>
27+
<AssetManifestFilePath>$(ArtifactsLogDir)AssetManifest\$(OS)-$(PlatformName).xml</AssetManifestFilePath>
28+
</PropertyGroup>
29+
2330
<Target Name="Build">
2431
<PushToBlobFeed ExpectedFeedUrl="$(ExpectedFeedUrl)"
2532
AccountKey="$(AccountKey)"
2633
ItemsToPush="@(NuGetPackages)"
27-
Overwrite="$(PublishOverwrite)"
34+
ManifestBuildData="Location=$(ExpectedFeedUrl)"
35+
ManifestRepoUri="$(ManifestRepoUri)"
2836
ManifestBranch="$(ManifestBranch)"
2937
ManifestBuildId="$(ManifestBuildId)"
3038
ManifestCommit="$(ManifestCommit)"
31-
ManifestName="fsharp"
32-
SkipCreateManifest="false" />
39+
AssetManifestPath="$(AssetManifestFilePath)" />
3340
</Target>
3441

3542
</Project>

build.cmd

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -613,10 +613,6 @@ if not exist %_ngenexe% echo Error: Could not find ngen.exe. && goto :failure
613613

614614
echo ---------------- Done with prepare, starting package restore ----------------
615615

616-
:: create a global.json
617-
set /p DOTNET_TOOLS_VERSION=<"%~dp0DotnetCLIToolsVersion.txt"
618-
echo { "sdk": { "version": "%DOTNET_TOOLS_VERSION%" } }>global.json
619-
620616
:: Restore the Tools directory
621617
call "%~dp0init-tools.cmd"
622618
set _dotnetexe=%~dp0artifacts\toolset\dotnet\dotnet.exe

eng/common/CIBuild.cmd

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
@echo off
2+
powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0Build.ps1""" -restore -build -test -sign -pack -publish -ci %*"

eng/common/PublishBuildAssets.cmd

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
@echo off
2+
powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0sdk-task.ps1""" -msbuildEngine dotnet -restore -projects PublishBuildAssets.proj -ci %*"
3+
exit /b %ErrorLevel%

eng/common/PublishToPackageFeed.proj

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<!--
2+
This MSBuild file is intended to be used as the body of the default
3+
publishing release pipeline. The release pipeline will use this file
4+
to invoke the PushToStaticFeed task that will read the build asset
5+
manifest and publish the assets described in the manifest to
6+
informed target feeds.
7+
-->
8+
<Project Sdk="Microsoft.NET.Sdk">
9+
<PropertyGroup>
10+
<TargetFramework>netcoreapp2.1</TargetFramework>
11+
</PropertyGroup>
12+
13+
<Import Project="$(MSBuildThisFileDirectory)MicrosoftDotNetBuildTasksFeedVersion.props" />
14+
<Import Project="$(NuGetPackageRoot)microsoft.dotnet.build.tasks.feed\$(MicrosoftDotNetBuildTasksFeedVersion)\build\Microsoft.DotNet.Build.Tasks.Feed.targets" />
15+
16+
<Target Name="PublishToFeed">
17+
<Error Condition="'$(TargetStaticFeed)' == ''" Text="TargetStaticFeed: Target feed for publishing assets wasn't provided." />
18+
<Error Condition="'$(AccountKeyToStaticFeed)' == ''" Text="AccountKeyToStaticFeed: Account key for target feed wasn't provided." />
19+
<Error Condition="'$(FullPathAssetManifest)' == ''" Text="Full path to asset manifest wasn't provided." />
20+
<Error Condition="'$(FullPathBlobBasePath)' == '' AND '$(FullPathPackageBasePath)' == ''" Text="A valid full path to BlobBasePath of PackageBasePath is required." />
21+
22+
<PushArtifactsInManifestToFeed
23+
ExpectedFeedUrl="$(TargetStaticFeed)"
24+
AccountKey="$(AccountKeyToStaticFeed)"
25+
Overwrite="$(OverrideAssetsWithSameName)"
26+
PassIfExistingItemIdentical="$(PassIfExistingItemIdentical)"
27+
MaxClients="$(MaxParallelUploads)"
28+
UploadTimeoutInMinutes="$(MaxUploadTimeoutInMinutes)"
29+
AssetManifestPath="$(FullPathAssetManifest)"
30+
BlobAssetsBasePath="$(FullPathBlobBasePath)"
31+
PackageAssetsBasePath="$(FullPathPackageBasePath)" />
32+
</Target>
33+
34+
<ItemGroup>
35+
<PackageReference Include="Microsoft.DotNet.Build.Tasks.Feed" Version="$(MicrosoftDotNetBuildTasksFeedVersion)" />
36+
</ItemGroup>
37+
</Project>

eng/common/README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Don't touch this folder
2+
3+
uuuuuuuuuuuuuuuuuuuu
4+
u" uuuuuuuuuuuuuuuuuu "u
5+
u" u$$$$$$$$$$$$$$$$$$$$u "u
6+
u" u$$$$$$$$$$$$$$$$$$$$$$$$u "u
7+
u" u$$$$$$$$$$$$$$$$$$$$$$$$$$$$u "u
8+
u" u$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$u "u
9+
u" u$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$u "u
10+
$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $
11+
$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $
12+
$ $$$" ... "$... ...$" ... "$$$ ... "$$$ $
13+
$ $$$u `"$$$$$$$ $$$ $$$$$ $$ $$$ $$$ $
14+
$ $$$$$$uu "$$$$ $$$ $$$$$ $$ """ u$$$ $
15+
$ $$$""$$$ $$$$ $$$u "$$$" u$$ $$$$$$$$ $
16+
$ $$$$....,$$$$$..$$$$$....,$$$$..$$$$$$$$ $
17+
$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $
18+
"u "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$" u"
19+
"u "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$" u"
20+
"u "$$$$$$$$$$$$$$$$$$$$$$$$$$$$" u"
21+
"u "$$$$$$$$$$$$$$$$$$$$$$$$" u"
22+
"u "$$$$$$$$$$$$$$$$$$$$" u"
23+
"u """""""""""""""""" u"
24+
""""""""""""""""""""
25+
26+
!!! Changes made in this directory are subject to being overwritten by automation !!!
27+
28+
The files in this directory are shared by all Arcade repos and managed by automation. If you need to make changes to these files, open an issue or submit a pull request to https://github.com/dotnet/arcade first.

0 commit comments

Comments
 (0)