@@ -42,8 +42,6 @@ variables:
4242extends :
4343 template : v2/OneBranch.NonOfficial.CrossPlat.yml@templates
4444 parameters :
45- featureFlags :
46- runOnHost : true
4745 globalSdl :
4846 credscan :
4947 suppressionsFile : .config/CredScanSuppressions.json
@@ -57,7 +55,7 @@ extends:
5755 isCustom : true
5856 name : ${{ configuration.agentPool }}
5957 variables :
60- ob_artifactBaseName : $(toolchainArtifactNameBase)_${{ configuration.name }}
58+ ob_artifactBaseName : $(toolchainArtifactNameBase)_${{ configuration.name }}_$(System.JobAttempt)
6159 ob_outputDirectory : $(Build.ArtifactStagingDirectory)
6260 steps :
6361 - template : .pipelines/templates/RawToolchainDownload.yml@self
@@ -74,13 +72,17 @@ extends:
7472 # and make it available to the next stage via an output variable: 'CalculateToolchainPackageRetestList.toolchainPackageRetestList'
7573 - template : .pipelines/templates/ToolchainCalculatePackageRetests.yml@self
7674
75+ - script : echo "##vso[task.setvariable variable=toolchainArtifactName;isOutput=true]$(ob_artifactBaseName)"
76+ name : " ToolchainArtifactName"
77+ displayName : " Set variable for published artifact name"
78+
7779 # 1. Automatic publishing won't work if 'isCustom: true' is set on the pool. We cannot do 'isCustom: false' because
7880 # then OneBranch attempts to perform additional actions (adding build tags for instance), which require additional permissions
7981 # that the PR check pipeline does not have.
8082 # 2. The value for 'artifact' must equal $(ob_artifactBaseName), as this is the only value OneBranch accepts.
8183 - task : PublishPipelineArtifact@1
8284 inputs :
83- artifact : $(toolchainArtifactNameBase)_${{ configuration.name }}
85+ artifact : $(toolchainArtifactNameBase)_${{ configuration.name }}_$(System.JobAttempt)
8486 targetPath : $(ob_outputDirectory)
8587 condition : always()
8688 displayName : " Publish toolchain artifacts"
@@ -94,25 +96,31 @@ extends:
9496 isCustom : true
9597 name : ${{ configuration.agentPool }}
9698 variables :
97- ob_artifactBaseName : ${{ variables.rpmsArtifactNameBase }}_${{ configuration.name }}
99+ ob_artifactBaseName : ${{ variables.rpmsArtifactNameBase }}_${{ configuration.name }}_$(System.JobAttempt)
98100 ob_outputDirectory : $(Build.ArtifactStagingDirectory)
99101 testListFromToolchain : $[ stageDependencies.Toolchain_${{ configuration.name }}.Build.outputs['CalculateToolchainPackageRetestList.toolchainPackageRetestList'] ]
102+ toolchainArtifactName : $[ stageDependencies.Toolchain_${{ configuration.name }}.Build.outputs['ToolchainArtifactName.toolchainArtifactName'] ]
100103 steps :
101104 - template : .pipelines/templates/PackageBuild.yml@self
102105 parameters :
103- customToolchainArtifactName : $(toolchainArtifactNameBase)_${{ configuration.name }}
106+ customToolchainArtifactName : $(toolchainArtifactName)
104107 isCheckBuild : true
105108 isQuickRebuildPackages : true
109+ isUseCCache : true
106110 outputArtifactsFolder : $(ob_outputDirectory)
107111 maxCPU : " ${{ configuration.maxCPUs }}"
108112 pipArtifactFeeds : " mariner/Mariner-Pypi-Feed"
109113 selfRepoName : self
110114 testSuiteName : " [${{ configuration.name }}] Package test"
111115 testRerunList : " $(testListFromToolchain)"
112116
117+ - script : echo "##vso[task.setvariable variable=rpmsArtifactName;isOutput=true]$(ob_artifactBaseName)"
118+ name : " RPMsArtifactName"
119+ displayName : " Set variable for published artifact name"
120+
113121 - task : PublishPipelineArtifact@1
114122 inputs :
115- artifact : ${{ variables.rpmsArtifactNameBase }}_${{ configuration.name }}
123+ artifact : ${{ variables.rpmsArtifactNameBase }}_${{ configuration.name }}_$(System.JobAttempt)
116124 targetPath : $(ob_outputDirectory)
117125 condition : always()
118126 displayName : " Publish packages build artifacts"
@@ -125,7 +133,9 @@ extends:
125133 type : linux
126134 isCustom : true
127135 name : ${{ configuration.agentPool }}
136+ variables :
137+ rpmsArtifactName : $[ stageDependencies.RPMs_${{ configuration.name }}.BuildAndTest.outputs['RPMsArtifactName.rpmsArtifactName'] ]
128138 steps :
129139 - template : .pipelines/templatesWithCheckout/SodiffCheck.yml@self
130140 parameters :
131- inputArtifactName : ${{ variables.rpmsArtifactNameBase }}_${{ configuration.name }}
141+ inputArtifactName : $(rpmsArtifactName)
0 commit comments