From: Mike McLaughlin Date: Sat, 23 Feb 2019 19:03:03 +0000 (-0800) Subject: Fix some official build artifacts X-Git-Tag: submit/tizen/20190813.035844~53^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=44e39cb1d0cb63e55a5075868ea2e8aa803ffdef;p=platform%2Fcore%2Fdotnet%2Fdiagnostics.git Fix some official build artifacts Break up "DropArtifacts" build variable into "DropPackages" and "DropBinaries". Pushes all packages to dotnet-core blob feed. Fix macOS test failures by making sure python 2.7.10 /usr/bin is in the path first. Add -publish to cipack.cmd so the packages are published. --- diff --git a/.vsts-dotnet.yml b/.vsts-dotnet.yml index e85cd8b01..1974e6e27 100644 --- a/.vsts-dotnet.yml +++ b/.vsts-dotnet.yml @@ -214,9 +214,14 @@ phases: demands: - agent.os -equals Windows_NT variables: - _PublishBlobFeedUrl: https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json - _SOSNETCorePath: $(Build.SourcesDirectory)/artifacts/bin/SOS.NETCore/Release/netstandard2.0/publish - _TeamName: DotNetCore + - group: DotNet-Blob-Feed + - group: DotNet-MyGet-Publish + - name: _PublishBlobFeedUrl + value: https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json + - name: _SOSNETCorePath + value: $(Build.SourcesDirectory)/artifacts/bin/SOS.NETCore/Release/netstandard2.0/publish + - name: _TeamName + value: DotNetCore steps: - task: ms-vseng.MicroBuildTasks.30666190-6959-11e5-9f96-f56098202fef.MicroBuildSigningPlugin@1 @@ -399,7 +404,7 @@ phases: /p:DotNetSignType=$(SignType) /p:DotNetPublishBlobFeedKey=$(dotnetfeed-storage-access-key-1) /p:DotNetPublishBlobFeedUrl=$(_PublishBlobFeedUrl) - /p:DotNetPublishToBlobFeed=false + /p:DotNetPublishToBlobFeed=true /p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat) /p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat) /p:OfficialBuildId=$(BUILD.BUILDNUMBER) @@ -407,40 +412,41 @@ phases: continueOnError: true condition: succeeded() + - task: PublishBuildArtifacts@1 + displayName: Publish Package Artifacts + inputs: + publishLocation: Container + pathtoPublish: '$(Build.SourcesDirectory)/artifacts/packages' + artifactName: packages + condition: succeeded() + # Optionally drop the artifacts on a share - task: PublishBuildArtifacts@1 - displayName: Drop Binaries + displayName: Drop Packages inputs: publishLocation: FilePath - pathtoPublish: '$(Build.SourcesDirectory)\artifacts\bin' - artifactName: bin + pathtoPublish: '$(Build.SourcesDirectory)/artifacts/packages' + artifactName: _packages targetPath: '$(DropRoot)\DotNetCore\$(Build.DefinitionName)\$(Build.BuildNumber)' - condition: and(succeeded(), eq(variables['DropArtifacts'], 'true')) + continueOnError: true + condition: eq(variables['DropPackages'], 'true') - task: PublishBuildArtifacts@1 - displayName: Drop Packages + displayName: Drop Binaries inputs: publishLocation: FilePath - pathtoPublish: '$(Build.SourcesDirectory)\artifacts\packages' - artifactName: packages + pathtoPublish: '$(Build.SourcesDirectory)/artifacts/bin' + artifactName: _bin targetPath: '$(DropRoot)\DotNetCore\$(Build.DefinitionName)\$(Build.BuildNumber)' - condition: and(succeeded(), eq(variables['DropArtifacts'], 'true')) - - # Optionally publish the packages to a blob feed - - - task: NuGetCommand@2 - displayName: Publish TestHelpers to MyGet dotnet-buildtools feed - inputs: - command: custom - arguments: 'push $(Build.SourcesDirectory)\artifacts\packages\Release\Shipping\Microsoft.Diagnostic.TestHelpers.*.nupkg -ApiKey $(dotnetfeed-storage-access-key-1) -Source $(_PublishBlobFeedUrl)' - condition: and(succeeded(), eq(variables['PushPackages'], 'true')) + continueOnError: true + condition: eq(variables['DropBinaries'], 'true') - task: PublishBuildArtifacts@1 - displayName: Publish Logs to VSTS + displayName: Publish Logs Artifacts inputs: - pathtoPublish: '$(Build.SourcesDirectory)/artifacts/log' publishLocation: Container + pathtoPublish: '$(Build.SourcesDirectory)/artifacts/log' artifactName: Logs_Packaging_Signing continueOnError: true condition: always() diff --git a/eng/Versions.props b/eng/Versions.props index 441e3ea30..a17e8bc06 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -3,8 +3,8 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - 1.0.1 - dev + 1.0.2 + preview3 false diff --git a/eng/build-native.sh b/eng/build-native.sh index 473915a19..cd25544e7 100755 --- a/eng/build-native.sh +++ b/eng/build-native.sh @@ -259,24 +259,6 @@ fi echo $NUGET_PACKAGES -# Resolve python-version to use -if [ "$PYTHON" == "" ] ; then - if ! PYTHON=$(command -v python2.7 || command -v python2 || command -v python) - then - echo "Unable to locate build-dependency python2.x!" 1>&2 - exit 1 - fi -fi - -# Validate python-dependency. Useful in case of explicitly set option. -if ! command -v $PYTHON > /dev/null -then - echo "Unable to locate build-dependency python2.x ($PYTHON)!" 1>&2 - exit 1 -fi - -echo $PYTHON - __RootBinDir=$__ProjectRoot/artifacts __BinDir=$__RootBinDir/bin/$__BuildOS.$__BuildArch.$__BuildType __LogDir=$__RootBinDir/log/$__BuildOS.$__BuildArch.$__BuildType @@ -451,6 +433,11 @@ if [ "$__HostOS" == "OSX" ]; then echo "Cannot find the lldb library. Try installing Xcode." exit 1 fi + + # Workaround bad python version in /usr/local/bin/python2.7 on lab machines + export PATH=/usr/bin:$PATH + which python + python --version fi # Build native components diff --git a/eng/build.yml b/eng/build.yml index 1191f4b6e..96547ee1d 100644 --- a/eng/build.yml +++ b/eng/build.yml @@ -126,14 +126,12 @@ phases: displayName: Build / Test condition: succeeded() - # Internal only build steps (until publishing artifacts in public CI is supported) - - ${{ if ne(variables['System.TeamProject'], 'public') }}: - - task: PublishBuildArtifacts@1 - displayName: Upload Artifacts - inputs: - pathtoPublish: '$(Build.SourcesDirectory)/artifacts/$(_PublishArtifacts)' - artifactName: $(_PhaseName)_$(Agent.JobName) - condition: and(succeeded(), ne(variables['_PublishArtifacts'], '')) + - task: PublishBuildArtifacts@1 + displayName: Upload Artifacts + inputs: + pathtoPublish: '$(Build.SourcesDirectory)/artifacts/$(_PublishArtifacts)' + artifactName: $(_PhaseName)_$(Agent.JobName) + condition: and(succeeded(), ne(variables['_PublishArtifacts'], '')) - task: CopyFiles@2 displayName: Gather Build Logs diff --git a/eng/cipack.cmd b/eng/cipack.cmd index a06ea3ce4..285ec878a 100644 --- a/eng/cipack.cmd +++ b/eng/cipack.cmd @@ -1,3 +1,3 @@ @echo off -powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0common\Build.ps1""" -restore -sign -pack -ci %*" +powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0common\Build.ps1""" -restore -sign -pack -publish -ci %*" exit /b %ErrorLevel% diff --git a/src/Tools/dotnet-dump/dotnet-dump.csproj b/src/Tools/dotnet-dump/dotnet-dump.csproj index 408ce5dd9..48f3711df 100644 --- a/src/Tools/dotnet-dump/dotnet-dump.csproj +++ b/src/Tools/dotnet-dump/dotnet-dump.csproj @@ -4,14 +4,15 @@ Exe netcoreapp2.1 2.1.0 - win-x64;win-x86;osx-x64 - + + + dotnet-dump Microsoft.Diagnostic.Tools.Dump Diagnostic dump collect and analyze tool diff --git a/src/Tools/dotnet-sos/dotnet-sos.csproj b/src/Tools/dotnet-sos/dotnet-sos.csproj index 0fe8a0758..cb4238a60 100644 --- a/src/Tools/dotnet-sos/dotnet-sos.csproj +++ b/src/Tools/dotnet-sos/dotnet-sos.csproj @@ -6,9 +6,12 @@ true true win-x64;win-x86;osx-x64 - + + + dotnet-sos Microsoft.Diagnostics.Tools.SOS Diagnostic SOS installer