58 строки
1.5 KiB
YAML
58 строки
1.5 KiB
YAML
parameters:
|
|
name: ""
|
|
platforms: ""
|
|
|
|
steps:
|
|
|
|
- task: AzureCLI@2
|
|
displayName: "Login"
|
|
inputs:
|
|
azureSubscription: $(ACR_ARM_SERVICE_CONNECTION)
|
|
scriptLocation: "inlineScript"
|
|
scriptType: "bash"
|
|
inlineScript: |
|
|
az acr login -n $(ACR)
|
|
|
|
- script: |
|
|
set -e
|
|
make ${{ parameters.name }}-manifest-build PLATFORMS="${{ parameters.platforms }}"
|
|
name: manifest_build
|
|
displayName: Manifest Build
|
|
retryCountOnTaskFailure: 3
|
|
|
|
- script: |
|
|
set -ex
|
|
echo "checking XDG_RUNTIME_DIR"
|
|
echo $XDG_RUNTIME_DIR
|
|
make ${{ parameters.name }}-manifest-push
|
|
mkdir -p $(Build.ArtifactStagingDirectory)/images
|
|
|
|
echo "setting XDG_RUNTIME_DIR"
|
|
export XDG_RUNTIME_DIR=/run/user/$(id -u)
|
|
echo $XDG_RUNTIME_DIR
|
|
|
|
make ${{ parameters.name }}-skopeo-archive IMAGE_ARCHIVE_DIR=$(Build.ArtifactStagingDirectory)/images
|
|
name: manifest_push
|
|
displayName: Manifest Push
|
|
retryCountOnTaskFailure: 3
|
|
|
|
- task: AzureCLI@2
|
|
displayName: "Logout"
|
|
inputs:
|
|
azureSubscription: $(ACR_ARM_SERVICE_CONNECTION)
|
|
scriptLocation: "inlineScript"
|
|
scriptType: "bash"
|
|
inlineScript: |
|
|
docker logout
|
|
|
|
- task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
|
|
displayName: "Add SBOM Generator tool"
|
|
inputs:
|
|
BuildDropPath: "$(Build.ArtifactStagingDirectory)"
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
inputs:
|
|
artifactName: "output"
|
|
pathtoPublish: "$(Build.ArtifactStagingDirectory)"
|
|
condition: succeeded()
|