Repository navigation
85 lines (82 loc) · 2.96 KB
/
Copy pathcontainers.yaml
File metadata and controls
85 lines (82 loc) · 2.96 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: Build non-OpenStack containers
on:
push:
tags:
- v*
branches:
- main
paths: &triggerpaths
- "ansible/**"
- "containers/ansible/**"
- "containers/dnsmasq/**"
- "containers/ironic-nautobot-client/**"
- "containers/ironic-vnc-container/**"
- "containers/nautobot/**"
- "containers/openstack-sync-operator/**"
- "go/nautobotop/**"
- "go/ironic-hardware-exporter/**"
- "containers/understack-tests/**"
- "python/**"
- ".github/workflows/containers.yaml"
- ".github/workflows/build-container-reuse.yaml"
pull_request:
types: [opened, synchronize, reopened, closed]
paths: *triggerpaths
workflow_dispatch:
merge_group:
types: [checks_requested]
jobs:
build:
strategy:
matrix:
container:
- name: ansible
target: prod
- name: dnsmasq
target: prod
- name: ironic-nautobot-client
target: prod
- name: understack-tests
target: prod
- name: ironic-vnc-container
target: ''
dockerfile_path: ./containers/ironic-vnc-container/Dockerfile
context_path: "./containers/ironic-vnc-container/"
prebuild_script: ./sync_from_upstream.sh
prebuild_script_working_dir: containers/ironic-vnc-container/
- name: openstack-sync-operator
target: prod
- name: nautobot
target: prod
- name: nautobotop
target: ''
dockerfile_path: ./go/nautobotop/Dockerfile
context_path: "./go/nautobotop/"
- name: ironic-hardware-exporter
target: ''
dockerfile_path: ./go/ironic-hardware-exporter/Dockerfile
context_path: "./go/ironic-hardware-exporter/"
uses: ./.github/workflows/build-container-reuse.yaml
secrets: inherit
with:
container_name: ${{ matrix.container.name }}
dockerfile_path: ${{ matrix.container.dockerfile_path || format('containers/{0}/Dockerfile', matrix.container.name) }}
target: ${{ matrix.container.target }}
context_path: ${{ matrix.container.context_path || '{{defaultContext}}' }}
prebuild_script: ${{ matrix.container.prebuild_script }}
prebuild_script_working_dir: ${{ matrix.container.prebuild_script_working_dir }}
# Required status check, enforced only in the merge queue where this
# workflow always runs. On pull requests required-checks-pr.yaml posts a
# passing check with the same name so the PR can enter the queue.
result:
name: containers-result
if: always() && github.event_name == 'merge_group'
needs: [build]
runs-on: ubuntu-latest
steps:
- name: fail if any build failed or was cancelled
env:
NEEDS: ${{ toJSON(needs) }}
run: |
echo "${NEEDS}" | jq -r 'to_entries[] | "\(.key): \(.value.result)"'
echo "${NEEDS}" | jq -e 'all(.[]; .result == "success")' > /dev/null