From 9f29f80c89fa6e8f9545852c9674565b91eb874a Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Tue, 5 Nov 2019 15:37:33 -0800 Subject: [PATCH 01/11] Backport changes to get CI working in runtime repository. --- azure-pipelines.yml | 58 +++++++++++++------ eng/pipelines/jobs/bash-build.yml | 7 ++- eng/pipelines/jobs/osx-build.yml | 2 +- .../jobs/steps/build-linux-package.yml | 12 +++- eng/pipelines/jobs/windows-build.yml | 2 +- eng/pipelines/stages/publish.yml | 2 +- src/corehost/build.sh | 2 +- src/signing/Directory.Build.props | 6 +- 8 files changed, 63 insertions(+), 28 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index fcf38761d4..5ab4ba2865 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,12 +1,18 @@ trigger: - batch: true branches: include: - master - release/3.* paths: + include: + - '*' + - docs/installer/manpages/* exclude: - - Documentation/* + - src/coreclr/* + - src/libraries/* + - eng/pipelines/coreclr/* + - eng/pipelines/libraries/* + - docs/* - README.md - CONTRIBUTING.md - LICENSE.TXT @@ -18,8 +24,15 @@ pr: - master - release/3.* paths: + include: + - '*' + - docs/installer/manpages/* exclude: - - Documentation/* + - src/coreclr/* + - src/libraries/* + - eng/pipelines/coreclr/* + - eng/pipelines/libraries/* + - docs/* - README.md - CONTRIBUTING.md - LICENSE.TXT @@ -53,11 +66,22 @@ variables: - name: SignType value: $[ coalesce(variables.OfficialSignType, 'real') ] + - ${{ if contains(variables['Build.DefinitionName'], 'runtime') }}: + - name: pipelinesPath + value: /eng/pipelines/installer + - name: buildScriptFileName + value: installer + - ${{ if not(contains(variables['Build.DefinitionName'], 'runtime')) }}: + - name: pipelinesPath + value: /eng/pipelines + - name: buildScriptFileName + value: build + stages: - stage: Build jobs: # -------- Build Bash legs (Linux and FreeBSD) -------- - - template: /eng/pipelines/jobs/bash-build.yml + - template: $(pipelinesPath)/jobs/bash-build.yml parameters: crossBuild: true name: Linux_Arm @@ -67,7 +91,7 @@ stages: skipTests: true targetArchitecture: arm - - template: /eng/pipelines/jobs/bash-build.yml + - template: $(pipelinesPath)/jobs/bash-build.yml parameters: crossBuild: true name: Linux_Arm64 @@ -79,7 +103,7 @@ stages: # # Tizen build only for PR build # - ${{ if eq(variables['Build.Reason'], 'PullRequest') }}: - # - template: /eng/pipelines/jobs/bash-build.yml + # - template: $(pipelinesPath)/jobs/bash-build.yml # parameters: # additionalMSBuildArgs: /p:OverridePackageSource=https:%2F%2Ftizen.myget.org/F/dotnet-core/api/v3/index.json /p:OutputRid=tizen.5.0.0-armel # additionalRunArgs: -e ROOTFS_DIR=/crossrootfs/armel.tizen.build @@ -91,7 +115,7 @@ stages: # skipTests: true # targetArchitecture: armel - - template: /eng/pipelines/jobs/bash-build.yml + - template: $(pipelinesPath)/jobs/bash-build.yml parameters: additionalMSBuildArgs: /p:OutputRid=linux-musl-arm64 crossBuild: true @@ -102,7 +126,7 @@ stages: skipTests: true targetArchitecture: arm64 - - template: /eng/pipelines/jobs/bash-build.yml + - template: $(pipelinesPath)/jobs/bash-build.yml parameters: additionalMSBuildArgs: /p:OutputRid=linux-musl-x64 name: Linux_x64_Alpine39 @@ -110,7 +134,7 @@ stages: portableBuild: false targetArchitecture: x64 - - template: /eng/pipelines/jobs/bash-build.yml + - template: $(pipelinesPath)/jobs/bash-build.yml parameters: name: Linux_x64_glibc dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7-50f0d02-20190918214028 @@ -129,7 +153,7 @@ stages: portableBuild: true targetArchitecture: x64 - - template: /eng/pipelines/jobs/bash-build.yml + - template: $(pipelinesPath)/jobs/bash-build.yml parameters: additionalMSBuildArgs: /p:OutputRid=rhel.6-x64 name: Linux_x64_Rhel6 @@ -138,34 +162,34 @@ stages: targetArchitecture: x64 # -------- Build OSX (macOS) leg -------- - - template: /eng/pipelines/jobs/osx-build.yml + - template: $(pipelinesPath)/jobs/osx-build.yml parameters: name: OSX # -------- Build Windows legs -------- # Windows Arm - - template: /eng/pipelines/jobs/windows-build.yml + - template: $(pipelinesPath)/jobs/windows-build.yml parameters: name: Windows_Arm skipTests: true targetArchitecture: arm # Windows Arm64 - - template: /eng/pipelines/jobs/windows-build.yml + - template: $(pipelinesPath)/jobs/windows-build.yml parameters: name: Windows_Arm64 skipTests: true targetArchitecture: arm64 # Windows x64 - - template: /eng/pipelines/jobs/windows-build.yml + - template: $(pipelinesPath)/jobs/windows-build.yml parameters: name: Windows_x64 publishRidAgnosticPackages: true targetArchitecture: x64 # Windows x86 - - template: /eng/pipelines/jobs/windows-build.yml + - template: $(pipelinesPath)/jobs/windows-build.yml parameters: name: Windows_x86 targetArchitecture: x86 @@ -176,7 +200,7 @@ stages: dependsOn: Build jobs: # Prep artifacts: sign them and upload pipeline artifacts expected by stages-based publishing. - - template: /eng/pipelines/jobs/prepare-signed-artifacts.yml + - template: $(pipelinesPath)/jobs/prepare-signed-artifacts.yml parameters: PublishRidAgnosticPackagesFromJobName: Windows_x64 # Publish to Build Asset Registry in order to generate the ReleaseConfigs artifact. @@ -188,7 +212,7 @@ stages: name: NetCoreInternal-Pool queue: buildpool.windows.10.amd64.vs2017 - - template: /eng/pipelines/stages/publish.yml + - template: $(pipelinesPath)/stages/publish.yml parameters: # Publish channel configuration. The publish template wraps Arcade publishing and adds some # extras that aren't implemented in Arcade yet. diff --git a/eng/pipelines/jobs/bash-build.yml b/eng/pipelines/jobs/bash-build.yml index b6a6aa6edb..876725c27c 100644 --- a/eng/pipelines/jobs/bash-build.yml +++ b/eng/pipelines/jobs/bash-build.yml @@ -50,11 +50,14 @@ jobs: RunArguments: export DotNetBootstrapCliTarPath=/dotnet-sdk-freebsd-x64.tar && ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - BuildScript: ./eng/install-nuget-credprovider-then-build.sh + ${{ if not(contains(variables['Build.DefinitionName'], 'runtime')) }}: + BuildScript: ./eng/install-nuget-credprovider-then-build.sh + ${{ if contains(variables['Build.DefinitionName'], 'runtime') }}: + BuildScript: ./eng/install-nuget-credprovider-then-build.sh --subsetCategory installer MSBuildScript: /root/coresetup/eng/install-nuget-credprovider-then-msbuild.sh ${{ if not(and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'))) }}: - BuildScript: ./build.sh + BuildScript: ./$(buildScriptFileName).sh MSBuildScript: /root/coresetup/eng/common/msbuild.sh CommonMSBuildArgs: >- diff --git a/eng/pipelines/jobs/osx-build.yml b/eng/pipelines/jobs/osx-build.yml index 28479a9d74..74554f13b0 100644 --- a/eng/pipelines/jobs/osx-build.yml +++ b/eng/pipelines/jobs/osx-build.yml @@ -26,7 +26,7 @@ jobs: - task: NuGetAuthenticate@0 - script: >- - $(Build.SourcesDirectory)/build.sh --ci --test + $(Build.SourcesDirectory)/$(buildScriptFileName).sh --ci --test /p:OfficialBuildId=$(OfficialBuildId) /p:StripSymbols=true $(CommonMSBuildArgs) diff --git a/eng/pipelines/jobs/steps/build-linux-package.yml b/eng/pipelines/jobs/steps/build-linux-package.yml index 9bfac530ae..a844a8591c 100644 --- a/eng/pipelines/jobs/steps/build-linux-package.yml +++ b/eng/pipelines/jobs/steps/build-linux-package.yml @@ -6,6 +6,14 @@ parameters: packageStepDescription: null packagingArgs: '' +variables: + - ${{ if contains(variables['Build.DefinitionName'], 'runtime') }}: + - name: subsetArg + value: --subset Installers + - ${{ if not(contains(variables['Build.DefinitionName'], 'runtime')) }}: + - name: subsetArg + value: /p:Subset=Installer + steps: - ${{ if eq(parameters.buildTraversalBuildDependencies, true) }}: - script: | @@ -24,12 +32,12 @@ steps: df -h $(DockerRunMSBuild) ${{ parameters.image }} $(BuildScript) \ --ci \ - /p:Subset=Installer \ + $(subsetArg) \ /p:UsePrebuiltPortableBinariesForInstallers=true \ $(PackagePortableBitsArgs) \ /p:GenerateProjectInstallers=true \ ${{ parameters.packagingArgs }} \ $(CommonMSBuildArgs) \ ${{ parameters.outputRidArg }} \ - /bl:msbuild.${{ parameters.distroRid }}.installers.binlog + /bl:artifacts/log/$(_BuildConfig)/msbuild.${{ parameters.distroRid }}.installers.binlog displayName: Package ${{ parameters.packageStepDescription }} - ${{ parameters.distroRid }} diff --git a/eng/pipelines/jobs/windows-build.yml b/eng/pipelines/jobs/windows-build.yml index 47c9c3073b..57ff8c7882 100644 --- a/eng/pipelines/jobs/windows-build.yml +++ b/eng/pipelines/jobs/windows-build.yml @@ -58,7 +58,7 @@ jobs: displayName: Clear NuGet http cache (if exists) - script: >- - build.cmd -ci -test + $(buildScriptFileName).cmd -ci -test $(CommonMSBuildArgs) $(MsbuildSigningArguments) displayName: Build diff --git a/eng/pipelines/stages/publish.yml b/eng/pipelines/stages/publish.yml index ceb64344a7..ed7eb21941 100644 --- a/eng/pipelines/stages/publish.yml +++ b/eng/pipelines/stages/publish.yml @@ -40,7 +40,7 @@ stages: variables: - template: /eng/common/templates/post-build/common-variables.yml jobs: - - template: /eng/pipelines/jobs/run-publish-project.yml + - template: $(pipelinesPath)/jobs/run-publish-project.yml parameters: projectName: publish-final dependency: ${{ dependency }} diff --git a/src/corehost/build.sh b/src/corehost/build.sh index bf5b98c0ee..8443e4ad72 100755 --- a/src/corehost/build.sh +++ b/src/corehost/build.sh @@ -268,7 +268,7 @@ if [ $__CrossBuild == 1 ]; then fi export TARGET_BUILD_ARCH=$__build_arch_lowcase export __DistroRid=$__rid_plat - cmake "$DIR" -G "Unix Makefiles" $__cmake_defines -DCLI_CMAKE_HOST_VER=$__host_ver -DCLI_CMAKE_COMMON_HOST_VER=$__apphost_ver -DCLI_CMAKE_HOST_FXR_VER=$__fxr_ver -DCLI_CMAKE_HOST_POLICY_VER=$__policy_ver -DCLI_CMAKE_PKG_RID=$__base_rid -DCLI_CMAKE_COMMIT_HASH=$__commit_hash -DCMAKE_INSTALL_PREFIX=$__cmake_bin_prefix -DCMAKE_TOOLCHAIN_FILE=$DIR/../../cross/toolchain.cmake + cmake "$DIR" -G "Unix Makefiles" $__cmake_defines -DCLI_CMAKE_HOST_VER=$__host_ver -DCLI_CMAKE_COMMON_HOST_VER=$__apphost_ver -DCLI_CMAKE_HOST_FXR_VER=$__fxr_ver -DCLI_CMAKE_HOST_POLICY_VER=$__policy_ver -DCLI_CMAKE_PKG_RID=$__base_rid -DCLI_CMAKE_COMMIT_HASH=$__commit_hash -DCMAKE_INSTALL_PREFIX=$__cmake_bin_prefix -DCMAKE_TOOLCHAIN_FILE=$RootRepo/cross/toolchain.cmake else cmake "$DIR" -G "Unix Makefiles" $__cmake_defines -DCLI_CMAKE_HOST_VER=$__host_ver -DCLI_CMAKE_COMMON_HOST_VER=$__apphost_ver -DCLI_CMAKE_HOST_FXR_VER=$__fxr_ver -DCLI_CMAKE_HOST_POLICY_VER=$__policy_ver -DCLI_CMAKE_PKG_RID=$__base_rid -DCLI_CMAKE_COMMIT_HASH=$__commit_hash -DCMAKE_INSTALL_PREFIX=$__cmake_bin_prefix fi diff --git a/src/signing/Directory.Build.props b/src/signing/Directory.Build.props index 0054dfb042..b73a942765 100644 --- a/src/signing/Directory.Build.props +++ b/src/signing/Directory.Build.props @@ -4,9 +4,9 @@ $(NETCoreAppFramework) + true - - true + + true - From aaabc475d36be84407319d3eea653182a57bbf9a Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Tue, 5 Nov 2019 15:38:39 -0800 Subject: [PATCH 02/11] /root/coresetup->/root/runtime --- eng/pipelines/jobs/bash-build.yml | 12 ++++++------ eng/pipelines/jobs/steps/build-linux-package.yml | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/eng/pipelines/jobs/bash-build.yml b/eng/pipelines/jobs/bash-build.yml index 876725c27c..0cc527f5e3 100644 --- a/eng/pipelines/jobs/bash-build.yml +++ b/eng/pipelines/jobs/bash-build.yml @@ -40,8 +40,8 @@ jobs: ${{ if ne(parameters.name, 'FreeBSD_x64')}}: RunArguments: >- docker run --privileged --rm - -v "$(Build.SourcesDirectory):/root/coresetup" - -w="/root/coresetup" + -v "$(Build.SourcesDirectory):/root/runtime" + -w="/root/runtime" $(PreserveNuGetAuthDockerArgs) ${{ parameters.additionalRunArgs }} ${{ parameters.dockerImage }} @@ -54,11 +54,11 @@ jobs: BuildScript: ./eng/install-nuget-credprovider-then-build.sh ${{ if contains(variables['Build.DefinitionName'], 'runtime') }}: BuildScript: ./eng/install-nuget-credprovider-then-build.sh --subsetCategory installer - MSBuildScript: /root/coresetup/eng/install-nuget-credprovider-then-msbuild.sh + MSBuildScript: /root/runtime/eng/install-nuget-credprovider-then-msbuild.sh ${{ if not(and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'))) }}: BuildScript: ./$(buildScriptFileName).sh - MSBuildScript: /root/coresetup/eng/common/msbuild.sh + MSBuildScript: /root/runtime/eng/common/msbuild.sh CommonMSBuildArgs: >- /p:Configuration=$(_BuildConfig) @@ -92,9 +92,9 @@ jobs: DockerRunMSBuild: >- docker run - -v $(Build.SourcesDirectory):/root/coresetup + -v $(Build.SourcesDirectory):/root/runtime -v $(Build.StagingDirectory)/sharedFrameworkPublish/:/root/sharedFrameworkPublish/ - -w=/root/coresetup + -w=/root/runtime $(PreserveNuGetAuthDockerArgs) steps: diff --git a/eng/pipelines/jobs/steps/build-linux-package.yml b/eng/pipelines/jobs/steps/build-linux-package.yml index a844a8591c..c39189a25b 100644 --- a/eng/pipelines/jobs/steps/build-linux-package.yml +++ b/eng/pipelines/jobs/steps/build-linux-package.yml @@ -21,7 +21,7 @@ steps: df -h $(DockerRunMSBuild) ${{ parameters.image }} $(MSBuildScript) \ --ci \ - /root/coresetup/tools-local/tasks/installer.tasks/installer.tasks.csproj \ + /root/runtime/tools-local/tasks/installer.tasks/installer.tasks.csproj \ /t:Restore /t:Build /t:CreateHostMachineInfoFile \ $(CommonMSBuildArgs) \ /bl:msbuild.${{ parameters.distroRid }}.traversaldependencies.binlog From df341ed08ca0bb13f59d27e55b356ac52d0de1fd Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Tue, 5 Nov 2019 15:40:18 -0800 Subject: [PATCH 03/11] Delete broken RPM symlink that might still be around if the RPM packaging job failed. --- eng/pipelines/jobs/steps/upload-job-artifacts.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/eng/pipelines/jobs/steps/upload-job-artifacts.yml b/eng/pipelines/jobs/steps/upload-job-artifacts.yml index 8b9e42f6ae..d02de1205b 100644 --- a/eng/pipelines/jobs/steps/upload-job-artifacts.yml +++ b/eng/pipelines/jobs/steps/upload-job-artifacts.yml @@ -35,6 +35,13 @@ steps: continueOnError: true condition: always() +- task: DeleteFiles@1 + displayName: Delete broken symlinks. + inputs: + SourceFolder: '$(Build.SourcesDirectory)' + Contents: artifacts/obj/rhel.7-x64.Debug/packages/dotnet-host/5.0.0/rpmLayoutDirectory/package_root/usr/bin/dotnet + condition: succeededOrFailed() + - task: CopyFiles@2 displayName: Prepare BuildLogs staging directory inputs: From 31d01b17b870ff9b83aecc89d25282f66640281a Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Tue, 5 Nov 2019 15:43:05 -0800 Subject: [PATCH 04/11] Add back old Documentation folder excludes with a more specific include for the manpages folder. --- azure-pipelines.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 5ab4ba2865..bfaeebf2cd 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -7,7 +7,9 @@ trigger: include: - '*' - docs/installer/manpages/* + - Documentation/manpages/* exclude: + - Documentation/* - src/coreclr/* - src/libraries/* - eng/pipelines/coreclr/* @@ -27,7 +29,9 @@ pr: include: - '*' - docs/installer/manpages/* + - Documentation/manpages/* exclude: + - Documentation/* - src/coreclr/* - src/libraries/* - eng/pipelines/coreclr/* From eaea7271c731cccd028fa8cd0d31e7d2be163773 Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Tue, 5 Nov 2019 15:45:29 -0800 Subject: [PATCH 05/11] Try other variable format for template path. --- azure-pipelines.yml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index bfaeebf2cd..ed0e0cc78a 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -85,7 +85,7 @@ stages: - stage: Build jobs: # -------- Build Bash legs (Linux and FreeBSD) -------- - - template: $(pipelinesPath)/jobs/bash-build.yml + - template: ${{ variables['pipelinesPath'] }}/jobs/bash-build.yml parameters: crossBuild: true name: Linux_Arm @@ -95,7 +95,7 @@ stages: skipTests: true targetArchitecture: arm - - template: $(pipelinesPath)/jobs/bash-build.yml + - template: ${{ variables['pipelinesPath'] }}/jobs/bash-build.yml parameters: crossBuild: true name: Linux_Arm64 @@ -107,7 +107,7 @@ stages: # # Tizen build only for PR build # - ${{ if eq(variables['Build.Reason'], 'PullRequest') }}: - # - template: $(pipelinesPath)/jobs/bash-build.yml + # - template: ${{ variables['pipelinesPath'] }}/jobs/bash-build.yml # parameters: # additionalMSBuildArgs: /p:OverridePackageSource=https:%2F%2Ftizen.myget.org/F/dotnet-core/api/v3/index.json /p:OutputRid=tizen.5.0.0-armel # additionalRunArgs: -e ROOTFS_DIR=/crossrootfs/armel.tizen.build @@ -119,7 +119,7 @@ stages: # skipTests: true # targetArchitecture: armel - - template: $(pipelinesPath)/jobs/bash-build.yml + - template: ${{ variables['pipelinesPath'] }}/jobs/bash-build.yml parameters: additionalMSBuildArgs: /p:OutputRid=linux-musl-arm64 crossBuild: true @@ -130,7 +130,7 @@ stages: skipTests: true targetArchitecture: arm64 - - template: $(pipelinesPath)/jobs/bash-build.yml + - template: ${{ variables['pipelinesPath'] }}/jobs/bash-build.yml parameters: additionalMSBuildArgs: /p:OutputRid=linux-musl-x64 name: Linux_x64_Alpine39 @@ -138,7 +138,7 @@ stages: portableBuild: false targetArchitecture: x64 - - template: $(pipelinesPath)/jobs/bash-build.yml + - template: ${{ variables['pipelinesPath'] }}/jobs/bash-build.yml parameters: name: Linux_x64_glibc dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7-50f0d02-20190918214028 @@ -157,7 +157,7 @@ stages: portableBuild: true targetArchitecture: x64 - - template: $(pipelinesPath)/jobs/bash-build.yml + - template: ${{ variables['pipelinesPath'] }}/jobs/bash-build.yml parameters: additionalMSBuildArgs: /p:OutputRid=rhel.6-x64 name: Linux_x64_Rhel6 @@ -166,34 +166,34 @@ stages: targetArchitecture: x64 # -------- Build OSX (macOS) leg -------- - - template: $(pipelinesPath)/jobs/osx-build.yml + - template: ${{ variables['pipelinesPath'] }}/jobs/osx-build.yml parameters: name: OSX # -------- Build Windows legs -------- # Windows Arm - - template: $(pipelinesPath)/jobs/windows-build.yml + - template: ${{ variables['pipelinesPath'] }}/jobs/windows-build.yml parameters: name: Windows_Arm skipTests: true targetArchitecture: arm # Windows Arm64 - - template: $(pipelinesPath)/jobs/windows-build.yml + - template: ${{ variables['pipelinesPath'] }}/jobs/windows-build.yml parameters: name: Windows_Arm64 skipTests: true targetArchitecture: arm64 # Windows x64 - - template: $(pipelinesPath)/jobs/windows-build.yml + - template: ${{ variables['pipelinesPath'] }}/jobs/windows-build.yml parameters: name: Windows_x64 publishRidAgnosticPackages: true targetArchitecture: x64 # Windows x86 - - template: $(pipelinesPath)/jobs/windows-build.yml + - template: ${{ variables['pipelinesPath'] }}/jobs/windows-build.yml parameters: name: Windows_x86 targetArchitecture: x86 @@ -204,7 +204,7 @@ stages: dependsOn: Build jobs: # Prep artifacts: sign them and upload pipeline artifacts expected by stages-based publishing. - - template: $(pipelinesPath)/jobs/prepare-signed-artifacts.yml + - template: ${{ variables['pipelinesPath'] }}/jobs/prepare-signed-artifacts.yml parameters: PublishRidAgnosticPackagesFromJobName: Windows_x64 # Publish to Build Asset Registry in order to generate the ReleaseConfigs artifact. @@ -216,7 +216,7 @@ stages: name: NetCoreInternal-Pool queue: buildpool.windows.10.amd64.vs2017 - - template: $(pipelinesPath)/stages/publish.yml + - template: ${{ variables['pipelinesPath'] }}/stages/publish.yml parameters: # Publish channel configuration. The publish template wraps Arcade publishing and adds some # extras that aren't implemented in Arcade yet. From eaa7a5ba9b17261623471c08243e22ecda9f13fb Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Tue, 5 Nov 2019 15:47:14 -0800 Subject: [PATCH 06/11] Treat subsetArg as a parameter with a default value instead of as a variable. --- eng/pipelines/jobs/steps/build-linux-package.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/eng/pipelines/jobs/steps/build-linux-package.yml b/eng/pipelines/jobs/steps/build-linux-package.yml index c39189a25b..8239c4b903 100644 --- a/eng/pipelines/jobs/steps/build-linux-package.yml +++ b/eng/pipelines/jobs/steps/build-linux-package.yml @@ -5,12 +5,10 @@ parameters: outputRidArg: '' packageStepDescription: null packagingArgs: '' - -variables: - - ${{ if contains(variables['Build.DefinitionName'], 'runtime') }}: + ${{ if contains(variables['Build.DefinitionName'], 'runtime') }}: - name: subsetArg value: --subset Installers - - ${{ if not(contains(variables['Build.DefinitionName'], 'runtime')) }}: + ${{ if not(contains(variables['Build.DefinitionName'], 'runtime')) }}: - name: subsetArg value: /p:Subset=Installer From 852e2af4a42b550f67ad9941a498db2838ab3987 Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Tue, 5 Nov 2019 15:49:35 -0800 Subject: [PATCH 07/11] Pass subset arg to template. --- eng/pipelines/jobs/bash-build.yml | 9 +++++++++ eng/pipelines/jobs/steps/build-linux-package.yml | 7 +------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/eng/pipelines/jobs/bash-build.yml b/eng/pipelines/jobs/bash-build.yml index 0cc527f5e3..4efab39252 100644 --- a/eng/pipelines/jobs/bash-build.yml +++ b/eng/pipelines/jobs/bash-build.yml @@ -97,6 +97,13 @@ jobs: -w=/root/runtime $(PreserveNuGetAuthDockerArgs) + ${{ if contains(variables['Build.DefinitionName'], 'runtime') }}: + - name: installersSubsetArg + value: --subset Installers + ${{ if not(contains(variables['Build.DefinitionName'], 'runtime')) }}: + - name: installersSubsetArg + value: /p:Subset=Installer + steps: - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: @@ -142,6 +149,7 @@ jobs: distroRid: ${{ packageBuild.imageRid }} image: ${{ packageBuild.image }} packageStepDescription: Runtime Deps, Runtime, Framework Packs installers + subsetArg: $(installersSubsetArg) - ${{ each rid in packageBuild.rids }}: # Build distro-dependent packages. @@ -152,6 +160,7 @@ jobs: outputRidArg: /p:OutputRid=${{ rid }}-${{ parameters.targetArchitecture }} packageStepDescription: Runtime Deps installers packagingArgs: /p:BuildDistroIndependentInstallers=false + subsetArg: $(installersSubsetArg) # Files may be owned by root because builds don't set user ID. The next AzDO step runs 'find' in # the source tree, which fails due to permissions in the 'NetCore*-Int-Pool' queues. This step diff --git a/eng/pipelines/jobs/steps/build-linux-package.yml b/eng/pipelines/jobs/steps/build-linux-package.yml index 8239c4b903..e66c054687 100644 --- a/eng/pipelines/jobs/steps/build-linux-package.yml +++ b/eng/pipelines/jobs/steps/build-linux-package.yml @@ -5,12 +5,7 @@ parameters: outputRidArg: '' packageStepDescription: null packagingArgs: '' - ${{ if contains(variables['Build.DefinitionName'], 'runtime') }}: - - name: subsetArg - value: --subset Installers - ${{ if not(contains(variables['Build.DefinitionName'], 'runtime')) }}: - - name: subsetArg - value: /p:Subset=Installer + subsetArg: '' steps: - ${{ if eq(parameters.buildTraversalBuildDependencies, true) }}: From fe5c29f81a2f0046988f3a9fd0fe878f62230439 Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Tue, 5 Nov 2019 15:53:49 -0800 Subject: [PATCH 08/11] Try other variable format. --- eng/pipelines/jobs/bash-build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/pipelines/jobs/bash-build.yml b/eng/pipelines/jobs/bash-build.yml index 4efab39252..c1fc0027f8 100644 --- a/eng/pipelines/jobs/bash-build.yml +++ b/eng/pipelines/jobs/bash-build.yml @@ -149,7 +149,7 @@ jobs: distroRid: ${{ packageBuild.imageRid }} image: ${{ packageBuild.image }} packageStepDescription: Runtime Deps, Runtime, Framework Packs installers - subsetArg: $(installersSubsetArg) + subsetArg: ${{ installersSubsetArg }} - ${{ each rid in packageBuild.rids }}: # Build distro-dependent packages. @@ -160,7 +160,7 @@ jobs: outputRidArg: /p:OutputRid=${{ rid }}-${{ parameters.targetArchitecture }} packageStepDescription: Runtime Deps installers packagingArgs: /p:BuildDistroIndependentInstallers=false - subsetArg: $(installersSubsetArg) + subsetArg: ${{ installersSubsetArg }} # Files may be owned by root because builds don't set user ID. The next AzDO step runs 'find' in # the source tree, which fails due to permissions in the 'NetCore*-Int-Pool' queues. This step From 791ef17d8a762c4fe72a77892fab46e668439d44 Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Tue, 5 Nov 2019 15:57:56 -0800 Subject: [PATCH 09/11] Try another variant. --- eng/pipelines/jobs/bash-build.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/eng/pipelines/jobs/bash-build.yml b/eng/pipelines/jobs/bash-build.yml index c1fc0027f8..7f86099110 100644 --- a/eng/pipelines/jobs/bash-build.yml +++ b/eng/pipelines/jobs/bash-build.yml @@ -98,11 +98,9 @@ jobs: $(PreserveNuGetAuthDockerArgs) ${{ if contains(variables['Build.DefinitionName'], 'runtime') }}: - - name: installersSubsetArg - value: --subset Installers + installersSubsetArg: --subset Installers ${{ if not(contains(variables['Build.DefinitionName'], 'runtime')) }}: - - name: installersSubsetArg - value: /p:Subset=Installer + installersSubsetArg: /p:Subset=Installer steps: From eb0d9cf6862ba7e78449bd6e8f251a91c7bbe576 Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Tue, 5 Nov 2019 15:59:30 -0800 Subject: [PATCH 10/11] Switch back variable format now that I got a different (seemingly actionable) error. --- eng/pipelines/jobs/bash-build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/pipelines/jobs/bash-build.yml b/eng/pipelines/jobs/bash-build.yml index 7f86099110..5a12623a03 100644 --- a/eng/pipelines/jobs/bash-build.yml +++ b/eng/pipelines/jobs/bash-build.yml @@ -147,7 +147,7 @@ jobs: distroRid: ${{ packageBuild.imageRid }} image: ${{ packageBuild.image }} packageStepDescription: Runtime Deps, Runtime, Framework Packs installers - subsetArg: ${{ installersSubsetArg }} + subsetArg: $(installersSubsetArg) - ${{ each rid in packageBuild.rids }}: # Build distro-dependent packages. @@ -158,7 +158,7 @@ jobs: outputRidArg: /p:OutputRid=${{ rid }}-${{ parameters.targetArchitecture }} packageStepDescription: Runtime Deps installers packagingArgs: /p:BuildDistroIndependentInstallers=false - subsetArg: ${{ installersSubsetArg }} + subsetArg: $(installersSubsetArg) # Files may be owned by root because builds don't set user ID. The next AzDO step runs 'find' in # the source tree, which fails due to permissions in the 'NetCore*-Int-Pool' queues. This step From bff42d61cf44185dfb90dc4b344e11aa136d9f46 Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Tue, 5 Nov 2019 17:00:06 -0800 Subject: [PATCH 11/11] Fix passing the subset arg. --- eng/pipelines/jobs/steps/build-linux-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/jobs/steps/build-linux-package.yml b/eng/pipelines/jobs/steps/build-linux-package.yml index e66c054687..e9e342b618 100644 --- a/eng/pipelines/jobs/steps/build-linux-package.yml +++ b/eng/pipelines/jobs/steps/build-linux-package.yml @@ -25,7 +25,7 @@ steps: df -h $(DockerRunMSBuild) ${{ parameters.image }} $(BuildScript) \ --ci \ - $(subsetArg) \ + ${{ parameters.subsetArg }} \ /p:UsePrebuiltPortableBinariesForInstallers=true \ $(PackagePortableBitsArgs) \ /p:GenerateProjectInstallers=true \