Skip to content

Commit 2d31ab4

Browse files
author
Sheyla Trudo
committed
fixup! Separate Build Changes
1 parent c5613d2 commit 2d31ab4

File tree

2 files changed

+48
-34
lines changed

2 files changed

+48
-34
lines changed

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

Lines changed: 46 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -8,41 +8,55 @@ parameters:
88
- name: images
99
type: object
1010

11+
- name: pushAcr
12+
type: string
13+
1114

1215
jobs:
1316
- ${{ each image in split(parameters.images, '\n') }}:
1417
- job: ${{ image }}_${{ parameters.os }}_${{ parameters.arch }}
1518
displayName: Build Image - (${{ image }} ${{ parameters.os }}/${{ parameters.arch }})
16-
19+
1720
steps:
18-
- task: GoTool@0
19-
inputs:
20-
version: $(GO_VERSION)
21-
22-
- bash: |
23-
set -e
24-
25-
BUILD_CONTEXT=$(make "$MAKE_BUILD_CONTEXT")
26-
echo >&2 "##vso[task.setvariable variable=BUILD_CONTEXT_${VAR_ID};]$BUILD_CONTEXT"
27-
28-
IMAGE_NAME_AND_TAG=$(make "$MAKE_IMG_NAME_AND_TAG")
29-
echo >&2 "##vso[task.setvariable variable=IMAGE_NAME_AND_TAG_${VAR_ID};]$IMAGE_NAME_AND_TAG"
30-
31-
DOCKERFILE_PATH=$(make "$MAKE_DOCKERFILE_PATH")
32-
echo >&2 "##vso[task.setvariable variable=DOCKERFILE_PATH_${VAR_ID};]$DOCKERFILE_PATH"
33-
34-
EXTRA_BUILD_ARGS=$(make "$MAKE_EXTRA_BUILD_ARGS")
35-
echo >&2 "##vso[task.setvariable variable=EXTRA_BUILD_ARGS_${VAR_ID};]$EXTRA_BUILD_ARGS"
36-
displayName: "Get Image Name"
37-
env:
38-
VAR_ID: ${{ parameters.name }}
39-
MAKE_BUILD_CONTEXT: ${{ parameters.name }}-image-build-context
40-
MAKE_IMG_NAME_AND_TAG: ${{ parameters.name }}-image-name-and-tag
41-
MAKE_DOCKERFILE_PATH: ${{ parameters.name }}-image-dockerfile-path
42-
MAKE_EXTRA_BUILD_ARGS: ${{ parameters.name }}-image-build-args
43-
44-
- template: containers/container-template.steps.yaml
45-
parameters:
46-
arch: ${{ parameters.arch }}
47-
name: ${{ parameters.name }}
48-
os: ${{ parameters.os }}
21+
- task: GoTool@0
22+
inputs:
23+
version: $(GO_VERSION)
24+
25+
- task: AzureCLI@2
26+
inputs:
27+
azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION)
28+
scriptLocation: "inlineScript"
29+
scriptType: "bash"
30+
addSpnToEnvironment: true
31+
inlineScript: |
32+
az acr login --name "$ACR"
33+
env:
34+
ACR: ${{ parameters.pushAcr }}
35+
36+
- bash: |
37+
set -e
38+
39+
BUILD_CONTEXT=$(make "$MAKE_BUILD_CONTEXT")
40+
echo >&2 "##vso[task.setvariable variable=BUILD_CONTEXT_${VAR_ID};]$BUILD_CONTEXT"
41+
42+
IMAGE_NAME_AND_TAG=$(make "$MAKE_IMG_NAME_AND_TAG")
43+
echo >&2 "##vso[task.setvariable variable=IMAGE_NAME_AND_TAG_${VAR_ID};]$IMAGE_NAME_AND_TAG"
44+
45+
DOCKERFILE_PATH=$(make "$MAKE_DOCKERFILE_PATH")
46+
echo >&2 "##vso[task.setvariable variable=DOCKERFILE_PATH_${VAR_ID};]$DOCKERFILE_PATH"
47+
48+
EXTRA_BUILD_ARGS=$(make "$MAKE_EXTRA_BUILD_ARGS")
49+
echo >&2 "##vso[task.setvariable variable=EXTRA_BUILD_ARGS_${VAR_ID};]$EXTRA_BUILD_ARGS"
50+
displayName: "Get Image Name"
51+
env:
52+
VAR_ID: ${{ parameters.name }}
53+
MAKE_BUILD_CONTEXT: ${{ parameters.name }}-image-build-context
54+
MAKE_IMG_NAME_AND_TAG: ${{ parameters.name }}-image-name-and-tag
55+
MAKE_DOCKERFILE_PATH: ${{ parameters.name }}-image-dockerfile-path
56+
MAKE_EXTRA_BUILD_ARGS: ${{ parameters.name }}-image-build-args
57+
58+
- template: containers/container-template.steps.yaml
59+
parameters:
60+
arch: ${{ parameters.arch }}
61+
name: ${{ parameters.name }}
62+
os: ${{ parameters.os }}

.pipelines/templates/add-windows-nodepool-job.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
addSpnToEnvironment: true
2323
inlineScript: |
2424
set -e
25-
25+
2626
windows_nodepool=$(az aks nodepool list \
2727
--resource-group ${{ parameters.clusterName }} \
2828
--cluster-name ${{ parameters.clusterName }} \
@@ -38,7 +38,7 @@ jobs:
3838
--name "${{ parameters.clusterName }}" \
3939
--resource-group "${{ parameters.clusterName }}" \
4040
--query provisioningState)
41-
41+
4242
if echo "$cluster_state" | grep -q "Updating"; then
4343
echo "Cluster is updating. Sleeping for 30 seconds..."
4444
sleep 30

0 commit comments

Comments
 (0)