Skip to content

Commit

Permalink
Enabled ccache and artifact suffixes for fast-track PR check (#8503)
Browse files Browse the repository at this point in the history
  • Loading branch information
PawelWMS committed Sep 9, 2024
1 parent 115c5e3 commit 7b9ff2d
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions .pipelines/prchecks/PackageBuildPRCheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ extends:
isCustom: true
name: ${{ configuration.agentPool }}
variables:
ob_artifactBaseName: $(toolchainArtifactNameBase)_${{ configuration.name }}
ob_artifactBaseName: $(toolchainArtifactNameBase)_${{ configuration.name }}_$(System.JobAttempt)
ob_outputDirectory: $(Build.ArtifactStagingDirectory)
steps:
- template: .pipelines/templates/RawToolchainDownload.yml@self
Expand All @@ -75,13 +75,17 @@ extends:
# and make it available to the next stage via an output variable: 'CalculateToolchainPackageRetestList.toolchainPackageRetestList'
- template: .pipelines/templates/ToolchainCalculatePackageRetests.yml@self

- script: echo "##vso[task.setvariable variable=toolchainArtifactName;isOutput=true]$(ob_artifactBaseName)"
name: "ToolchainArtifactName"
displayName: "Set variable for published artifact name"

# 1. Automatic publishing won't work if 'isCustom: true' is set on the pool. We cannot do 'isCustom: false' because
# then OneBranch attempts to perform additional actions (adding build tags for instance), which require additional permissions
# that the PR check pipeline does not have.
# 2. The value for 'artifact' must equal $(ob_artifactBaseName), as this is the only value OneBranch accepts.
- task: PublishPipelineArtifact@1
inputs:
artifact: $(toolchainArtifactNameBase)_${{ configuration.name }}
artifact: $(toolchainArtifactNameBase)_${{ configuration.name }}_$(System.JobAttempt)
targetPath: $(ob_outputDirectory)
condition: always()
displayName: "Publish toolchain artifacts"
Expand All @@ -95,25 +99,31 @@ extends:
isCustom: true
name: ${{ configuration.agentPool }}
variables:
ob_artifactBaseName: ${{ variables.rpmsArtifactNameBase }}_${{ configuration.name }}
ob_artifactBaseName: ${{ variables.rpmsArtifactNameBase }}_${{ configuration.name }}_$(System.JobAttempt)
ob_outputDirectory: $(Build.ArtifactStagingDirectory)
testListFromToolchain: $[ stageDependencies.Toolchain_${{ configuration.name }}.Build.outputs['CalculateToolchainPackageRetestList.toolchainPackageRetestList'] ]
toolchainArtifactName: $[ stageDependencies.Toolchain_${{ configuration.name }}.Build.outputs['ToolchainArtifactName.toolchainArtifactName'] ]
steps:
- template: .pipelines/templates/PackageBuild.yml@self
parameters:
customToolchainArtifactName: $(toolchainArtifactNameBase)_${{ configuration.name }}
customToolchainArtifactName: $(toolchainArtifactName)
isCheckBuild: true
isQuickRebuildPackages: true
isUseCCache: true
outputArtifactsFolder: $(ob_outputDirectory)
maxCPU: "${{ configuration.maxCPUs }}"
pipArtifactFeeds: "mariner/Mariner-Pypi-Feed"
selfRepoName: self
testSuiteName: "[${{ configuration.name }}] Package test"
testRerunList: "$(testListFromToolchain)"

- script: echo "##vso[task.setvariable variable=rpmsArtifactName;isOutput=true]$(ob_artifactBaseName)"
name: "RPMsArtifactName"
displayName: "Set variable for published artifact name"

- task: PublishPipelineArtifact@1
inputs:
artifact: ${{ variables.rpmsArtifactNameBase }}_${{ configuration.name }}
artifact: ${{ variables.rpmsArtifactNameBase }}_${{ configuration.name }}_$(System.JobAttempt)
targetPath: $(ob_outputDirectory)
condition: always()
displayName: "Publish packages build artifacts"
Expand All @@ -126,7 +136,9 @@ extends:
type: linux
isCustom: true
name: ${{ configuration.agentPool }}
variables:
rpmsArtifactName: $[ stageDependencies.RPMs_${{ configuration.name }}.BuildAndTest.outputs['RPMsArtifactName.rpmsArtifactName'] ]
steps:
- template: .pipelines/templatesWithCheckout/SodiffCheck.yml@self
parameters:
inputArtifactName: ${{ variables.rpmsArtifactNameBase }}_${{ configuration.name }}
inputArtifactName: $(rpmsArtifactName)

0 comments on commit 7b9ff2d

Please sign in to comment.