diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 8fedfb19b..8706b1fb8 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -10,52 +10,6 @@ jobs: # Steps template for windows platform - template: windows.template.yml - parameters: - targetRuntime: win-x64 - - # Package dotnet core windows dependency (VC++ Redistributable) - - powershell: | - Write-Host "Downloading 'VC++ Redistributable' package." - $outDir = Join-Path -Path $env:TMP -ChildPath ([Guid]::NewGuid()) - New-Item -Path $outDir -ItemType directory - $outFile = Join-Path -Path $outDir -ChildPath "ucrt.zip" - Invoke-WebRequest -Uri https://vstsagenttools.blob.core.windows.net/tools/ucrt/ucrt_x64.zip -OutFile $outFile - Write-Host "Unzipping 'VC++ Redistributable' package to agent layout." - $unzipDir = Join-Path -Path $outDir -ChildPath "unzip" - Add-Type -AssemblyName System.IO.Compression.FileSystem - [System.IO.Compression.ZipFile]::ExtractToDirectory($outFile, $unzipDir) - $agentLayoutBin = Join-Path -Path $(Build.SourcesDirectory) -ChildPath "_layout\bin" - Copy-Item -Path $unzipDir -Destination $agentLayoutBin -Force - displayName: Package UCRT - condition: and(succeeded(), ne(variables['build.reason'], 'PullRequest')) - - # Create agent package zip - - script: dev.cmd package Release - workingDirectory: src - displayName: Package Release - condition: and(succeeded(), ne(variables['build.reason'], 'PullRequest')) - - # Upload agent package zip as build artifact - - task: PublishBuildArtifacts@1 - displayName: Publish Artifact (Windows x64) - condition: and(succeeded(), ne(variables['build.reason'], 'PullRequest')) - inputs: - pathToPublish: _package - artifactName: agent - artifactType: container - -################################################################################ -- job: build_windows_x86_agent -################################################################################ - displayName: Windows Agent (x64) - pool: - vmImage: vs2017-win2016 - steps: - - # Steps template for windows platform - - template: windows.template.yml - parameters: - targetRuntime: win-x86 # Package dotnet core windows dependency (VC++ Redistributable) - powershell: | @@ -98,64 +52,6 @@ jobs: # Steps template for non-windows platform - template: nonwindows.template.yml - parameters: - targetRuntime: linux-x64 - - # Create agent package zip - - script: ./dev.sh package Release - workingDirectory: src - displayName: Package Release - condition: and(succeeded(), ne(variables['build.reason'], 'PullRequest')) - - # Upload agent package zip as build artifact - - task: PublishBuildArtifacts@1 - displayName: Publish Artifact (Linux x64) - condition: and(succeeded(), ne(variables['build.reason'], 'PullRequest')) - inputs: - pathToPublish: _package - artifactName: agent - artifactType: container - -################################################################################ -- job: build_linux_arm64_agent -################################################################################ - displayName: Linux Agent (x64) - pool: - vmImage: ubuntu-16.04 - steps: - - # Steps template for non-windows platform - - template: nonwindows.template.yml - parameters: - targetRuntime: linux-arm64 - - # Create agent package zip - - script: ./dev.sh package Release - workingDirectory: src - displayName: Package Release - condition: and(succeeded(), ne(variables['build.reason'], 'PullRequest')) - - # Upload agent package zip as build artifact - - task: PublishBuildArtifacts@1 - displayName: Publish Artifact (Linux x64) - condition: and(succeeded(), ne(variables['build.reason'], 'PullRequest')) - inputs: - pathToPublish: _package - artifactName: agent - artifactType: container - -################################################################################ -- job: build_linux_arm32_agent -################################################################################ - displayName: Linux Agent (x64) - pool: - vmImage: ubuntu-16.04 - steps: - - # Steps template for non-windows platform - - template: nonwindows.template.yml - parameters: - targetRuntime: linux-arm # Create agent package zip - script: ./dev.sh package Release diff --git a/nonwindows.template.yml b/nonwindows.template.yml index f0ce42cb1..833bd0500 100644 --- a/nonwindows.template.yml +++ b/nonwindows.template.yml @@ -1,12 +1,9 @@ -parameters: - targetRuntime: '' - steps: # Build agent layout -- script: ./dev.sh layout Release ${{ parameters.targetRuntime }} +- script: ./dev.sh layout Release workingDirectory: src - displayName: Build & Layout Release ${{ parameters.targetRuntime }} + displayName: Build & Layout Release # Run test - script: ./dev.sh test diff --git a/src/dev.sh b/src/dev.sh index 82a9c3471..eca2e6c36 100755 --- a/src/dev.sh +++ b/src/dev.sh @@ -34,29 +34,28 @@ if [[ ($(uname) == "Linux") || ($(uname) == "Darwin") ]]; then fi if [[ "$CURRENT_PLATFORM" == 'windows' ]]; then -RUNTIME_ID='win-x64' -if [[ "$PROCESSOR_ARCHITECTURE" == 'x86' ]]; then - RUNTIME_ID='win-x86' -fi -elif [[ "$CURRENT_PLATFORM" == 'linux' ]]; then -RUNTIME_ID="linux-x64" -if command -v uname > /dev/null; then - CPU_NAME=$(uname -m) - case $CPU_NAME in - armv7l) RUNTIME_ID="linux-arm";; - aarch64) RUNTIME_ID="linux-arm64";; - esac -fi - -if [ -e /etc/redhat-release ]; then - redhatRelease=$( /dev/null; then + CPU_NAME=$(uname -m) + case $CPU_NAME in + armv7l) RUNTIME_ID="linux-arm";; + aarch64) RUNTIME_ID="linux-arm64";; + esac fi -fi + if [ -e /etc/redhat-release ]; then + redhatRelease=$(