Engineering System Cleanup (#2220)
authorJuan Hoyos <juan.hoyos@microsoft.com>
Fri, 30 Apr 2021 19:16:26 +0000 (12:16 -0700)
committerGitHub <noreply@github.com>
Fri, 30 Apr 2021 19:16:26 +0000 (12:16 -0700)
* Remove Signature of ParallelStacks.Runtime; package no longer used.
* Change download logic
* Remove testing flag from base scripts
* Remove ciTest wrapper script
* Remove docker container nesting and unify build invocation
* Temporarily disable 5.0 tests
* Update Windows and Ubuntu queues.
* Add back docker-build; Add SYS_PTRACE instead of privileged
* Verify Docker
* Disable DSO test on desktop

diagnostics.yml
eng/CIBuild.cmd
eng/Signing.props
eng/build.yml
eng/cibuild.sh
eng/citest.sh [deleted file]
eng/docker-build.sh
eng/docker-cleanup.sh [deleted file]
src/SOS/SOS.UnitTests/ConfigFiles/Unix/Debugger.Tests.Config.txt
src/SOS/SOS.UnitTests/Scripts/StackAndOtherTests.script

index cbd311234eb3a9b811930685e9cbdc288f125874..fdcf2456b89650a15797f90f4db48406c1d65908 100644 (file)
@@ -131,6 +131,7 @@ stages:
         name: Alpine3_6
         osGroup: Linux
         dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.6-WithNode-f4d3fe3-20181220200247
+        artifactsTargetPath: bin/Linux-musl.x64.Release
         strategy:
           matrix:
             Build_Release:
@@ -161,6 +162,7 @@ stages:
       parameters:
         name: MacOS_cross
         osGroup: MacOS_cross
+        buildAndSkipTest: true
         strategy:
           matrix:
             Build_Release:
@@ -179,10 +181,10 @@ stages:
           osGroup: Linux
           dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-14.04-cross-1735d26-20190521133857
           crossrootfsDir: '/crossrootfs/arm'
+          buildAndSkipTest: true
           strategy:
             matrix:
               Build_Release:
-                _BuildOnly: true
                 _BuildConfig: Release
                 _BuildArch: arm
                 _PublishArtifacts: bin/Linux.arm.Release
@@ -193,10 +195,10 @@ stages:
           osGroup: Linux
           dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-cross-arm64-a3ae44b-20180315221921
           crossrootfsDir: '/crossrootfs/arm64'
+          buildAndSkipTest: true
           strategy:
             matrix:
               Build_Release:
-                _BuildOnly: true
                 _BuildConfig: Release
                 _BuildArch: arm64
                 _PublishArtifacts: bin/Linux.arm64.Release
@@ -207,10 +209,11 @@ stages:
           osGroup: Linux
           dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-cross-arm64-alpine-406629a-20200127195039
           crossrootfsDir: '/crossrootfs/arm64'
+          artifactsTargetPath: bin/Linux-musl.arm64.Release
+          buildAndSkipTest: true
           strategy:
             matrix:
               Build_Release:
-                _BuildOnly: true
                 _BuildConfig: Release
                 _BuildArch: arm64
                 _PublishArtifacts: bin/Linux.arm64.Release
@@ -242,6 +245,7 @@ stages:
           dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-28-09ca40b-20190508143249
           dependsOn: CentOS_7
           testOnly: true
+          requiresCapPtraceContainer: true
           strategy:
             matrix:
               Build_Debug:
@@ -255,6 +259,7 @@ stages:
           dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-29-09ca40b-20190508143249
           dependsOn: CentOS_7
           testOnly: true
+          requiresCapPtraceContainer: true
           strategy:
             matrix:
               Build_Debug:
@@ -314,7 +319,6 @@ stages:
                 _BuildArch: x64
 
       # Download, sign, package and publish
-
       - ${{ if notin(variables['Build.Reason'], 'PullRequest') }}:
         - template: /eng/common/templates/job/job.yml
           parameters:
@@ -332,7 +336,7 @@ stages:
             condition: succeeded()
             pool:
               name: NetCoreInternal-Pool
-              queue: BuildPool.Windows.10.Amd64.VS2017
+              queue: BuildPool.Windows.10.Amd64.VS2019
             enablePublishUsingPipelines: true
             enableMicrobuild: true
             artifacts:
@@ -340,106 +344,19 @@ stages:
                 logs:
                   name: Logs_Packaging_Signing
             steps:
-
-            # Windows x64 download. Everything under "bin" is published for the Windows x64 build.
-
-            - task: DownloadPipelineArtifact@2
-              displayName: Download Windows x64 and Managed Artifacts
+            - task: DownloadBuildArtifacts@0
+              displayName: 'Download release builds'
               inputs:
-                artifactName: Windows_x64_Release
-                targetPath: '$(Build.SourcesDirectory)/artifacts/bin'
-              condition: succeeded()
-
-            # Windows x86 download
-
-            - task: DownloadPipelineArtifact@2
-              displayName: Download Windows x86 Artifacts
+                downloadPath: '$(Build.ArtifactStagingDirectory)/__download__'
+                artifactName: Build_Release
+                checkDownloadedFiles: true
+            - task: CopyFiles@2
+              displayName: 'Binplace Product'
               inputs:
-                artifactName: Windows_x86_Release
-                targetPath: '$(Build.SourcesDirectory)/artifacts/bin/Windows_NT.x86.Release'
-              condition: succeeded()
-
-            # Windows arm download
-
-            - task: DownloadPipelineArtifact@2
-              displayName: Download Windows Arm Artifacts
-              inputs:
-                artifactName: Windows_arm_Release
-                targetPath: '$(Build.SourcesDirectory)/artifacts/bin/Windows_NT.arm.Release'
-              condition: succeeded()
-
-            # Windows arm64 download
-
-            - task: DownloadPipelineArtifact@2
-              displayName: Download Windows Arm64 Artifacts
-              inputs:
-                artifactName: Windows_arm64_Release
-                targetPath: '$(Build.SourcesDirectory)/artifacts/bin/Windows_NT.arm64.Release'
-              condition: succeeded()
-
-            # Linux x64 download
-
-            - task: DownloadPipelineArtifact@2
-              displayName: Download Linux Artifacts
-              inputs:
-                artifactName: CentOS_7_x64_Release
-                targetPath: '$(Build.SourcesDirectory)/artifacts/bin/Linux.x64.Release'
-              condition: succeeded()
-
-            # Linux MUSL x64 download
-
-            - task: DownloadPipelineArtifact@2
-              displayName: Download Linux Musl Artifacts
-              inputs:
-                artifactName: Alpine3_6_x64_Release
-                targetPath: '$(Build.SourcesDirectory)/artifacts/bin/Linux-musl.x64.Release'
-              condition: succeeded()
-
-            # Linux arm download
-
-            - task: DownloadPipelineArtifact@2
-              displayName: Download Linux Arm Artifacts
-              inputs:
-                artifactName: Linux_cross_arm_Release
-                targetPath: '$(Build.SourcesDirectory)/artifacts/bin/Linux.arm.Release'
-              condition: succeeded()
-
-            # Linux arm64 download
-
-            - task: DownloadPipelineArtifact@2
-              displayName: Download Linux Arm64 Artifacts
-              inputs:
-                artifactName: Linux_cross64_arm64_Release
-                targetPath: '$(Build.SourcesDirectory)/artifacts/bin/Linux.arm64.Release'
-              condition: succeeded()
-
-            # Linux MUSL arm64 download
-
-            - task: DownloadPipelineArtifact@2
-              displayName: Download Linux Musl arm64 Artifacts
-              inputs:
-                artifactName: Alpine3_6_cross64_arm64_Release
-                targetPath: '$(Build.SourcesDirectory)/artifacts/bin/Linux-musl.arm64.Release'
-              condition: succeeded()
-
-            # MacOS download
-
-            - task: DownloadPipelineArtifact@2
-              displayName: Download MacOS Artifacts
-              inputs:
-                artifactName: MacOS_x64_Release
-                targetPath: '$(Build.SourcesDirectory)/artifacts/bin/OSX.x64.Release'
-              condition: succeeded()
-
-            # MacOS arm64 download
-
-            - task: DownloadPipelineArtifact@2
-              displayName: Download MacOS arm64 Artifacts
-              inputs:
-                artifactName: MacOS_cross_arm64_Release
-                targetPath: '$(Build.SourcesDirectory)/artifacts/bin/OSX.arm64.Release'
-              condition: succeeded()
+                sourceFolder: $(Build.ArtifactStagingDirectory)/__download__/Build_Release
+                targetFolder: '$(Build.SourcesDirectory)/artifacts/'
 
+            # Windows x64 download. Everything under "bin" is published for the Windows x64 build.
             # Create nuget packages, sign binaries and publish to blob feed
             - script: $(Build.SourcesDirectory)\eng\ci-prepare-artifacts.cmd $(_InternalBuildArgs)
               displayName: Package, Sign, and Publish
@@ -447,7 +364,6 @@ stages:
               condition: succeeded()
 
             # Publish package and log build artifacts
-
             - task: PublishBuildArtifacts@1
               displayName: Publish Package Artifacts
               inputs:
@@ -473,7 +389,7 @@ stages:
             publishUsingPipelines: true
             pool:
               name: NetCoreInternal-Pool
-              queue: buildpool.windows.10.amd64.vs2017
+              queue: buildpool.windows.10.amd64.vs2019
 
   - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
     - template: /eng/common/templates/post-build/post-build.yml
index b0cd6a775877db3e3253f767da6d0401b6353324..df9ae6479c5b64167059d9d8a2a32d7d83fff4e2 100644 (file)
@@ -1,3 +1,3 @@
 @echo off
-powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0build.ps1""" -restore -test -ci %*"
+powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0build.ps1""" -restore -ci -prepareMachine %*"
 exit /b %ErrorLevel%
index 0af1ae203a63cc9ea3432e40aa79dd8686ba7a11..9fb28a0268a3961d452fae58b10087024bab3074 100644 (file)
@@ -12,7 +12,6 @@
           Condition="'$(SignFilesToBundle)' == 'true'" />
 
   <ItemGroup>
-    <FileSignInfo Include="ParallelStacks.Runtime.dll" CertificateName="3PartySHA2" />
     <FileSignInfo Include="Newtonsoft.Json.dll" CertificateName="3PartySHA2" />
     <FileSignInfo Include="Newtonsoft.Json.Bson.dll" CertificateName="3PartySHA2" />
   </ItemGroup>
index b2f3e6a427bb0ca818732b91f708bdcd7220c4a3..65fd1d5f162523d10d44956e99d78d6c82254b60 100644 (file)
@@ -1,30 +1,25 @@
 parameters:
   # Job name
   name: ''
-
   # Agent OS (Windows_NT, Linux, MacOS, FreeBSD)
   osGroup: Windows_NT
-
   # Additional variables
   variables: {}
-
   # Build strategy - matrix
   strategy: ''
-
   # Optional: Job timeout
   timeoutInMinutes: 180
-
   # Optional: Docker image to use
   dockerImage: ''
-
   # Optional: ROOTFS_DIR to use
   crossrootfsDir: ''
-
   # Optional: test only job if true
   testOnly: false
-
+  buildAndSkipTest: false
   # Depends on 
   dependsOn: ''
+  artifactsTargetPath: ''
+  requiresCapPtraceContainer: false
 
 jobs:
 - template: /eng/common/templates/job/job.yml
@@ -39,12 +34,12 @@ jobs:
       # Public Linux Build Pool
       ${{ if and(eq(parameters.osGroup, 'Linux'), eq(variables['System.TeamProject'], 'public')) }}:
         name:  NetCorePublic-Pool
-        queue: BuildPool.Ubuntu.1604.Amd64.Open
+        queue: BuildPool.Ubuntu.1804.Amd64.Open
 
       # Official Build Linux Pool
       ${{ if and(eq(parameters.osGroup, 'Linux'), ne(variables['System.TeamProject'], 'public')) }}:
         name: NetCoreInternal-Pool
-        queue: BuildPool.Ubuntu.1604.Amd64
+        queue: BuildPool.Ubuntu.1804.Amd64
 
       # FreeBSD builds only in the internal project
       ${{ if and(eq(parameters.osGroup, 'FreeBSD'), ne(variables['System.TeamProject'], 'public')) }}:
@@ -57,12 +52,15 @@ jobs:
       # Official Build Windows Pool
       ${{ if and(eq(parameters.osGroup, 'Windows_NT'), ne(variables['System.TeamProject'], 'public')) }}:
         name: NetCoreInternal-Pool
-        queue: BuildPool.Windows.10.Amd64.VS2017
+        queue: BuildPool.Windows.10.Amd64.VS2019
 
       # Public Windows Build Pool
       ${{ if and(eq(parameters.osGroup, 'Windows_NT'), eq(variables['System.TeamProject'], 'public')) }}:
         name: NetCorePublic-Pool
-        queue: BuildPool.Windows.10.Amd64.VS2017.Open
+        queue: BuildPool.Windows.10.Amd64.VS2019.Open
+
+    ${{ if and(ne(parameters.dockerImage, ''), ne(parameters.requiresCapPtraceContainer, 'true')) }}:
+      container: ${{ parameters.dockerImage }}
 
     ${{ if ne(parameters.strategy, '') }}:
       strategy: ${{ parameters.strategy }}
@@ -75,14 +73,32 @@ jobs:
 
     variables: 
     - ${{ insert }}: ${{ parameters.variables }}
-    - _PortableLinuxBuild: CentOS_7_$(_BuildArch)_$(_BuildConfig)
     - _DockerImageName: ${{ parameters.dockerImage }}
     - _PhaseName : ${{ parameters.name }}
     - _HelixType: build/product
     - _HelixBuildConfig: $(_BuildConfig)
     - _Pipeline_StreamDumpDir: $(Build.SourcesDirectory)/artifacts/tmp/$(_BuildConfig)/streams
+
+    - ${{ if eq(parameters.osGroup, 'Windows_NT') }}:
+      - _buildScript: $(Build.SourcesDirectory)\eng\cibuild.cmd
+    - ${{ if ne(parameters.osGroup, 'Windows_NT') }}:
+      - _buildScript: $(Build.SourcesDirectory)/eng/cibuild.sh
+
+    - _TestArgs: '-test'
+    - _dockerEnv: ''
+
+    - ${{ if eq(parameters.testOnly, 'true') }}:
+      - _TestArgs: '-test -skipnative'
+    - ${{ if eq(parameters.requiresCapPtraceContainer, 'true') }}:
+      - _dockerEnv: $(Build.SourcesDirectory)/eng/docker-build.sh 
+            --docker-image $(_DockerImageName)
+            --source-directory $(Build.SourcesDirectory)
+            --container-name diagnostics-$(Build.BuildId)
+
+    - ${{ if eq(parameters.buildAndSkipTest, 'true') }}:
+      - _TestArgs: ''
+
     - _InternalInstallArgs: ''
     # For testing msrc's and service releases. The RuntimeSourceVersion is either "default" or the service release version to test
     - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
       - _InternalInstallArgs:
@@ -97,11 +113,6 @@ jobs:
     - ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}:
       - _HelixSource: pr/dotnet/arcade/$(Build.SourceBranch)
 
