Skip to content

Commit

Permalink
Use Build.ArtifactStagingDirectory now that we run with native contai… (
Browse files Browse the repository at this point in the history
  • Loading branch information
ViktorHofer authored Dec 12, 2024
1 parent dcbb51f commit 7dc6613
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
11 changes: 6 additions & 5 deletions eng/pipelines/templates/jobs/vmr-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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 }}
Expand Down Expand Up @@ -421,6 +419,7 @@ jobs:
fi
extraBuildProperties="$extraBuildProperties /p:VerticalName=$(Agent.JobName)"
extraBuildProperties="$extraBuildProperties /p:ArtifactsStagingDir=$(artifactsStagingDir)"
buildArgs="$(additionalBuildArgs) $customBuildArgs $extraBuildProperties"
Expand Down Expand Up @@ -455,6 +454,7 @@ jobs:
customPreBuildArgs=''
customBuildArgs=''
extraBuildProperties=''
customBuildArgs="--ci --prepareMachine -c ${{ parameters.configuration }}"
if [[ '${{ parameters.runOnline }}' == 'False' ]]; then
customPreBuildArgs="$customPreBuildArgs sudo"
Expand Down Expand Up @@ -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 }}"
Expand Down
1 change: 0 additions & 1 deletion src/SourceBuild/content/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,6 @@
<PropertyGroup>
<!-- Respect the VerticalName property which is set to a unique identifier in CI. Otherwise default to 'VerticalManifest'. -->
<MergedAssetManifestOutputPath>$(ArtifactsAssetManifestsDir)$([MSBuild]::ValueOrDefault('$(VerticalName)', 'VerticalManifest')).xml</MergedAssetManifestOutputPath>
<ArtifactsStagingDir Condition="'$(ContinuousIntegrationBuild)' == 'true'">$(ArtifactsDir)staging</ArtifactsStagingDir>
</PropertyGroup>

</Project>

0 comments on commit 7dc6613

Please sign in to comment.