From 7dc6613f377d9fdfc412736ca384ff1964a588e1 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Thu, 12 Dec 2024 16:09:40 +0100 Subject: [PATCH] =?UTF-8?q?Use=20Build.ArtifactStagingDirectory=20now=20th?= =?UTF-8?q?at=20we=20run=20with=20native=20contai=E2=80=A6=20(#45428)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- eng/pipelines/templates/jobs/vmr-build.yml | 11 ++++++----- src/SourceBuild/content/Directory.Build.props | 1 - 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/pipelines/templates/jobs/vmr-build.yml b/eng/pipelines/templates/jobs/vmr-build.yml index 5f0e9376a14d..8aaed9b0ba55 100644 --- a/eng/pipelines/templates/jobs/vmr-build.yml +++ b/eng/pipelines/templates/jobs/vmr-build.yml @@ -177,10 +177,8 @@ jobs: - name: sourcesPath value: $(vmrPath) - # Must be a path under $(sourcesPath). Inside the docker container, we mount $(sourcesPath) to /vmr - # and can't write outside of that folder. - name: artifactsStagingDir - value: $(sourcesPath)/artifacts/staging + value: $(Build.ArtifactStagingDirectory)/artifacts templateContext: outputParentDirectory: $(Build.ArtifactStagingDirectory) @@ -303,13 +301,13 @@ jobs: if /I '${{ parameters.useDevVersions }}'=='True' set extraBuildArguments=%extraBuildArguments% -dev set extraBuildProperties= if not [${{ parameters.buildPass }}]==[] set extraBuildProperties=%extraBuildProperties% /p:DotNetBuildPass=${{ parameters.buildPass }} - call build.cmd -ci -cleanWhileBuilding -prepareMachine %extraBuildArguments% -c ${{ parameters.configuration }} /p:TargetOS=${{ parameters.targetOS }} /p:TargetArchitecture=${{ parameters.targetArchitecture }} /p:VerticalName=$(Agent.JobName) %extraBuildProperties% ${{ parameters.extraProperties }} + call build.cmd -ci -cleanWhileBuilding -prepareMachine %extraBuildArguments% -c ${{ parameters.configuration }} /p:TargetOS=${{ parameters.targetOS }} /p:TargetArchitecture=${{ parameters.targetArchitecture }} /p:VerticalName=$(Agent.JobName) /p:ArtifactsStagingDir=$(artifactsStagingDir) %extraBuildProperties% ${{ parameters.extraProperties }} displayName: Build workingDirectory: ${{ variables.sourcesPath }} - ${{ if eq(parameters.runTests, 'True') }}: - script: | - call build.cmd -ci -prepareMachine -test -excludeCIBinarylog /bl:artifacts/log/Release/Test.binlog -c ${{ parameters.configuration }} /p:TargetOS=${{ parameters.targetOS }} /p:TargetArchitecture=${{ parameters.targetArchitecture }} /p:VerticalName=$(Agent.JobName) ${{ parameters.extraProperties }} + call build.cmd -ci -prepareMachine -test -excludeCIBinarylog /bl:artifacts/log/Release/Test.binlog -c ${{ parameters.configuration }} /p:TargetOS=${{ parameters.targetOS }} /p:TargetArchitecture=${{ parameters.targetArchitecture }} /p:VerticalName=$(Agent.JobName) /p:ArtifactsStagingDir=$(artifactsStagingDir) ${{ parameters.extraProperties }} displayName: Run Tests workingDirectory: ${{ variables.sourcesPath }} timeoutInMinutes: ${{ variables.runTestsTimeout }} @@ -421,6 +419,7 @@ jobs: fi extraBuildProperties="$extraBuildProperties /p:VerticalName=$(Agent.JobName)" + extraBuildProperties="$extraBuildProperties /p:ArtifactsStagingDir=$(artifactsStagingDir)" buildArgs="$(additionalBuildArgs) $customBuildArgs $extraBuildProperties" @@ -455,6 +454,7 @@ jobs: customPreBuildArgs='' customBuildArgs='' extraBuildProperties='' + customBuildArgs="--ci --prepareMachine -c ${{ parameters.configuration }}" if [[ '${{ parameters.runOnline }}' == 'False' ]]; then customPreBuildArgs="$customPreBuildArgs sudo" @@ -484,6 +484,7 @@ jobs: fi extraBuildProperties="$extraBuildProperties /p:VerticalName=$(Agent.JobName)" + extraBuildProperties="$extraBuildProperties /p:ArtifactsStagingDir=$(artifactsStagingDir)" if [[ -n "${{ parameters.extraProperties }}" ]]; then extraBuildProperties="$extraBuildProperties ${{ parameters.extraProperties }}" diff --git a/src/SourceBuild/content/Directory.Build.props b/src/SourceBuild/content/Directory.Build.props index 563f6f1e8bf5..e8b6663ffcd4 100644 --- a/src/SourceBuild/content/Directory.Build.props +++ b/src/SourceBuild/content/Directory.Build.props @@ -202,7 +202,6 @@ $(ArtifactsAssetManifestsDir)$([MSBuild]::ValueOrDefault('$(VerticalName)', 'VerticalManifest')).xml - $(ArtifactsDir)staging