ci(azure-pipelines): reuse parameters.service.dependsOn as identifier for required artifacts
This commit is contained in:
parent
0325bb7a63
commit
b2a9a3b4b4
15
.azure-pipelines/templates/steps/artifact-download.yml
Normal file
15
.azure-pipelines/templates/steps/artifact-download.yml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# SPDX-FileCopyrightText: 2025 Sarah Vaupel <sarah.vaupel@uniworx.de>
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
|
||||||
|
parameters:
|
||||||
|
- name: artifactName
|
||||||
|
type: string
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- task: DownloadPipelineArtifact@2
|
||||||
|
displayName: Download artifacts from ${{parameters.artifactName}}
|
||||||
|
inputs:
|
||||||
|
source: 'current'
|
||||||
|
artifactName: '${{parameters.artifactName}}'
|
||||||
|
targetPath: '$(Build.Repository.LocalPath)'
|
||||||
@ -104,6 +104,10 @@ stages:
|
|||||||
cacheIdent: '${{service.name}}-dependencies'
|
cacheIdent: '${{service.name}}-dependencies'
|
||||||
cacheKeys: '${{dependencyCache.key}}'
|
cacheKeys: '${{dependencyCache.key}}'
|
||||||
cachePath: '${{dependencyCache.path}}'
|
cachePath: '${{dependencyCache.path}}'
|
||||||
|
- ${{ each dependency in service.dependsOn }}:
|
||||||
|
- template: .azure-pipelines/templates/steps/artifact-download.yaml
|
||||||
|
parameters:
|
||||||
|
artifactName: '${{dependency}}'
|
||||||
- template: .azure-pipelines/templates/steps/make.yaml
|
- template: .azure-pipelines/templates/steps/make.yaml
|
||||||
parameters:
|
parameters:
|
||||||
makeJob: compile
|
makeJob: compile
|
||||||
@ -117,7 +121,7 @@ stages:
|
|||||||
displayName: Publish ${{service.name}} build artifacts
|
displayName: Publish ${{service.name}} build artifacts
|
||||||
inputs:
|
inputs:
|
||||||
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
|
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
|
||||||
ArtifactName: '${{service.name}}'
|
ArtifactName: 'Build_${{service.name}}'
|
||||||
publishLocation: 'Container'
|
publishLocation: 'Container'
|
||||||
|
|
||||||
# - stage: Test
|
# - stage: Test
|
||||||
|
|||||||
Reference in New Issue
Block a user