-
Notifications
You must be signed in to change notification settings - Fork 26
158 lines (158 loc) · 5.25 KB
/
apt.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
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
name: Apt based Linux
on:
push:
branches:
- master
- fluent-package-lts-v5
pull_request:
jobs:
build:
name: Build
strategy:
fail-fast: false
matrix:
label:
- Debian GNU/Linux bullseye amd64
- Debian GNU/Linux bookworm amd64
- Ubuntu Focal amd64
- Ubuntu Jammy amd64
include:
- label: Debian GNU/Linux bullseye amd64
rake-job: debian-bullseye
test-docker-image: debian:bullseye
- label: Debian GNU/Linux bookworm amd64
rake-job: debian-bookworm
test-docker-image: debian:bookworm
- label: Ubuntu Focal amd64
rake-job: ubuntu-focal
test-docker-image: ubuntu:focal
- label: Ubuntu Jammy amd64
rake-job: ubuntu-jammy
test-docker-image: ubuntu:jammy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Install dependencies
run: |
sudo apt update
sudo apt -V install ruby ruby-bundler ruby-serverspec
sudo gem install bundler:2.2.9 --no-document
sudo gem uninstall fileutils
- name: Build deb with Docker
run: |
rake apt:build APT_TARGETS=${{ matrix.rake-job }}
- name: Upload fluent-package deb
uses: actions/upload-artifact@master
with:
name: packages-${{ matrix.rake-job }}
path: fluent-package/apt/repositories
- name: Upload fluent-apt-source deb
uses: actions/upload-artifact@master
with:
name: packages-apt-source-${{ matrix.rake-job }}
path: fluent-apt-source/apt/repositories
- name: Upload fluent-lts-apt-source deb
uses: actions/upload-artifact@master
with:
name: packages-lts-apt-source-${{ matrix.rake-job }}
path: fluent-lts-apt-source/apt/repositories
# TODO move the following steps to "Test" job
- name: Check Package Size
run: |
fluent-package/apt/pkgsize-test.sh ${{ matrix.rake-job }} amd64
- name: Installation Test
run: |
mkdir -p .bundle
docker run \
--rm \
--tty \
--volume ${PWD}:/fluentd:ro \
${{ matrix.test-docker-image }} \
/fluentd/fluent-package/apt/install-test.sh
- name: Piuparts (Install/Remove/Upgrade) Test
run: |
mkdir -p .bundle
docker run \
--privileged \
--rm \
--tty \
--volume ${PWD}:/fluentd:ro \
${{ matrix.test-docker-image }} \
/fluentd/fluent-package/apt/piuparts-test.sh
- name: Serverspec Test
run: |
mkdir -p .bundle
docker run \
--rm \
--tty \
--volume ${PWD}:/fluentd:ro \
${{ matrix.test-docker-image }} \
/fluentd/fluent-package/apt/serverspec-test.sh
- name: Confluent Test
run: |
mkdir -p .bundle
docker run \
--rm \
--tty \
--volume ${PWD}:/fluentd:ro \
${{ matrix.test-docker-image }} \
/fluentd/fluent-package/apt/confluent-test.sh
- name: Binstubs Test
run: |
mkdir -p .bundle
docker run \
--rm \
--tty \
--volume ${PWD}:/fluentd:ro \
${{ matrix.test-docker-image }} \
/fluentd/fluent-package/apt/binstubs-test.sh
test:
name: Test
needs: build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
label:
- Debian GNU/Linux bullseye amd64
- Debian GNU/Linux bookworm amd64
- Ubuntu Focal amd64
- Ubuntu Jammy amd64
test-file:
- "update-from-v4.sh"
- "update-to-next-version-with-backward-compat-for-v4.sh"
- "downgrade-to-v4.sh"
- "install-newly.sh local"
- "install-newly.sh v5"
- "install-newly.sh lts"
include:
- label: Debian GNU/Linux bullseye amd64
rake-job: debian-bullseye
test-lxc-image: images:debian/11
- label: Debian GNU/Linux bookworm amd64
rake-job: debian-bookworm
test-lxc-image: images:debian/12
- label: Ubuntu Focal amd64
rake-job: ubuntu-focal
test-lxc-image: ubuntu:20.04
- label: Ubuntu Jammy amd64
rake-job: ubuntu-jammy
test-lxc-image: ubuntu:22.04
exclude:
- label: Debian GNU/Linux bookworm amd64
test-file: update-from-v4.sh
- label: Debian GNU/Linux bookworm amd64
test-file: update-to-next-version-with-backward-compat-for-v4.sh
- label: Debian GNU/Linux bookworm amd64
test-file: downgrade-to-v4.sh
steps:
- uses: actions/checkout@master
- uses: actions/download-artifact@v4
with:
name: packages-${{ matrix.rake-job }}
- uses: actions/download-artifact@v4
with:
name: packages-apt-source-${{ matrix.rake-job }}
- uses: canonical/[email protected]
- name: Run Test ${{ matrix.test-file }} on ${{ matrix.test-lxc-image }}
run: fluent-package/apt/systemd-test/test.sh ${{ matrix.test-lxc-image }} ${{ matrix.test-file }}