Skip to content

Commit

Permalink
fixup! Separate Build Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Sheyla Trudo committed Nov 24, 2024
1 parent e833ff4 commit 4281639
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 44 deletions.
26 changes: 13 additions & 13 deletions .pipelines/containers/container-template.jobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ parameters:

jobs:
- ${{ each job in parameters.jobs }}:
- ${{ each image in job.templateContext.images }}:
- job: ${{ replace(image, '-', '_') }}_${{ job.templateContext.os }}_${{ job.templateContext.arch }}
displayName: Build Image - (${{ image }} ${{ job.templateContext.os }}/${{ job.templateContext.arch }})
- ${{ each image in parameters.images }}:
- job: ${{ replace(image, '-', '_') }}_${{ parameters.os }}_${{ parameters.arch }}
displayName: Build Image - (${{ image }} ${{ parameters.os }}/${{ parameters.arch }})
steps:
- checkout: self

Expand Down Expand Up @@ -48,9 +48,9 @@ jobs:
displayName: "Get Image Build Data"
env:
IMAGE: ${{ image }}
OS: ${{ job.templateContext.os }}
ARCH: ${{ job.templateContext.arch }}
PLATFORM: ${{ job.templateContext.os }}/${{ job.templateContext.arch }}
OS: ${{ parameters.os }}
ARCH: ${{ parameters.arch }}
PLATFORM: ${{ parameters.os }}/${{ parameters.arch }}
MAKE_IMAGE_TAG: ${{ image }}-image-tag
MAKE_BUILD_CONTEXT: ${{ image }}-image-build-context
MAKE_IMAGE_NAME_AND_TAG: ${{ image }}-image-name-and-tag
Expand All @@ -59,14 +59,14 @@ jobs:

- template: ./container-template.steps.yaml
parameters:
imageNameAndTag: $(IMAGE_NAME_AND_TAG_${{ image }}_${{ job.templateContext.os }}_${{ job.templateContext.arch }})
dockerfilePath: $(DOCKERFILE_PATH_${{ image }}_${{ job.templateContext.os }}_${{ job.templateContext.arch }})
imageNameAndTag: $(IMAGE_NAME_AND_TAG_${{ image }}_${{ parameters.os }}_${{ parameters.arch }})
dockerfilePath: $(DOCKERFILE_PATH_${{ image }}_${{ parameters.os }}_${{ parameters.arch }})
buildContextPath: $(Build.SourcesDirectory)
targetVersion: $(IMAGE_PLATFORM_TAG_${{ image }}_${{ job.templateContext.os }}_${{ job.templateContext.arch }})
targetOs: ${{ job.templateContext.os }}
targetArch: ${{ job.templateContext.arch }}
targetPlatform: "${{ job.templateContext.os }}/${{ job.templateContext.arch }}"
addBuildArgs: $(EXTRA_BUILD_ARGS_${{ image }}_${{ job.templateContext.os }}_${{ job.templateContext.arch }})
targetVersion: $(IMAGE_PLATFORM_TAG_${{ image }}_${{ parameters.os }}_${{ parameters.arch }})
targetOs: ${{ parameters.os }}
targetArch: ${{ parameters.arch }}
targetPlatform: "${{ parameters.os }}/${{ parameters.arch }}"
addBuildArgs: $(EXTRA_BUILD_ARGS_${{ image }}_${{ parameters.os }}_${{ parameters.arch }})
buildOs: ${{ job.templatContext.buildOs }}
buildArch: ${{ job.templateContext.buildArch }}
buildPlatform: "${{ job.templatContext.buildOs }}/${{ job.templateContext.buildArch }}"
61 changes: 30 additions & 31 deletions .pipelines/run-pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,37 +79,36 @@ stages:
buildPlatform: linux/amd64
authenticatedContainerRegistries:
- serviceConnection: $(ACR_SERVICECONNECTION)
parameters:
jobs:
- template: containers/container-template.jobs.yaml
templateContext:
arch: amd64
os: linux
images:
- azure-ipam
- cni
- cns
- ipv6-hp-bpf
- npm
- template: containers/container-template.jobs.yaml
templateContext:
arch: arm64
os: linux
images:
- azure-ipam
- cni
- cns
- ipv6-hp-bpf
- npm
- template: containers/container-template.jobs.yaml
templateContext:
arch: amd64
os: windows
images:
- azure-ipam
- cni
- cns
- npm
jobs:
- template: containers/container-template.jobs.yaml
parameters:
arch: amd64
os: linux
images:
- azure-ipam
- cni
- cns
- ipv6-hp-bpf
- npm
- template: containers/container-template.jobs.yaml
parameters:
arch: arm64
os: linux
images:
- azure-ipam
- cni
- cns
- ipv6-hp-bpf
- npm
- template: containers/container-template.jobs.yaml
parameters:
arch: amd64
os: windows
images:
- azure-ipam
- cni
- cns
- npm


- stage: publish
Expand Down

0 comments on commit 4281639

Please sign in to comment.