-    - ${{ if eq(parameters.testOnly, 'true') }}:
-      - _LinuxScript: $(Build.SourcesDirectory)/eng/citest.sh
-    - ${{ if ne(parameters.testOnly, 'true') }}:
-      - _LinuxScript: $(Build.SourcesDirectory)/eng/cibuild.sh
-
     # This is only required for cross builds.
     - ${{ if eq(parameters.crossrootfsDir, '') }}:
       - _RootFs: ''
@@ -109,69 +120,48 @@ jobs:
       - _RootFs: --rootfs ${{ parameters.crossrootfsDir }}
 
     steps:
-    - ${{ if eq(parameters.osGroup, 'Windows_NT') }}:
-      - script: $(Build.SourcesDirectory)\eng\cibuild.cmd
-          -configuration $(_BuildConfig) 
-          -architecture $(_BuildArch)
-          -prepareMachine 
-          /p:OfficialBuildId=$(BUILD.BUILDNUMBER)
-          $(_InternalInstallArgs)
-        displayName: Build / Test
-        condition: succeeded()
-
     - ${{ if eq(parameters.osGroup, 'Linux') }}:
       - ${{ if eq(parameters.testOnly, 'true') }}:
-        - task: DownloadPipelineArtifact@2
-          displayName: Download Linux Artifacts
+        - task: DownloadBuildArtifacts@0
+          displayName: 'Download release builds'
+          inputs:
+            downloadPath: '$(Build.ArtifactStagingDirectory)/__download__'
+            downloadType: specific 
+            itemPattern: |
+              Build_$(_BuildConfig)/bin/Linux.$(_BuildArch).$(_BuildConfig)/**
+            checkDownloadedFiles: true
+        - task: CopyFiles@2
+          displayName: 'Binplace Product'
           inputs:
-            artifactName: $(_PortableLinuxBuild)
-            targetPath: '$(Build.SourcesDirectory)/artifacts/bin/Linux.$(_BuildArch).$(_BuildConfig)'
-          condition: succeeded()
-
-      - script: $(Build.SourcesDirectory)/eng/docker-build.sh 
-          --docker-image $(_DockerImageName)
-          --source-directory $(Build.SourcesDirectory)
-          --container-name diagnostics-$(Build.BuildId)
-          $(_LinuxScript) $(_RootFs)
-          --configuration $(_BuildConfig) 
-          --architecture $(_BuildArch)
-          --prepareMachine 
-          /p:OfficialBuildId=$(BUILD.BUILDNUMBER)
-          /p:BUILD_BUILDNUMBER=$(BUILD.BUILDNUMBER)
-          $(_InternalInstallArgs)
-        displayName: Docker Build / Test
-        condition: succeeded()
-
-    - ${{ if eq(parameters.osGroup, 'MacOS') }}:
-      - script: $(Build.SourcesDirectory)/eng/cibuild.sh
-          --configuration $(_BuildConfig) 
-          --architecture $(_BuildArch)
-          --prepareMachine
-          /p:OfficialBuildId=$(BUILD.BUILDNUMBER)
-          $(_InternalInstallArgs)
-        displayName: Build / Test
-        condition: succeeded()
+            sourceFolder: $(Build.ArtifactStagingDirectory)/__download__/Build_$(_BuildConfig)/bin/Linux.$(_BuildArch).$(_BuildConfig)
+            targetFolder: '$(Build.SourcesDirectory)/artifacts/bin/Linux.$(_BuildArch).$(_BuildConfig)'
 
     - ${{ if eq(parameters.osGroup, 'MacOS_cross') }}:
       - script: /bin/bash -c "sudo xcode-select -s /Applications/Xcode_12.2.app/Contents/Developer"
-      - script: $(Build.SourcesDirectory)/eng/build.sh
-          --restore
-          --ci
-          --stripsymbols
-          --configuration $(_BuildConfig)
-          --architecture $(_BuildArch)
-          --prepareMachine
-          /p:OfficialBuildId=$(BUILD.BUILDNUMBER)
-          $(_InternalInstallArgs)
-        displayName: Build / Test
-        condition: succeeded()
+
+    - script: $(_dockerEnv) $(_buildScript)
+        -configuration $(_BuildConfig) 
+        -architecture $(_BuildArch)
+        $(_TestArgs)
+        $(_RootFs)
+        /p:OfficialBuildId=$(BUILD.BUILDNUMBER)
+        $(_InternalInstallArgs)
+      displayName: Build / Test
+      condition: succeeded()
 
     - ${{ if ne(variables['System.TeamProject'], 'public') }}:
+      - task: CopyFiles@2
+        displayName: Gather binaries for publish to artifacts
+        inputs:
+          SourceFolder: '$(Build.SourcesDirectory)/artifacts/$(_PublishArtifacts)'
+          Contents: '**'
+          TargetFolder: $(Build.ArtifactStagingDirectory)/artifacts/${{ coalesce(parameters.artifactsTargetPath, '$(_PublishArtifacts)') }}
+        condition:  ne(variables['_PublishArtifacts'], '')
       - task: PublishBuildArtifacts@1
         displayName: Publish Build Artifacts
         inputs:
-          pathtoPublish: '$(Build.SourcesDirectory)/artifacts/$(_PublishArtifacts)'
-          artifactName: $(_PhaseName)_$(_BuildArch)_$(_BuildConfig)
+          pathtoPublish: '$(Build.ArtifactStagingDirectory)/artifacts'
+          artifactName: Build_$(_BuildConfig)
         condition: ne(variables['_PublishArtifacts'], '')
 
     - task: PublishBuildArtifacts@1
@@ -218,17 +208,18 @@ jobs:
         ArtifactName: Logs_$(_PhaseName)_$(_BuildArch)_$(_BuildConfig)
       continueOnError: true
       condition: always()
-    
-    # Publish test results to Azure Pipelines
-    - task: PublishTestResults@2
-      inputs:
-        testResultsFormat: xUnit
-        testResultsFiles: '**/*UnitTests*.xml' 
-        searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults'
-        failTaskOnFailedTests: true
-        testRunTitle: 'Tests $(_PhaseName) $(_BuildArch) $(_BuildConfig)'
-        publishRunAttachments: true
-        mergeTestResults: true
-        buildConfiguration: ${{ parameters.name }}
-      continueOnError: true
-      condition: ne(variables['_BuildOnly'], 'true')
+
+    - ${{ if eq(parameters.buildAndSkipTest, 'false') }}:
+      # Publish test results to Azure Pipelines
+      - task: PublishTestResults@2
+        inputs:
+          testResultsFormat: xUnit
+          testResultsFiles: '**/*UnitTests*.xml' 
+          searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults'
+          failTaskOnFailedTests: true
+          testRunTitle: 'Tests $(_PhaseName) $(_BuildArch) $(_BuildConfig)'
+          publishRunAttachments: true
+          mergeTestResults: true
+          buildConfiguration: ${{ parameters.name }}
+        continueOnError: true
+        condition: ne(variables['_BuildOnly'], 'true')
index a64b629d21f74b9f244d7707804bea1e7542d39c..c4a1f2b4994d814366513ae4e3b636a391aaaaab 100755 (executable)
@@ -37,7 +37,7 @@ if [ "$__osname" == "Linux" ]; then
     fi
 fi
 
