forked from ansible/distro-test-containers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
61 lines (55 loc) · 1.42 KB
/
azure-pipelines.yml
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
trigger:
batch: true
branches:
include:
- main
tags:
include:
- '*'
pr:
branches:
include:
- main
pool:
vmImage: 'ubuntu-22.04'
variables:
python_version: '3.10'
containmint_version: '0.2.0'
${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
push_or_no_login: --push
${{ else }}:
push_or_no_login: --no-login
stages:
- stage: Prepare
dependsOn: []
jobs:
- job: Matrix
steps:
- script: ./azure-pipelines.py
name: Generate
- template: build.yml
parameters:
architectures:
- x86_64
- aarch64
- stage: Deploy
dependsOn:
- Prepare
- x86_64
- aarch64
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
jobs:
- job: Image
steps:
- template: install.yml
- script: >
containmint merge
--push
--tag "quay.io/ansible/$(ContainerName):$(Build.SourceBranchName)"
"quay.io/ansible/scratchpad:$(ContainerName)-$(Build.SourceBranchName)-$(Build.BuildId)-x86_64"
"quay.io/ansible/scratchpad:$(ContainerName)-$(Build.SourceBranchName)-$(Build.BuildId)-aarch64"
displayName: Merge
env:
CONTAINMINT_PASSWORD: $(CONTAINMINT_PASSWORD)
strategy:
matrix: $[ stageDependencies.Prepare.Matrix.outputs['Generate.containers'] ]