Skip to content

Commit 841e234

Browse files
author
Sheyla Trudo
committed
fixup! Separate Build Changes
1 parent 659e896 commit 841e234

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
parameters:
2+
- name: targetOs
3+
type: string
4+
values:
5+
- linux
6+
- windows
7+
8+
- name: targetArch
9+
type: string
10+
values:
11+
- amd64
12+
- arm64
13+
14+
- name: image
15+
type: string
16+
values:
17+
- azure-ipam
18+
- cni
19+
- cns
20+
- ipv6-hp-bpf
21+
- npm
22+
23+
24+
steps:
25+
- bash: |
26+
set -e
27+
28+
VAR_ID="${IMAGE}_${OS}_${ARCH}"
29+
30+
BUILD_CONTEXT=$(make "$MAKE_BUILD_CONTEXT")
31+
echo >&2 "##vso[task.setvariable variable=BUILD_CONTEXT_${VAR_ID};]$BUILD_CONTEXT"
32+
33+
IMAGE_PLATFORM_TAG=$(make "$MAKE_IMAGE_TAG")
34+
echo >&2 "##vso[task.setvariable variable=IMAGE_PLATFORM_TAG_${VAR_ID};]$IMAGE_PLATFORM_TAG"
35+
36+
IMAGE_NAME_AND_TAG=$(make "$MAKE_IMAGE_NAME_AND_TAG")
37+
echo >&2 "##vso[task.setvariable variable=IMAGE_NAME_AND_TAG_${VAR_ID};]$IMAGE_NAME_AND_TAG"
38+
39+
DOCKERFILE_PATH=$(make "$MAKE_DOCKERFILE_PATH")
40+
echo >&2 "##vso[task.setvariable variable=DOCKERFILE_PATH_${VAR_ID};]$DOCKERFILE_PATH"
41+
42+
EXTRA_BUILD_ARGS=$(make "$MAKE_EXTRA_BUILD_ARGS")
43+
echo >&2 "##vso[task.setvariable variable=EXTRA_BUILD_ARGS_${VAR_ID};]$EXTRA_BUILD_ARGS"
44+
displayName: "Get Image Build Data"
45+
env:
46+
IMAGE: ${{ parameters.image }}
47+
OS: ${{ parameters.targetOs }}
48+
ARCH: ${{ parameters.targetArch }}
49+
PLATFORM: ${{ parameters.targetOs }}/${{ parameters.targetArch }}
50+
MAKE_IMAGE_TAG: ${{ parameters.image }}-image-tag
51+
MAKE_BUILD_CONTEXT: ${{ parameters.image }}-image-build-context
52+
MAKE_IMAGE_NAME_AND_TAG: ${{ parameters.image }}-image-name-and-tag
53+
MAKE_DOCKERFILE_PATH: ${{ parameters.image }}-dockerfile-path
54+
MAKE_EXTRA_BUILD_ARGS: ${{ parameters.image }}-docker-build-args
55+

0 commit comments

Comments
 (0)