-
Notifications
You must be signed in to change notification settings - Fork 43
Expand file tree
/
Copy pathbuild-sanity-test-containers.yml
More file actions
45 lines (42 loc) · 1.42 KB
/
build-sanity-test-containers.yml
File metadata and controls
45 lines (42 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
parameters:
- name: name
type: string
- name: arch
type: string
default: amd64
- name: qemu
type: string
default: 'false'
- name: release
type: boolean
default: false
steps:
- ${{ if eq(parameters.qemu, 'true') }}:
- task: AzureCLI@2
displayName: "Register Docker QEMU"
inputs:
azureSubscription: vscode
scriptType: pscore
scriptLocation: inlineScript
inlineScript: |
az acr login --name vscodehub
docker run --rm --privileged vscodehub.azurecr.io/multiarch/qemu-user-static:latest --reset -p yes
- script: |
docker buildx build \
--platform "linux/${{ parameters.arch }}" \
--tag "vscodehub.azurecr.io/vscode-linux-build-agent/sanity-tests:${{ parameters.name }}-${{ parameters.arch }}" \
--file "sanity-tests/${{ parameters.name }}/Dockerfile" \
--network host \
--load \
"sanity-tests/${{ parameters.name }}"
displayName: Build Container Image
- task: AzureCLI@2
displayName: Push Container Image
inputs:
azureSubscription: vscode
scriptType: pscore
scriptLocation: inlineScript
inlineScript: |
az acr login --name vscodehub
docker push vscodehub.azurecr.io/vscode-linux-build-agent/sanity-tests:${{ parameters.name }}-${{ parameters.arch }}
condition: and(succeeded(), eq(${{ parameters.release }}, true))