Fix some official build artifacts
authorMike McLaughlin <mikem@microsoft.com>
Sat, 23 Feb 2019 19:03:03 +0000 (11:03 -0800)
committerMike McLaughlin <mikem@microsoft.com>
Fri, 1 Mar 2019 18:51:34 +0000 (10:51 -0800)
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.

.vsts-dotnet.yml
eng/Versions.props
eng/build-native.sh
eng/build.yml
eng/cipack.cmd
src/Tools/dotnet-dump/dotnet-dump.csproj
src/Tools/dotnet-sos/dotnet-sos.csproj

index e85cd8b011512e049895e35d24362b9592e79823..1974e6e276308b55d008305f6c5141f88c6264ee 100644 (file)
@@ -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()
index 441e3ea30203f899f9c03fc7fca31a75df7efc97..a17e8bc06e7142beef8f66588ab650d85d662892 100644 (file)
@@ -3,8 +3,8 @@
   <PropertyGroup>
     <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
 
-    <VersionPrefix>1.0.1</VersionPrefix>
-    <PreReleaseVersionLabel>dev</PreReleaseVersionLabel>
+    <VersionPrefix>1.0.2</VersionPrefix>
+    <PreReleaseVersionLabel>preview3</PreReleaseVersionLabel>
 
     <!-- Opt-out repo features -->
     <UsingToolXliff>false</UsingToolXliff>
index 473915a19a3c6d2fba6c1ab8d66482de4436169b..cd25544e7b3727ea41b9bebd3d93e4d9fafd06f4 100755 (executable)
@@ -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
index 1191f4b6e723a15ecfaef60bf6d70a92705ebc57..96547ee1d0a5eb39bbfe036d29431806415de98b 100644 (file)
@@ -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
index a06ea3ce41ca1c4efa60097b1f519c92d0df3cba..285ec878a7ff3e98701c591aee90da6fb217a25e 100644 (file)
@@ -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%
index 408ce5dd937b121501a15e16ecff5ba20d154c46..48f3711df10d9113a88fdc24f3d28d94967539ab 100644 (file)
@@ -4,14 +4,15 @@
     <OutputType>Exe</OutputType>
     <TargetFramework>netcoreapp2.1</TargetFramework>
     <RuntimeFrameworkVersion>2.1.0</RuntimeFrameworkVersion>
-    <!-- Don't pack until ship engineering is done. Currently causing the official job to fail.
     <IsPackable>true</IsPackable>
     <PackAsTool>true</PackAsTool>
-    -->
     <PackAsToolShimRuntimeIdentifiers>win-x64;win-x86;osx-x64</PackAsToolShimRuntimeIdentifiers>
-    <!-- The package version needs to be hard coded as a stable version so "dotnet tool install -g dotnet-dump" works -->
+
+    <!-- The package version needs to be hard coded as a stable version so "dotnet tool install -g dotnet-dump" works
     <Version>$(VersionPrefix)</Version>
     <PackageVersion>$(VersionPrefix)</PackageVersion>
+     -->
+
     <ToolCommandName>dotnet-dump</ToolCommandName>
     <RootNamespace>Microsoft.Diagnostic.Tools.Dump</RootNamespace>
     <Description>Diagnostic dump collect and analyze tool</Description>
index 0fe8a0758b057d117aacc97dbc58378b62423d0a..cb4238a60d49f109edad18b764590aa2db8cc757 100644 (file)
@@ -6,9 +6,12 @@
     <IsPackable>true</IsPackable>
     <PackAsTool>true</PackAsTool>
     <PackAsToolShimRuntimeIdentifiers>win-x64;win-x86;osx-x64</PackAsToolShimRuntimeIdentifiers>
-    <!-- The package version needs to be hard coded as a stable version so "dotnet tool install -g dotnet-sos" works -->
+
+    <!-- The package version needs to be hard coded as a stable version so "dotnet tool install -g dotnet-sos" works
     <Version>$(VersionPrefix)</Version>
     <PackageVersion>$(VersionPrefix)</PackageVersion>
+     -->
+
     <ToolCommandName>dotnet-sos</ToolCommandName>
     <RootNamespace>Microsoft.Diagnostics.Tools.SOS</RootNamespace>
     <Description>Diagnostic SOS installer</Description>