Skip to content

Commit 4281639

Browse files
author
Sheyla Trudo
committed
fixup! Separate Build Changes
1 parent e833ff4 commit 4281639

File tree

2 files changed

+43
-44
lines changed

2 files changed

+43
-44
lines changed

.pipelines/containers/container-template.jobs.yaml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ parameters:
1616

1717
jobs:
1818
- ${{ each job in parameters.jobs }}:
19-
- ${{ each image in job.templateContext.images }}:
20-
- job: ${{ replace(image, '-', '_') }}_${{ job.templateContext.os }}_${{ job.templateContext.arch }}
21-
displayName: Build Image - (${{ image }} ${{ job.templateContext.os }}/${{ job.templateContext.arch }})
19+
- ${{ each image in parameters.images }}:
20+
- job: ${{ replace(image, '-', '_') }}_${{ parameters.os }}_${{ parameters.arch }}
21+
displayName: Build Image - (${{ image }} ${{ parameters.os }}/${{ parameters.arch }})
2222
steps:
2323
- checkout: self
2424

@@ -48,9 +48,9 @@ jobs:
4848
displayName: "Get Image Build Data"
4949
env:
5050
IMAGE: ${{ image }}
51-
OS: ${{ job.templateContext.os }}
52-
ARCH: ${{ job.templateContext.arch }}
53-
PLATFORM: ${{ job.templateContext.os }}/${{ job.templateContext.arch }}
51+
OS: ${{ parameters.os }}
52+
ARCH: ${{ parameters.arch }}
53+
PLATFORM: ${{ parameters.os }}/${{ parameters.arch }}
5454
MAKE_IMAGE_TAG: ${{ image }}-image-tag
5555
MAKE_BUILD_CONTEXT: ${{ image }}-image-build-context
5656
MAKE_IMAGE_NAME_AND_TAG: ${{ image }}-image-name-and-tag
@@ -59,14 +59,14 @@ jobs:
5959

6060
- template: ./container-template.steps.yaml
6161
parameters:
62-
imageNameAndTag: $(IMAGE_NAME_AND_TAG_${{ image }}_${{ job.templateContext.os }}_${{ job.templateContext.arch }})
63-
dockerfilePath: $(DOCKERFILE_PATH_${{ image }}_${{ job.templateContext.os }}_${{ job.templateContext.arch }})
62+
imageNameAndTag: $(IMAGE_NAME_AND_TAG_${{ image }}_${{ parameters.os }}_${{ parameters.arch }})
63+
dockerfilePath: $(DOCKERFILE_PATH_${{ image }}_${{ parameters.os }}_${{ parameters.arch }})
6464
buildContextPath: $(Build.SourcesDirectory)
65-
targetVersion: $(IMAGE_PLATFORM_TAG_${{ image }}_${{ job.templateContext.os }}_${{ job.templateContext.arch }})
66-
targetOs: ${{ job.templateContext.os }}
67-
targetArch: ${{ job.templateContext.arch }}
68-
targetPlatform: "${{ job.templateContext.os }}/${{ job.templateContext.arch }}"
69-
addBuildArgs: $(EXTRA_BUILD_ARGS_${{ image }}_${{ job.templateContext.os }}_${{ job.templateContext.arch }})
65+
targetVersion: $(IMAGE_PLATFORM_TAG_${{ image }}_${{ parameters.os }}_${{ parameters.arch }})
66+
targetOs: ${{ parameters.os }}
67+
targetArch: ${{ parameters.arch }}
68+
targetPlatform: "${{ parameters.os }}/${{ parameters.arch }}"
69+
addBuildArgs: $(EXTRA_BUILD_ARGS_${{ image }}_${{ parameters.os }}_${{ parameters.arch }})
7070
buildOs: ${{ job.templatContext.buildOs }}
7171
buildArch: ${{ job.templateContext.buildArch }}
7272
buildPlatform: "${{ job.templatContext.buildOs }}/${{ job.templateContext.buildArch }}"

.pipelines/run-pipeline.yaml

Lines changed: 30 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -79,37 +79,36 @@ stages:
7979
buildPlatform: linux/amd64
8080
authenticatedContainerRegistries:
8181
- serviceConnection: $(ACR_SERVICECONNECTION)
82-
parameters:
83-
jobs:
84-
- template: containers/container-template.jobs.yaml
85-
templateContext:
86-
arch: amd64
87-
os: linux
88-
images:
89-
- azure-ipam
90-
- cni
91-
- cns
92-
- ipv6-hp-bpf
93-
- npm
94-
- template: containers/container-template.jobs.yaml
95-
templateContext:
96-
arch: arm64
97-
os: linux
98-
images:
99-
- azure-ipam
100-
- cni
101-
- cns
102-
- ipv6-hp-bpf
103-
- npm
104-
- template: containers/container-template.jobs.yaml
105-
templateContext:
106-
arch: amd64
107-
os: windows
108-
images:
109-
- azure-ipam
110-
- cni
111-
- cns
112-
- npm
82+
jobs:
83+
- template: containers/container-template.jobs.yaml
84+
parameters:
85+
arch: amd64
86+
os: linux
87+
images:
88+
- azure-ipam
89+
- cni
90+
- cns
91+
- ipv6-hp-bpf
92+
- npm
93+
- template: containers/container-template.jobs.yaml
94+
parameters:
95+
arch: arm64
96+
os: linux
97+
images:
98+
- azure-ipam
99+
- cni
100+
- cns
101+
- ipv6-hp-bpf
102+
- npm
103+
- template: containers/container-template.jobs.yaml
104+
parameters:
105+
arch: amd64
106+
os: windows
107+
images:
108+
- azure-ipam
109+
- cni
110+
- cns
111+
- npm
113112

114113

115114
- stage: publish

0 commit comments

Comments
 (0)