-"$scriptroot/build.sh" --restore --test --ci --stripsymbols $@
+"$scriptroot/build.sh" --restore --prepareMachine --ci --stripsymbols $@
 if [[ $? != 0 ]]; then
     exit 1
 fi
diff --git a/eng/citest.sh b/eng/citest.sh
deleted file mode 100755 (executable)
index 13c49a3..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/usr/bin/env bash
-# Copyright (c) .NET Foundation and contributors. All rights reserved.
-# Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-source="${BASH_SOURCE[0]}"
-
-# resolve $SOURCE until the file is no longer a symlink
-while [[ -h $source ]]; do
-  scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
-  source="$(readlink "$source")"
-
-  # if $source was a relative symlink, we need to resolve it relative to the path where 
-  # the symlink file was located
-  [[ $source != /* ]] && source="$scriptroot/$source"
-done
-
-scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
-
-# Fix any CI lab docker image problems
-
-__osname=$(uname -s)
-if [ "$__osname" == "Linux" ]; then
-    if [ -e /etc/os-release ]; then
-        source /etc/os-release
-        if [[ $ID == "ubuntu" ]]; then
-            if [[ $VERSION_ID == "18.04" ]]; then
-                # Fix the CI lab's ubuntu 18.04 docker image: install curl.
-                sudo apt-get update
-                sudo apt-get install -y curl
-            fi
-        fi
-    elif [ -e /etc/redhat-release ]; then
-        __redhatRelease=$(</etc/redhat-release)
-        if [[ $__redhatRelease == "CentOS release 6."* || $__redhatRelease == "Red Hat Enterprise Linux Server release 6."* ]]; then
-            source scl_source enable python27 devtoolset-2
-        fi
-    fi
-fi
-
-# Restore and build just the managed components (test infrastructure)
-"$scriptroot/build.sh" --restore --skipnative --test --ci $@
-if [[ $? != 0 ]]; then
-    exit 1
-fi
index 1cbe075113ef8abe7fcae1146866f6ceb335749f..99cfc0d0475e43a977af96dfd1a6a3334afc81a9 100755 (executable)
@@ -29,7 +29,13 @@ while [ $# -ne 0 ]; do
 done
 
 echo "Initialize Docker Container"
-docker_bin=$(which docker)
+if command -v docker > /dev/null; then
+    docker_bin=$(command -v docker)
+else
+    echo "Unable to find docker"
+    exit 1
+fi
+
 $docker_bin --version
 
 # Get user id
@@ -45,7 +51,7 @@ $docker_bin pull $docker_image
 $docker_bin network create vsts_network_$docker_container_name
 
 # Create and start container
-docker_id="$($docker_bin create -it --rm --privileged --ulimit core=-1 \
+docker_id="$($docker_bin create -it --rm --security-opt seccomp=unconfined --ulimit core=-1 \
   --name vsts_container_$docker_container_name \
   --network=vsts_network_$docker_container_name \
   --volume $source_directory:$source_directory \
@@ -71,4 +77,3 @@ $docker_bin container stop $docker_id
 $docker_bin network rm vsts_network_$docker_container_name
 
 exit $lasterrorcode
-
diff --git a/eng/docker-cleanup.sh b/eng/docker-cleanup.sh
deleted file mode 100755 (executable)
index 6380535..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/usr/bin/perl
-
-#
-# ./cleanup-docker.sh
-#
-
-printf "Cleaning up containers\n";
-printf "----------------------\n";
-my $psList = `docker ps -a`;
-my @psItems = split /\n/, $psList;
-foreach(@psItems) {
-  # match 'docker ps' output to capture the container name
-  if($_ =~ /.*\s+([^\s]+)$/ig) {
-    my $containerName = $1;
-    if($containerName !~ /NAME/ig) {
-      printf "delete $containerName\n";
-      my $deleteOutput = `docker rm -f $1`;
-      print "$deleteOutput\n";
-    }
-  }
-}
-
-printf "Cleaning up volumes\n";
-printf "-------------------\n";
-my $volumeList = `docker volume ls`;
-@volumeItems = split /\n/, $volumeList;
-foreach(@volumeItems) {
-  # match 'docker volume ls' output to capture the volume name
-  if($_ =~ /([^\s]+)\s+([^\s]+)$/ig) {
-    my $volumeName = $2;
-    if($volumeName !~ /NAME/ig) {
-      printf "delete $volumeName\n";
-      my $deleteVolumeOutput = `docker volume rm -f $volumeName`;
-      printf "$deleteVolumeOutput\n";
-    }
-  }
-}
-
-printf "Cleaning up images\n";
-printf "------------------\n";
-my $imageList = `docker images`;
-@imageItems = split /\n/, $imageList;
-foreach(@imageItems) {
-  # match 'docker images' output to capture the image id
-  if($_ =~ /([^\s]+)\s+([^\s]+)\s+([^\s]+)\s+.*/ig) {
-    my $imageId = $3;
-    if($imageId !~ /IMAGE/ig) {
-      my $imageRepo = $1;
-      my $imageTag = $2;
-      printf "delete $imageId ($imageRepo:$imageTag)\n";
-      my $deleteImageOutput = `docker rmi -f $imageId`;
-      printf "$deleteImageOutput\n";
-    }
-  }
-}
index 60c10ec77229092bb2210254082c487ed293318d..b0301627c719c11eb68b4202c26d38d25b15d827 100644 (file)
       <RuntimeFrameworkVersion>$(RuntimeVersionLatest)</RuntimeFrameworkVersion>
       <SetHostRuntime>$(DotNetRoot)/shared/Microsoft.NETCore.App/$(RuntimeFrameworkVersion)</SetHostRuntime>
     </Option>
