55 - prebuild
66 variables :
77 ACN_DEVOPS_DIR : $(Build.SourcesDirectory)/azure-container-networking
8+
9+
10+
11+ IMAGE_REPO_PATH : $[ stageDependencies.setup.env.outputs['EnvironmentalVariables.imageRepositoryPath'] ]
12+
13+ AZURE_IPAM_VERSION : $[ stageDependencies.setup.env.outputs['EnvironmentalVariables.azureIpamVersion'] ]
14+ AZURE_IP_MASQ_MERGER_VERSION : $[ stageDependencies.setup.env.outputs['EnvironmentalVariables.azureIpMasqMergerVersion'] ]
15+ CNI_VERSION : $[ stageDependencies.setup.env.outputs['EnvironmentalVariables.cniVersion'] ]
16+ CNS_VERSION : $[ stageDependencies.setup.env.outputs['EnvironmentalVariables.cnsVersion'] ]
17+ IPV6_HP_BPF_VERSION : $[ stageDependencies.setup.env.outputs['EnvironmentalVariables.ipv6HpBpfVersion'] ]
18+ NPM_VERSION : $[ stageDependencies.setup.env.outputs['EnvironmentalVariables.npmVersion'] ]
19+
20+ IPAM_LINUX_AMD64_REF : $(IMAGE_REPO_PATH)/linux-amd64/azure-ipam:$(Build.BuildNumber)
21+ IPAM_LINUX_ARM64_REF : $(IMAGE_REPO_PATH)/linux-arm64/azure-ipam:$(Build.BuildNumber)
22+ IPAM_WINDOWS_AMD64_REF : $(IMAGE_REPO_PATH)/windows-amd64/azure-ipam:$(Build.BuildNumber)
23+
24+ IP_MASQ_MERGER_LINUX_AMD64_REF : $(IMAGE_REPO_PATH)/linux-amd64/azure-ip-masq-merger:$(Build.BuildNumber)
25+ IP_MASQ_MERGER_LINUX_ARM64_REF : $(IMAGE_REPO_PATH)/linux-arm64/azure-ip-masq-merger:$(Build.BuildNumber)
26+
27+ CNI_LINUX_AMD64_REF : $(IMAGE_REPO_PATH)/linux-amd64/cni:$(Build.BuildNumber)
28+ CNI_LINUX_ARM64_REF : $(IMAGE_REPO_PATH)/linux-arm64/cni:$(Build.BuildNumber)
29+ CNI_WINDOWS_AMD64_REF : $(IMAGE_REPO_PATH)/windows-amd64/cni:$(Build.BuildNumber)
30+
31+ CNS_LINUX_AMD64_REF : $(IMAGE_REPO_PATH)/linux-amd64/cns:$(Build.BuildNumber)
32+ CNS_LINUX_ARM64_REF : $(IMAGE_REPO_PATH)/linux-arm64/cns:$(Build.BuildNumber)
33+ CNS_WINDOWS_AMD64_REF : $(IMAGE_REPO_PATH)/windows-amd64/cns:$(Build.BuildNumber)
34+
35+ IPV6_LINUX_AMD64_REF : $(IMAGE_REPO_PATH)/linux-amd64/ipv6-hp-bpf:$(Build.BuildNumber)
36+ IPV6_LINUX_ARM64_REF : $(IMAGE_REPO_PATH)/linux-arm64/ipv6-hp-bpf:$(Build.BuildNumber)
37+
38+ NPM_LINUX_AMD64_REF : $(IMAGE_REPO_PATH)/linux-amd64/npm:$(Build.BuildNumber)
39+ NPM_LINUX_ARM64_REF : $(IMAGE_REPO_PATH)/linux-arm64/npm:$(Build.BuildNumber)
40+ NPM_WINDOWS_AMD64_REF : $(IMAGE_REPO_PATH)/windows-amd64/npm:$(Build.BuildNumber)
41+ acn-ref : $[ resources.repositories['azure-container-networking'].ref ]
842 jobs :
943 - job : copy
1044 displayName : Copy Pipeline Files
@@ -23,29 +57,33 @@ stages:
2357 inputs :
2458 sourceFolder : $(ACN_DEVOPS_DIR)/.pipelines
2559 targetFolder : $(Build.ArtifactStagingDirectory)/.pipelines
26- - script : |
27-
28- echo "------"
29- echo $(Build.QueuedBy)
30- echo $(Build.Reason) # manual, PR, IndividualCI
31- echo $(Build.SourceBranch)
32- echo $(resources.repositories.azure-container-networking.ref)
33- echo $(resources.repositories.acn-devops.ref)
34- echo $(resources.repositories.acn-devops.ref)
35- echo ${{ parameters.triggerBuildSourceBranch }}
36- echo ${{ parameters.triggerBuildReason }}
37- echo ${{ parameters.triggerBuildGitRef }}
38- echo ${{ parameters.triggerBuildQueuedBy }}
39- echo $(test-acndevops)
40- echo $(test-acn)
41-
42-
43-
44- name: "EnvironmentalVariables"
45- displayName: "Set environmental variables"
46- - ${{ if contains( parameters.triggerBuildSourceBranch , 'v') }} :
47- - script : echo "This is a release branch"
48- displayName : " Release Branch Processing"
60+
61+ - template : /.pipelines/build/images.jobs.yaml@acn-devops
62+ parameters :
63+ images :
64+ - job : linux_amd64
65+ displayName : " Linux/AMD64"
66+ templateContext :
67+ repositoryArtifact : drop_setup_env_source
68+ buildScript : .pipelines/build/scripts/$(name).sh
69+ obDockerfile : .pipelines/build/dockerfiles/$(name).Dockerfile
70+ strategy :
71+ maxParallel : 5
72+ matrix :
73+ azure_ipam :
74+ name : azure-ipam
75+ extraArgs : ' '
76+ archiveName : azure-ipam
77+ archiveVersion : $(AZURE_IPAM_VERSION)
78+ imageTag : $(Build.BuildNumber)
79+ packageWithDropGZ : True
80+ azure_ip_masq_merger :
81+ name : azure-ip-masq-merger
82+ extraArgs : ' '
83+ archiveName : azure-ip-masq-merger
84+ archiveVersion : $(AZURE_IP_MASQ_MERGER_VERSION)
85+ imageTag : $(Build.BuildNumber)
86+ condition : contains( variables['acn-ref'] , 'v1.7')
4987
5088 - job : env
5189 displayName : Setup
@@ -91,20 +129,9 @@ stages:
91129 CNS_VERSION : $[ stageDependencies.setup.env.outputs['EnvironmentalVariables.cnsVersion'] ]
92130 IPV6_HP_BPF_VERSION : $[ stageDependencies.setup.env.outputs['EnvironmentalVariables.ipv6HpBpfVersion'] ]
93131 NPM_VERSION : $[ stageDependencies.setup.env.outputs['EnvironmentalVariables.npmVersion'] ]
94- jobs :
95- - job : dummy
96- displayName : dummy
97- pool :
98- type : linux
99- variables :
100- ob_outputDirectory : $(Build.ArtifactStagingDirectory)
101- ob_git_checkout : true
102- steps :
103- - script : |
104- echo "This is a dummy job to ensure the build stage runs."
105- displayName: "Dummy Job"
106132
107- - ${{ if contains(variables['resources.repositories.azure-container-networking.ref'], 'v1.7') }} :
133+ acn-ref : $[ resources.repositories['azure-container-networking'].ref ]
134+ jobs :
108135 - template : /.pipelines/build/images.jobs.yaml@acn-devops
109136 parameters :
110137 images :
@@ -130,118 +157,7 @@ stages:
130157 archiveName : azure-ip-masq-merger
131158 archiveVersion : $(AZURE_IP_MASQ_MERGER_VERSION)
132159 imageTag : $(Build.BuildNumber)
133- cni :
134- name : cni
135- extraArgs : ' --build-arg CNI_AI_PATH=$(CNI_AI_PATH) --build-arg CNI_AI_ID=$(CNI_AI_ID)'
136- archiveName : azure-cni
137- archiveVersion : $(CNI_VERSION)
138- imageTag : $(Build.BuildNumber)
139- packageWithDropGZ : True
140- cns :
141- name : cns
142- extraArgs : ' --build-arg CNS_AI_PATH=$(CNS_AI_PATH) --build-arg CNS_AI_ID=$(CNS_AI_ID)'
143- archiveName : azure-cns
144- archiveVersion : $(CNS_VERSION)
145- imageTag : $(Build.BuildNumber)
146- ipv6_hp_bpf :
147- name : ipv6-hp-bpf
148- extraArgs : " --build-arg DEBUG=$(System.Debug)"
149- archiveName : ipv6-hp-bpf
150- archiveVersion : $(IPV6_HP_BPF_VERSION)
151- imageTag : $(Build.BuildNumber)
152-
153- - job : windows_amd64
154- displayName : " Windows"
155- templateContext :
156- repositoryArtifact : drop_setup_env_source
157- buildScript : .pipelines/build/scripts/$(name).sh
158- obDockerfile : .pipelines/build/dockerfiles/$(name).Dockerfile
159- strategy :
160- maxParallel : 5
161- matrix :
162- azure_ipam :
163- name : azure-ipam
164- extraArgs : ' '
165- archiveName : azure-ipam
166- archiveVersion : $(AZURE_IPAM_VERSION)
167- imageTag : $(Build.BuildNumber)
168- packageWithDropGZ : True
169- cni :
170- name : cni
171- extraArgs : ' --build-arg CNI_AI_PATH=$(CNI_AI_PATH) --build-arg CNI_AI_ID=$(CNI_AI_ID)'
172- archiveName : azure-cni
173- archiveVersion : $(CNI_VERSION)
174- imageTag : $(Build.BuildNumber)
175- packageWithDropGZ : True
176- cns :
177- name : cns
178- extraArgs : ' --build-arg CNS_AI_PATH=$(CNS_AI_PATH) --build-arg CNS_AI_ID=$(CNS_AI_ID)'
179- archiveName : azure-cns
180- archiveVersion : $(CNS_VERSION)
181- imageTag : $(Build.BuildNumber)
182-
183- - job : linux_arm64
184- displayName : " Linux/ARM64"
185- templateContext :
186- repositoryArtifact : drop_setup_env_source
187- buildScript : .pipelines/build/scripts/$(name).sh
188- obDockerfile : .pipelines/build/dockerfiles/$(name).Dockerfile
189- strategy :
190- maxParallel : 3
191- matrix :
192- azure_ipam :
193- name : azure-ipam
194- archiveName : azure-ipam
195- archiveVersion : $(AZURE_IPAM_VERSION)
196- extraArgs : ' '
197- imageTag : $(Build.BuildNumber)
198- packageWithDropGZ : True
199- azure_ip_masq_merger :
200- name : azure-ip-masq-merger
201- extraArgs : ' '
202- archiveName : azure-ip-masq-merger
203- archiveVersion : $(AZURE_IP_MASQ_MERGER_VERSION)
204- imageTag : $(Build.BuildNumber)
205- cni :
206- name : cni
207- extraArgs : ' --build-arg CNI_AI_PATH=$(CNI_AI_PATH) --build-arg CNI_AI_ID=$(CNI_AI_ID)'
208- archiveName : azure-cni
209- archiveVersion : $(CNI_VERSION)
210- imageTag : $(Build.BuildNumber)
211- packageWithDropGZ : True
212- cns :
213- name : cns
214- extraArgs : ' --build-arg CNS_AI_PATH=$(CNS_AI_PATH) --build-arg CNS_AI_ID=$(CNS_AI_ID)'
215- archiveName : azure-cns
216- archiveVersion : $(CNS_VERSION)
217- imageTag : $(Build.BuildNumber)
218- ipv6_hp_bpf :
219- name : ipv6-hp-bpf
220- extraArgs : " --build-arg DEBUG=$(System.Debug)"
221- archiveName : ipv6-hp-bpf
222- archiveVersion : $(IPV6_HP_BPF_VERSION)
223- imageTag : $(Build.BuildNumber)
224-
225- - ${{ if or(contains(variables['resources.repositories.azure-container-networking.ref'], 'v1.6'), contains(variables['resources.repositories.azure-container-networking.ref'], 'v1.5'))}} :
226- - template : /.pipelines/build/images.jobs.yaml@acn-devops
227- parameters :
228- images :
229- - job : linux_amd64
230- displayName : " Linux/AMD64"
231- templateContext :
232- repositoryArtifact : drop_setup_env_source
233- buildScript : .pipelines/build/scripts/$(name).sh
234- obDockerfile : .pipelines/build/dockerfiles/$(name).Dockerfile
235- strategy :
236- maxParallel : 5
237- matrix :
238- azure_ipam :
239- name : azure-ipam
240- extraArgs : ' '
241- archiveName : azure-ipam
242- archiveVersion : $(AZURE_IPAM_VERSION)
243- imageTag : $(Build.BuildNumber)
244- packageWithDropGZ : True
160+ condition : contains( variables['acn-ref'] , 'v1.7')
245161 cni :
246162 name : cni
247163 extraArgs : ' --build-arg CNI_AI_PATH=$(CNI_AI_PATH) --build-arg CNI_AI_ID=$(CNI_AI_ID)'
@@ -267,6 +183,7 @@ stages:
267183 archiveName : azure-npm
268184 archiveVersion : $(NPM_VERSION)
269185 imageTag : $(Build.BuildNumber)
186+ condition : contains( variables['acn-ref'] , 'v1.6')
270187
271188 - job : windows_amd64
272189 displayName : " Windows"
@@ -303,6 +220,7 @@ stages:
303220 archiveName : azure-npm
304221 archiveVersion : $(NPM_VERSION)
305222 imageTag : $(Build.BuildNumber)
223+ condition : contains( variables['acn-ref'] , 'v1.6')
306224
307225 - job : linux_arm64
308226 displayName : " Linux/ARM64"
@@ -320,6 +238,13 @@ stages:
320238 extraArgs : ' '
321239 imageTag : $(Build.BuildNumber)
322240 packageWithDropGZ : True
241+ azure_ip_masq_merger :
242+ name : azure-ip-masq-merger
243+ extraArgs : ' '
244+ archiveName : azure-ip-masq-merger
245+ archiveVersion : $(AZURE_IP_MASQ_MERGER_VERSION)
246+ imageTag : $(Build.BuildNumber)
247+ condition : contains( variables['acn-ref'] , 'v1.7')
323248 cni :
324249 name : cni
325250 extraArgs : ' --build-arg CNI_AI_PATH=$(CNI_AI_PATH) --build-arg CNI_AI_ID=$(CNI_AI_ID)'
@@ -345,6 +270,7 @@ stages:
345270 archiveName : azure-npm
346271 archiveVersion : $(NPM_VERSION)
347272 imageTag : $(Build.BuildNumber)
273+ condition : contains( variables['acn-ref'] , 'v1.6')
348274
349275- ${{ if not(contains(variables['Build.SourceBranch'], 'refs/pull')) }} :
350276 - stage : manifests
@@ -383,6 +309,7 @@ stages:
383309 NPM_LINUX_AMD64_REF : $(IMAGE_REPO_PATH)/linux-amd64/npm:$(Build.BuildNumber)
384310 NPM_LINUX_ARM64_REF : $(IMAGE_REPO_PATH)/linux-arm64/npm:$(Build.BuildNumber)
385311 NPM_WINDOWS_AMD64_REF : $(IMAGE_REPO_PATH)/windows-amd64/npm:$(Build.BuildNumber)
312+ acn-ref : $[ resources.repositories['azure-container-networking'].ref ]
386313 jobs :
387314
388315 - template : build/manifests.jobs.yaml@acn-devops
0 commit comments