diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2022-10-31 18:44:20 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-31 18:44:20 +0300 |
commit | 57bf5a0a1bf5d55eb9efefa92dcff6f067d4bfb3 (patch) | |
tree | b4509768696af7ead4506bf2345b2315f1f38bad | |
parent | c824ca94c64e8a227e9e3e48e7513abdd2a3cfce (diff) |
Sync shared code from arcade (#91)
Co-authored-by: dougbu <dougbu@users.noreply.github.com>
-rw-r--r-- | eng/common/templates/job/source-build.yml | 21 | ||||
-rw-r--r-- | eng/common/tools.sh | 11 |
2 files changed, 20 insertions, 12 deletions
diff --git a/eng/common/templates/job/source-build.yml b/eng/common/templates/job/source-build.yml index 6fe2d73..e40bf35 100644 --- a/eng/common/templates/job/source-build.yml +++ b/eng/common/templates/job/source-build.yml @@ -34,8 +34,6 @@ parameters: jobs: - job: ${{ parameters.jobNamePrefix }}_${{ parameters.platform.name }} displayName: Source-Build (${{ parameters.platform.name }}) - variables: - - template: /eng/common/templates/variables/pool-providers.yml ${{ each property in parameters.platform.jobProperties }}: ${{ property.key }}: ${{ property.value }} @@ -46,13 +44,24 @@ jobs: ${{ if eq(parameters.platform.pool, '') }}: # The default VM host AzDO pool. This should be capable of running Docker containers: almost all # source-build builds run in Docker, including the default managed platform. + # /eng/common/templates/variables/pool-providers.yml can't be used here (some customers declare variables already), so duplicate its logic pool: - ${{ if eq(variables['System.TeamProject'], 'public') }}: - name: $(DncEngPublicBuildPool) + # Main environments + ${{ if and(eq(variables['System.TeamProject'], 'public'), ne(contains(coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranch'], 'refs/heads/main'), 'release'), true)) }}: + name: NetCore-Public demands: ImageOverride -equals Build.Ubuntu.1804.Amd64.Open - ${{ if eq(variables['System.TeamProject'], 'internal') }}: - name: $(DncEngInternalBuildPool) + ${{ if and(eq(variables['System.TeamProject'], 'internal'), ne(contains(coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranch'], 'refs/heads/main'), 'release'), true)) }}: + name: NetCore1ESPool-Internal demands: ImageOverride -equals Build.Ubuntu.1804.Amd64 + + # Servicing build environments + ${{ if and(eq(variables['System.TeamProject'], 'public'), contains(coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranch'], 'refs/heads/main'), 'release')) }}: + name: NetCore-Svc-Public + demands: ImageOverride -equals Build.Ubuntu.1804.Amd64.Open + ${{ if and(eq(variables['System.TeamProject'], 'internal'), contains(coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranch'], 'refs/heads/main'), 'release')) }}: + name: NetCore1ESPool-Svc-Internal + demands: ImageOverride -equals Build.Ubuntu.1804.Amd64 + ${{ if ne(parameters.platform.pool, '') }}: pool: ${{ parameters.platform.pool }} diff --git a/eng/common/tools.sh b/eng/common/tools.sh index dc19dfa..6586eab 100644 --- a/eng/common/tools.sh +++ b/eng/common/tools.sh @@ -417,12 +417,11 @@ function MSBuild { Write-PipelineSetVariable -name "NUGET_PLUGIN_HANDSHAKE_TIMEOUT_IN_SECONDS" -value "20" Write-PipelineSetVariable -name "NUGET_PLUGIN_REQUEST_TIMEOUT_IN_SECONDS" -value "20" - export NUGET_ENABLE_EXPERIMENTAL_HTTP_RETRY=true - export NUGET_EXPERIMENTAL_MAX_NETWORK_TRY_COUNT=6 - export NUGET_EXPERIMENTAL_NETWORK_RETRY_DELAY_MILLISECONDS=1000 - Write-PipelineSetVariable -name "NUGET_ENABLE_EXPERIMENTAL_HTTP_RETRY" -value "true" - Write-PipelineSetVariable -name "NUGET_EXPERIMENTAL_MAX_NETWORK_TRY_COUNT" -value "6" - Write-PipelineSetVariable -name "NUGET_EXPERIMENTAL_NETWORK_RETRY_DELAY_MILLISECONDS" -value "1000" + # https://github.com/dotnet/arcade/issues/11369 - disable new MSBuild server feature on linux + # This feature is new and can result in build failures from connection timeout errors. + export DOTNET_CLI_DO_NOT_USE_MSBUILD_SERVER=1 + Write-PipelineSetVariable -name "DOTNET_CLI_DO_NOT_USE_MSBUILD_SERVER" -value "1" + fi local toolset_dir="${_InitializeToolset%/*}" |