-    <Option Condition="'$(RuntimeVersion50)' != ''">
+    <!-- <Option Condition="'$(RuntimeVersion50)' != ''">
       <BuildProjectFramework>net5.0</BuildProjectFramework>
       <RuntimeFrameworkVersion>$(RuntimeVersion50)</RuntimeFrameworkVersion>
-    </Option>
+    </Option> -->
     <Option Condition="'$(RuntimeVersion31)' != ''">
       <BuildProjectFramework>netcoreapp3.1</BuildProjectFramework>
       <RuntimeFrameworkVersion>$(RuntimeVersion31)</RuntimeFrameworkVersion>
             </Option>
           </Options>
         </Option>
-        <Option Condition="'$(RuntimeVersion50)' != ''">
+        <!-- <Option Condition="'$(RuntimeVersion50)' != ''">
           <BuildProjectFramework>net5.0</BuildProjectFramework>
           <RuntimeFrameworkVersion>$(RuntimeVersion50)</RuntimeFrameworkVersion>
-        </Option>
+        </Option> -->
         <Option Condition="'$(RuntimeVersion31)' != ''">
           <BuildProjectFramework>netcoreapp3.1</BuildProjectFramework>
           <RuntimeFrameworkVersion>$(RuntimeVersion31)</RuntimeFrameworkVersion>
           <RuntimeFrameworkVersion>$(RuntimeVersionLatest)</RuntimeFrameworkVersion>
           <FrameworkVersion>$(AspNetCoreVersionLatest)</FrameworkVersion>
         </Option>
