Remove set build info and do not run tests in official builds (#7286)
* Remoe unneeded parameters from build Removes a bunch of old unused parameters and adds _AdditionalParameters to the whole matrix so AzDO doesn't throw out noisy warnings * Do not run tests in official builds and cleanup build infra a bit - Do not run the tests in official builds (build time improvement) - Remove setbuildinfo.* and make parameters explicit. - Remove a bunch of unused parameters
This commit is contained in:
parent
70f407b2fc
commit
a03aed0acc
4 changed files with 54 additions and 85 deletions
55
.vsts-ci.yml
55
.vsts-ci.yml
|
@ -7,16 +7,12 @@ trigger:
|
|||
- internal/release/3.*
|
||||
|
||||
variables:
|
||||
# These two variables are used by CopyToLatest.
|
||||
# when CopyToLatest goes away in favor of improvements to dotnet-install, this can be removed.
|
||||
- name: _PublishBlobFeedUrl
|
||||
value: https://dotnetcli.blob.core.windows.net/dotnet/index.json
|
||||
- name: _PublishChecksumsBlobFeedUrl
|
||||
value: https://dotnetclichecksums.blob.core.windows.net/dotnet/index.json
|
||||
- name: _ArcadePublishBlobFeedUrl
|
||||
value: https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json
|
||||
- name: _DotNetArtifactsCategory
|
||||
value: .NETCore
|
||||
- name: _DotNetValidationArtifactsCategory
|
||||
value: .NETCoreValidation
|
||||
- name: _PublishUsingPipelines
|
||||
value: false
|
||||
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
||||
|
@ -26,6 +22,17 @@ variables:
|
|||
- name: _PublishUsingPipelines
|
||||
value: true
|
||||
|
||||
# Default to running tests in PRs and public CI, but not in official builds
|
||||
- name: _WindowsTestArg
|
||||
value: '-test'
|
||||
- name: _NonWindowsTestArg
|
||||
value: '--test'
|
||||
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
||||
- name: _WindowsTestArg
|
||||
value: ''
|
||||
- name: _NonWindowsTestArg
|
||||
value: ''
|
||||
|
||||
stages:
|
||||
- stage: build
|
||||
jobs:
|
||||
|
@ -47,32 +54,43 @@ stages:
|
|||
_BuildConfig: Debug
|
||||
_BuildArchitecture: x86
|
||||
_DOTNET_CLI_UI_LANGUAGE: ''
|
||||
_AdditionalBuildParameters: ''
|
||||
_TestArg: $(_WindowsTestArg)
|
||||
Build_ES_Debug_x64:
|
||||
_BuildConfig: Debug
|
||||
_BuildArchitecture: x64
|
||||
_DOTNET_CLI_UI_LANGUAGE: es
|
||||
_AdditionalBuildParameters: ''
|
||||
_TestArg: $(_WindowsTestArg)
|
||||
# Internal-only builds
|
||||
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
||||
Build_Release_x86:
|
||||
_BuildConfig: Release
|
||||
_BuildArchitecture: x86
|
||||
_DOTNET_CLI_UI_LANGUAGE: ''
|
||||
_AdditionalBuildParameters: ''
|
||||
_TestArg: $(_WindowsTestArg)
|
||||
# Always run builds
|
||||
Build_Release_x64:
|
||||
_BuildConfig: Release
|
||||
_BuildArchitecture: x64
|
||||
_DOTNET_CLI_UI_LANGUAGE: ''
|
||||
_AdditionalBuildParameters: '/p:PublishInternalAsset=true
|
||||
/p:DotNetPublishBlobFeedKey=$(dotnetfeed-storage-access-key-1)
|
||||
/p:DotNetPublishBlobFeedUrl=$(_ArcadePublishBlobFeedUrl)'
|
||||
_AdditionalBuildParameters: '/p:PublishInternalAsset=true'
|
||||
_TestArg: $(_WindowsTestArg)
|
||||
Build_Release_arm:
|
||||
_BuildConfig: Release
|
||||
_BuildArchitecture: arm
|
||||
_DOTNET_CLI_UI_LANGUAGE: ''
|
||||
_AdditionalBuildParameters: ''
|
||||
# Never run tests on arm64
|
||||
_TestArg: ''
|
||||
Build_Release_arm64:
|
||||
_BuildConfig: Release
|
||||
_BuildArchitecture: arm64
|
||||
_DOTNET_CLI_UI_LANGUAGE: ''
|
||||
_AdditionalBuildParameters: ''
|
||||
# Never run tests on arm64
|
||||
_TestArg: ''
|
||||
|
||||
- template: /eng/build.yml
|
||||
parameters:
|
||||
|
@ -94,54 +112,65 @@ stages:
|
|||
_LinuxPortable: ''
|
||||
_RuntimeIdentifier: ''
|
||||
_BuildArchitecture: 'x64'
|
||||
_TestArg: $(_NonWindowsTestArg)
|
||||
Build_Ubuntu_18_04_Debug_x64:
|
||||
_BuildConfig: Debug
|
||||
_DockerParameter: '--docker ubuntu.18.04'
|
||||
_LinuxPortable: '--linux-portable'
|
||||
_RuntimeIdentifier: ''
|
||||
_BuildArchitecture: 'x64'
|
||||
_TestArg: $(_NonWindowsTestArg)
|
||||
Build_Fedora_29_Debug_x64:
|
||||
_BuildConfig: Debug
|
||||
_DockerParameter: '--docker fedora.29'
|
||||
_LinuxPortable: '--linux-portable'
|
||||
_RuntimeIdentifier: ''
|
||||
_BuildArchitecture: 'x64'
|
||||
_TestArg: $(_NonWindowsTestArg)
|
||||
Build_CentOS_7_1_Debug_x64:
|
||||
_BuildConfig: Debug
|
||||
_DockerParameter: '--docker centos'
|
||||
_LinuxPortable: ''
|
||||
_RuntimeIdentifier: ''
|
||||
_BuildArchitecture: 'x64'
|
||||
_TestArg: $(_NonWindowsTestArg)
|
||||
Build_Debian_Stretch_Debug_x64:
|
||||
_BuildConfig: Debug
|
||||
_DockerParameter: '--docker debian'
|
||||
_LinuxPortable: ''
|
||||
_RuntimeIdentifier: ''
|
||||
_BuildArchitecture: 'x64'
|
||||
_TestArg: $(_NonWindowsTestArg)
|
||||
Build_Rhel_7_2_Release_x64:
|
||||
_BuildConfig: Release
|
||||
_DockerParameter: '--docker rhel'
|
||||
_LinuxPortable: ''
|
||||
_RuntimeIdentifier: ''
|
||||
_BuildArchitecture: 'x64'
|
||||
_TestArg: $(_NonWindowsTestArg)
|
||||
Build_Arm_Debug:
|
||||
_BuildConfig: Debug
|
||||
_DockerParameter: ''
|
||||
_LinuxPortable: '--linux-portable'
|
||||
_RuntimeIdentifier: '--runtime-id linux-arm'
|
||||
_BuildArchitecture: 'arm'
|
||||
# Never run tests on arm64
|
||||
_TestArg: ''
|
||||
Build_Arm64_Debug:
|
||||
_BuildConfig: Debug
|
||||
_DockerParameter: ''
|
||||
_LinuxPortable: '--linux-portable'
|
||||
_RuntimeIdentifier: '--runtime-id linux-arm64'
|
||||
_BuildArchitecture: 'arm64'
|
||||
# Never run tests on arm64
|
||||
_TestArg: ''
|
||||
Build_Linux_musl_Debug_x64:
|
||||
_BuildConfig: Debug
|
||||
_DockerParameter: '--docker alpine.3.6'
|
||||
_LinuxPortable: ''
|
||||
_RuntimeIdentifier: '--runtime-id linux-musl-x64'
|
||||
_BuildArchitecture: 'x64'
|
||||
_TestArg: $(_NonWindowsTestArg)
|
||||
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
||||
Build_Arm_Release:
|
||||
_BuildConfig: Release
|
||||
|
@ -149,12 +178,16 @@ stages:
|
|||
_LinuxPortable: '--linux-portable'
|
||||
_RuntimeIdentifier: '--runtime-id linux-arm'
|
||||
_BuildArchitecture: 'arm'
|
||||
# Never run tests on arm64
|
||||
_TestArg: ''
|
||||
Build_Arm64_Release:
|
||||
_BuildConfig: Release
|
||||
_DockerParameter: ''
|
||||
_LinuxPortable: '--linux-portable'
|
||||
_RuntimeIdentifier: '--runtime-id linux-arm64'
|
||||
_BuildArchitecture: 'arm64'
|
||||
# Never run tests on arm64
|
||||
_TestArg: ''
|
||||
Build_Linux_musl_Release_x64:
|
||||
_BuildConfig: Release
|
||||
_DockerParameter: '--docker alpine.3.6'
|
||||
|
@ -170,6 +203,7 @@ stages:
|
|||
# Do not publish zips and tarballs. The linux-x64 binaries are
|
||||
# already published by Build_LinuxPortable_Release_x64
|
||||
_AdditionalBuildParameters: '/p:PublishBinariesAndBadge=false'
|
||||
_TestArg: $(_NonWindowsTestArg)
|
||||
Build_Linux_Portable_Rpm_Release_x64:
|
||||
_BuildConfig: Release
|
||||
_DockerParameter: '--docker rhel'
|
||||
|
@ -179,12 +213,14 @@ stages:
|
|||
# Do not publish zips and tarballs. The linux-x64 binaries are
|
||||
# already published by Build_LinuxPortable_Release_x64
|
||||
_AdditionalBuildParameters: '/p:PublishBinariesAndBadge=false'
|
||||
_TestArg: $(_NonWindowsTestArg)
|
||||
Build_LinuxPortable_Release_x64:
|
||||
_BuildConfig: Release
|
||||
_DockerParameter: ''
|
||||
_LinuxPortable: '--linux-portable'
|
||||
_RuntimeIdentifier: ''
|
||||
_BuildArchitecture: 'x64'
|
||||
_TestArg: $(_NonWindowsTestArg)
|
||||
|
||||
- template: /eng/build.yml
|
||||
parameters:
|
||||
|
@ -196,6 +232,7 @@ stages:
|
|||
matrix:
|
||||
Build_Release:
|
||||
_BuildConfig: Release
|
||||
_TestArg: $(_NonWindowsTestArg)
|
||||
|
||||
# https://github.com/dotnet/core-sdk/issues/248
|
||||
# - template: /eng/build.yml
|
||||
|
|
|
@ -30,7 +30,7 @@ phases:
|
|||
#enablePublishTestResults: true
|
||||
enablePublishUsingPipelines: ${{parameters.enablePublishUsingPipelines}}
|
||||
enableTelemetry: true
|
||||
helixRepo: dotnet/core-sdk
|
||||
helixRepo: dotnet/installer
|
||||
pool: ${{ parameters.pool }}
|
||||
${{ if ne(parameters.strategy, '') }}:
|
||||
strategy: ${{ parameters.strategy }}
|
||||
|
@ -40,8 +40,8 @@ phases:
|
|||
variables:
|
||||
- _AgentOSName: ${{ parameters.agentOs }}
|
||||
- _TeamName: Roslyn-Project-System
|
||||
- _BuildArgs: ''
|
||||
- _SignType: test
|
||||
- _BuildArgs: '/p:DotNetSignType=$(_SignType)'
|
||||
- _DOTNETCLIMSRC_READ_SAS_TOKEN: ''
|
||||
|
||||
- ${{ if eq(variables['System.TeamProject'], 'internal') }}:
|
||||
|
@ -56,15 +56,9 @@ phases:
|
|||
- _PushToVSFeed: true
|
||||
- _SignType: real
|
||||
- _BuildArgs: /p:OfficialBuildId=$(BUILD.BUILDNUMBER)
|
||||
/p:DotNetPublishToBlobFeed=$(_DotNetPublishToBlobFeed)
|
||||
/p:DotNetPublishBlobFeedKey=$(dotnetfeed-storage-access-key-1)
|
||||
/p:DotNetPublishBlobFeedUrl=$(PB_PublishBlobFeedUrl)
|
||||
/p:DotnetPublishSdkAssetsBlobFeedUrl=$(_PublishBlobFeedUrl)
|
||||
/p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat)
|
||||
/p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat)
|
||||
/p:PB_PublishType=blob
|
||||
/p:DotnetPublishChecksumsBlobFeedUrl=$(_PublishChecksumsBlobFeedUrl)
|
||||
/p:DotNetSignType=real
|
||||
/p:DotNetSignType=$(_SignType)
|
||||
/p:TeamName=$(_TeamName)
|
||||
/p:DotNetPublishUsingPipelines=$(_PublishUsingPipelines)
|
||||
|
||||
|
@ -72,8 +66,6 @@ phases:
|
|||
- checkout: self
|
||||
clean: true
|
||||
- ${{ if eq(parameters.agentOs, 'Windows_NT') }}:
|
||||
- script: 'eng\setbuildinfo.bat $(_BuildArchitecture) $(_BuildConfig)'
|
||||
displayName: Set test info (Windows)
|
||||
- ${{ if ne(variables['System.TeamProject'], 'public') }}:
|
||||
- task: PowerShell@2
|
||||
displayName: Setup Private Feeds Credentials
|
||||
|
@ -83,12 +75,11 @@ phases:
|
|||
env:
|
||||
Token: $(dn-bot-dnceng-artifact-feeds-rw)
|
||||
- script: build.cmd
|
||||
$(TestParameter)
|
||||
-pack -publish -ci
|
||||
$(_TestArg)
|
||||
-pack -publish -ci -sign
|
||||
-Configuration $(_BuildConfig)
|
||||
-Architecture $(_BuildArchitecture)
|
||||
$(_BuildArgs)
|
||||
$(SignBuildParameters)
|
||||
$(_AdditionalBuildParameters)
|
||||
displayName: Build
|
||||
env:
|
||||
|
@ -96,8 +87,6 @@ phases:
|
|||
DOTNETCLIMSRC_READ_SAS_TOKEN: $(_DOTNETCLIMSRC_READ_SAS_TOKEN)
|
||||
|
||||
- ${{ if ne(parameters.agentOs, 'Windows_NT') }}:
|
||||
- script: 'eng/setbuildinfo.sh $(_BuildArchitecture) $(_BuildConfig)'
|
||||
displayName: Set test info (Non-Windows)
|
||||
- ${{ if ne(variables['System.TeamProject'], 'public') }}:
|
||||
- task: Bash@3
|
||||
displayName: Setup Private Feeds Credentials
|
||||
|
@ -108,7 +97,7 @@ phases:
|
|||
Token: $(dn-bot-dnceng-artifact-feeds-rw)
|
||||
- ${{ if eq(parameters.agentOs, 'Linux') }}:
|
||||
- script: ./build.sh
|
||||
$(TestParameter)
|
||||
$(_TestArg)
|
||||
--pack --publish --ci
|
||||
--noprettyprint
|
||||
--configuration $(_BuildConfig)
|
||||
|
@ -124,7 +113,7 @@ phases:
|
|||
|
||||
- ${{ if or(eq(parameters.agentOs, 'Darwin'), eq(parameters.agentOs, 'FreeBSD')) }}:
|
||||
- script: ./build.sh
|
||||
$(TestParameter)
|
||||
$(_TestArg)
|
||||
--pack --publish --ci
|
||||
--noprettyprint
|
||||
--configuration $(_BuildConfig)
|
||||
|
@ -152,7 +141,7 @@ phases:
|
|||
testRunTitle: '$(_AgentOSName)_$(Agent.JobName)'
|
||||
platform: '$(BuildPlatform)'
|
||||
configuration: '$(_BuildConfig)'
|
||||
condition: ne(variables['TestParameter'], '')
|
||||
condition: ne(variables['_TestArg'], '')
|
||||
|
||||
- task: CopyFiles@2
|
||||
displayName: Gather Logs
|
||||
|
|
|
@ -1,38 +0,0 @@
|
|||
@echo off
|
||||
|
||||
setlocal
|
||||
|
||||
set Architecture=%1
|
||||
set Config=%2
|
||||
|
||||
if "%AdditionalBuildParameters%" == "$(_AdditionalBuildParameters)" (
|
||||
REM Prevent the literal "$(_AdditionalBuildParameters)" to be passed to the build script
|
||||
ECHO Setting AdditionalBuildParameters to empty
|
||||
ECHO ##vso[task.setvariable variable=AdditionalBuildParameters]
|
||||
) ELSE (
|
||||
ECHO AdditionalBuildParameters is already set to: %AdditionalBuildParameters%
|
||||
)
|
||||
|
||||
if /I "%SYSTEM_TEAMPROJECT%" == "Public" (
|
||||
ECHO Public CI
|
||||
SET SignType=test
|
||||
) ELSE (
|
||||
ECHO Not public CI
|
||||
SET SignType=real
|
||||
)
|
||||
ECHO ##vso[task.setvariable variable=SignType]%SignType%
|
||||
|
||||
IF /I "%Architecture:~0,3%"=="ARM" (
|
||||
ECHO ARM
|
||||
ECHO ##vso[task.setvariable variable=TestParameter]
|
||||
ECHO ##vso[task.setvariable variable=RunTests]false
|
||||
|
||||
|
||||
) ELSE (
|
||||
ECHO NOT ARM
|
||||
ECHO ##vso[task.setvariable variable=TestParameter]-test
|
||||
ECHO ##vso[task.setvariable variable=RunTests]true
|
||||
|
||||
)
|
||||
|
||||
ECHO ##vso[task.setvariable variable=SignBuildParameters]-sign /p:DotNetSignType=%SignType%
|
|
@ -1,19 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
shopt -s nocasematch
|
||||
|
||||
if [[ "$1" == ARM* ]]
|
||||
then
|
||||
echo "ARM"
|
||||
echo "##vso[task.setvariable variable=TestParameter]"
|
||||
echo "##vso[task.setvariable variable=RunTests]false"
|
||||
else
|
||||
echo "NOT ARM"
|
||||
echo "##vso[task.setvariable variable=TestParameter]--test"
|
||||
echo "##vso[task.setvariable variable=RunTests]true"
|
||||
fi
|
||||
|
||||
if [[ "$AdditionalBuildParameters" == '$(_AdditionalBuildParameters)' ]]
|
||||
then
|
||||
echo "##vso[task.setvariable variable=AdditionalBuildParameters]"
|
||||
fi
|
Loading…
Reference in a new issue