Skip to content

Commit

Permalink
Enabled ccache and set ptest retries to 1 for PR checks (CP: #8503, #…
Browse files Browse the repository at this point in the history
…10133) (#10392)

(cherry picked from commit f97819a)
  • Loading branch information
PawelWMS authored and CBL-Mariner-Bot committed Sep 9, 2024
1 parent 9852ee4 commit d38570c
Showing 1 changed file with 24 additions and 5 deletions.
29 changes: 24 additions & 5 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,26 +99,39 @@ 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:
checkBuildRetries: "1"
<<<<<<< HEAD
customToolchainArtifactName: $(toolchainArtifactNameBase)_${{ configuration.name }}
=======
customToolchainArtifactName: $(toolchainArtifactName)
>>>>>>> f97819a09 (Enabled ccache and set ptest retries to 1 for PR checks (CP: #8503, #10133) (#10392))
isCheckBuild: true
isQuickRebuildPackages: true
isUseCCache: true
outputArtifactsFolder: $(ob_outputDirectory)
maxCPU: "${{ configuration.maxCPUs }}"
pipArtifactFeeds: "mariner/Mariner-Pypi-Feed"
selfRepoName: self
testRerunList: "$(testListFromToolchain)"
testSuiteName: "[${{ configuration.name }}] Package test"
<<<<<<< HEAD
=======

- script: echo "##vso[task.setvariable variable=rpmsArtifactName;isOutput=true]$(ob_artifactBaseName)"
name: "RPMsArtifactName"
displayName: "Set variable for published artifact name"
>>>>>>> f97819a09 (Enabled ccache and set ptest retries to 1 for PR checks (CP: #8503, #10133) (#10392))

- 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 @@ -127,7 +144,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 d38570c

Please sign in to comment.