-        <Option Condition="'$(AspNetCoreVersion50)' != ''">
+        <!--  <Option Condition="'$(AspNetCoreVersion50)' != ''">
           <BuildProjectFramework>net5.0</BuildProjectFramework>
           <RuntimeFrameworkVersion>$(RuntimeVersion50)</RuntimeFrameworkVersion>
           <FrameworkVersion>$(AspNetCoreVersion50)</FrameworkVersion>
-        </Option>
+        </Option> -->
         <Option Condition="'$(AspNetCoreVersion31)' != ''">
           <BuildProjectFramework>netcoreapp3.1</BuildProjectFramework>
           <RuntimeFrameworkVersion>$(RuntimeVersion31)</RuntimeFrameworkVersion>
           <RuntimeFrameworkVersion>$(RuntimeVersionLatest)</RuntimeFrameworkVersion>
           <SetHostRuntime>$(DotNetRoot)/shared/Microsoft.NETCore.App/$(RuntimeFrameworkVersion)</SetHostRuntime>
         </Option>
-        <Option Condition="'$(RuntimeVersion50)' != ''">
+        <!-- <Option Condition="'$(RuntimeVersion50)' != ''">
           <BuildProjectFramework>net5.0</BuildProjectFramework>
           <RuntimeFrameworkVersion>$(RuntimeVersion50)</RuntimeFrameworkVersion>
