blob: fc51712806b1ea687728adc3fffdc237c71ad526 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
# Must include uhd-pipeline-vars.yml in top line pipeline to include this template
# Reads and sets uhd docker builder information to variables
# dockerBuildNumber, dockerImagePrefix, dockerImageMatrix
# Reference the data by calling:
# $[ dependencies.get_latest_uhd_docker.outputs['setDockerVar.dockerBuildNumber'] ]
# $[ dependencies.get_latest_uhd_docker.outputs['setDockerVar.dockerImagePrefix'] ]
# $[ dependencies.get_latest_uhd_docker.outputs['setDockerVar.dockerImageMatrixLin'] ]
# $[ dependencies.get_latest_uhd_docker.outputs['setDockerVar.dockerImageMatrixWin'] ]
# $[ dependencies.get_latest_uhd_docker.outputs['setDockerVar.dockerImageMatrixUbuntuDeb'] ]
# $[ dependencies.get_latest_uhd_docker.outputs['setDockerVar.macOSBuilders'] ]
# $[ dependencies.get_latest_uhd_docker.outputs['setDockerVar.dockerImageMatrixSourcePackageBuilders'] ]
# $[ dependencies.get_latest_uhd_docker.outputs['setDockerVar.dockerImageMatrixFedoraRpm'] ]
jobs:
- job: get_latest_uhd_docker
displayName: Get Last Docker Build Version
pool:
name: Drivers-NIBuildFarm-RFMIBUILD
demands: sh
steps:
- checkout: none
- download: uhd_build_docker_container
displayName: Download Docker Image List
# The following script pulls each line from the DockerImageNames
# file and variablizes them in the AzDO Pipeline Context.
# sed '1q;d' pulls the first line, sed '2q;d' pulls the second, etc.
- script: |
cd $(Pipeline.Workspace)/uhd_build_docker_container/
docker_build_number=$(sed '1q;d' $(UHDPipelineDockerImageArtifactName)/$(UHDPipelineDockerImageArtifactName))
docker_image_prefix=$(sed '2q;d' $(UHDPipelineDockerImageArtifactName)/$(UHDPipelineDockerImageArtifactName))
docker_image_matrix_lin=$(sed '3q;d' $(UHDPipelineDockerImageArtifactName)/$(UHDPipelineDockerImageArtifactName))
docker_image_matrix_win=$(sed '4q;d' $(UHDPipelineDockerImageArtifactName)/$(UHDPipelineDockerImageArtifactName))
docker_image_matrix_ubuntu_deb=$(sed '5q;d' $(UHDPipelineDockerImageArtifactName)/$(UHDPipelineDockerImageArtifactName))
macos_builders=$(sed '6q;d' $(UHDPipelineDockerImageArtifactName)/$(UHDPipelineDockerImageArtifactName))
docker_image_matrix_source_package=$(sed '7q;d' $(UHDPipelineDockerImageArtifactName)/$(UHDPipelineDockerImageArtifactName))
docker_image_matrix_fedora_rpm=$(sed '8q;d' $(UHDPipelineDockerImageArtifactName)/$(UHDPipelineDockerImageArtifactName))
echo "##vso[task.setvariable variable=dockerBuildNumber;isOutput=true;]$docker_build_number"
echo "##vso[task.setvariable variable=dockerImagePrefix;isOutput=true;]$docker_image_prefix"
echo "##vso[task.setvariable variable=dockerImageMatrixLin;isOutput=true;]$docker_image_matrix_lin"
echo "##vso[task.setvariable variable=dockerImageMatrixWin;isOutput=true;]$docker_image_matrix_win"
echo "##vso[task.setvariable variable=dockerImageMatrixUbuntuDeb;isOutput=true;]$docker_image_matrix_ubuntu_deb"
echo "##vso[task.setvariable variable=macOSBuilders;isOutput=true;]$macos_builders"
echo "##vso[task.setvariable variable=dockerImageMatrixSourcePackageBuilders;isOutput=true;]$docker_image_matrix_source_package"
echo "##vso[task.setvariable variable=dockerImageMatrixFedoraRpm;isOutput=true;]$docker_image_matrix_fedora_rpm"
name: setDockerVar
- script: |
echo "Docker Build Number: "
echo $(setDockerVar.dockerBuildNumber)
echo $(setDockerVar.dockerImagePrefix)
echo $(setDockerVar.dockerImageMatrixLin)
echo $(setDockerVar.dockerImageMatrixWin)
echo $(setDockerVar.dockerImageMatrixUbuntuDeb)
echo $(setDockerVar.macOSBuilders)
echo $(setDockerVar.dockerImageMatrixSourcePackageBuilders)
echo $(setDockerVar.dockerImageMatrixFedoraRpm)
name: echoDockerVar
|