Repository navigation
90 lines (79 loc) · 2.8 KB
/
Copy pathci.yml
File metadata and controls
90 lines (79 loc) · 2.8 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
86
87
88
89
90
---
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
name: 🚦 CI
# yamllint disable-line rule:truthy
on:
pull_request:
branches:
- main
workflow_dispatch:
merge_group:
branches:
- main
concurrency:
group: ci-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
setup-matrix:
name: Set up build matrix
runs-on: ubuntu-latest
outputs:
build-matrix: ${{ steps.build-matrix.outputs.build-matrix }}
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Install yq
uses: dcarbone/install-yq-action@4075b4dca348d74bd83f2bf82d30f25d7c54539b # v1.3.1
- name: Generate build matrix
id: build-matrix
run: echo "build-matrix=$(bash matrix.sh build)" >> "$GITHUB_OUTPUT"
build-container:
name: Build OpenVox ${{ matrix.release }} ${{ matrix.os }} / ${{ matrix.platform }} CI container
runs-on: ${{ matrix.runner }}
needs:
- setup-matrix
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.setup-matrix.outputs.build-matrix) }}
permissions:
actions: read
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Build image
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
with:
context: .
file: Containerfile.${{ matrix.os }}
tags: 'ci/openvoxserver:${{ matrix.server_version }}-${{ matrix.os }}-${{ matrix.platform }}'
push: false
platforms: linux/${{ matrix.platform }}
build-args: |
OPENVOX_RELEASE=${{ matrix.release }}
OPENVOXSERVER_VERSION=${{ matrix.server_version }}
OPENVOXDB_VERSION=${{ matrix.db_version }}
RUBYGEM_OPENVOX=${{ matrix.rubygem_openvox }}
RUBYGEM_R10K=${{ matrix.rubygem_r10k }}
RUBYGEM_RUGGED=${{ matrix.rubygem_rugged }}
JDK_VERSION=${{ matrix.jdk_version }}
- name: Test image
run: |
docker run --rm -v "$PWD/tests:/tests:ro,Z" --entrypoint puppet ci/openvoxserver:${{ matrix.server_version }}-${{ matrix.os }}-${{ matrix.platform }} catalog compile --manifest /tests/simple_catalog.pp --render-as json > catalog.json
grep -q '"type":"Host"' catalog.json
grep -q '"type":"Cron"' catalog.json
tests:
name: Test suite
if: always()
needs:
- setup-matrix
- build-container
runs-on: ubuntu-24.04
steps:
- name: Verify required jobs
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}