-        </Option>
+        </Option> -->
         <Option Condition="'$(RuntimeVersion31)' != ''">
           <BuildProjectFramework>netcoreapp3.1</BuildProjectFramework>
           <RuntimeFrameworkVersion>$(RuntimeVersion31)</RuntimeFrameworkVersion>
index d719f8e1d24d3759696b7ad52aa8b1a517bbf63f..0953d097f33910016a20c33162524641dea28dba 100644 (file)
@@ -192,7 +192,6 @@ VERIFY:.*\s+<HEXVAL>\s+<HEXVAL>\s+\[DEFAULT\] I4 SymbolTestApp\.Program\.Foo1\(.
 VERIFY:.*\s+<HEXVAL>\s+<HEXVAL>\s+\[DEFAULT\] Void SymbolTestApp\.Program\.Main\(.*\)\s+\(.*\)\s+
 VERIFY:.*\s+Stack walk complete.\s+
 
-ENDIF:NETCORE_OR_DOTNETDUMP
 
 # Verify DumpStackObjects works
 SOSCOMMAND:DumpStackObjects
@@ -208,6 +207,7 @@ VERIFY:\s+([R|E])*SP/REG\s+Object\s+Name\s+
 VERIFY:.*\s+<HEXVAL>\s+<HEXVAL>\s+System\.String.*
 VERIFY:.*\s+<HEXVAL>\s+<HEXVAL>\s+System\.String\[\].*
 
+ENDIF:NETCORE_OR_DOTNETDUMP
 ENDIF:ALPINE
 
 !IFDEF:DOTNETDUMP