|
68 | 68 | with:
|
69 | 69 | name: bootc.tar.zst
|
70 | 70 | path: target/bootc.tar.zst
|
71 |
| - build-c9s: |
72 |
| - if: ${{ !contains(github.event.pull_request.labels.*.name, 'control/skip-ci') }} |
73 |
| - runs-on: ubuntu-latest |
74 |
| - container: quay.io/centos/centos:stream9 |
75 |
| - steps: |
76 |
| - - run: dnf -y install git-core |
77 |
| - - uses: actions/checkout@v4 |
78 |
| - - name: Install deps |
79 |
| - run: ./ci/installdeps.sh |
80 |
| - - name: Cache Dependencies |
81 |
| - uses: Swatinem/rust-cache@v2 |
82 |
| - with: |
83 |
| - key: "build-c9s" |
84 |
| - - name: Build |
85 |
| - run: make test-bin-archive |
86 |
| - - name: Upload binary |
87 |
| - uses: actions/upload-artifact@v4 |
88 |
| - with: |
89 |
| - name: bootc-c9s.tar.zst |
90 |
| - path: target/bootc.tar.zst |
91 | 71 | cargo-deny:
|
92 | 72 | runs-on: ubuntu-latest
|
93 | 73 | steps:
|
@@ -127,78 +107,24 @@ jobs:
|
127 | 107 | run: sudo tar -C / -xvf bootc.tar.zst
|
128 | 108 | - name: Integration tests
|
129 | 109 | run: bootc internal-tests run-container-integration
|
130 |
| - privtest-alongside: |
| 110 | + install-tests: |
131 | 111 | if: ${{ !contains(github.event.pull_request.labels.*.name, 'control/skip-ci') }}
|
132 |
| - name: "Test install-alongside" |
133 |
| - needs: [build-c9s] |
134 |
| - runs-on: ubuntu-latest |
| 112 | + name: "Test install" |
| 113 | + # For a not-ancient podman |
| 114 | + runs-on: ubuntu-24.04 |
135 | 115 | steps:
|
| 116 | + - name: Checkout repository |
| 117 | + uses: actions/checkout@v4 |
136 | 118 | - name: Ensure host skopeo is disabled
|
137 | 119 | run: sudo rm -f /bin/skopeo /usr/bin/skopeo
|
138 |
| - - name: Download |
139 |
| - uses: actions/download-artifact@v4 |
140 |
| - with: |
141 |
| - name: bootc-c9s.tar.zst |
142 |
| - - name: Install |
143 |
| - run: tar -xvf bootc.tar.zst |
144 |
| - - name: Integration tests |
145 |
| - run: | |
146 |
| - set -xeuo pipefail |
147 |
| - image=quay.io/centos-bootc/centos-bootc-dev:stream9 |
148 |
| - echo 'ssh-ed25519 ABC0123 testcase@example.com' > test_authorized_keys |
149 |
| - sudo podman run --rm --privileged -v ./test_authorized_keys:/test_authorized_keys --env RUST_LOG=debug -v /:/target -v /var/lib/containers:/var/lib/containers -v ./usr/bin/bootc:/usr/bin/bootc --pid=host --security-opt label=disable \ |
150 |
| - ${image} bootc install to-filesystem --acknowledge-destructive \ |
151 |
| - --karg=foo=bar --disable-selinux --replace=alongside --root-ssh-authorized-keys=/test_authorized_keys /target |
152 |
| - ls -al /boot/loader/ |
153 |
| - sudo grep foo=bar /boot/loader/entries/*.conf |
154 |
| - grep authorized_keys /ostree/deploy/default/deploy/*/etc/tmpfiles.d/bootc-root-ssh.conf |
155 |
| - # TODO fix https://github.com/containers/bootc/pull/137 |
156 |
| - sudo chattr -i /ostree/deploy/default/deploy/* |
157 |
| - sudo rm /ostree/deploy/default -rf |
158 |
| - sudo podman run --rm --privileged --env RUST_LOG=debug -v /:/target -v /var/lib/containers:/var/lib/containers -v ./usr/bin/bootc:/usr/bin/bootc --pid=host --security-opt label=disable \ |
159 |
| - ${image} bootc install to-existing-root --acknowledge-destructive |
160 |
| - sudo podman run --rm --privileged -v /:/target -v ./usr/bin/bootc:/usr/bin/bootc --pid=host --security-opt label=disable ${image} bootc internal-tests verify-selinux /target/ostree --warn |
161 |
| - install-to-existing-root: |
162 |
| - if: ${{ !contains(github.event.pull_request.labels.*.name, 'control/skip-ci') }} |
163 |
| - name: "Test install-to-existing-root" |
164 |
| - needs: [build-c9s] |
165 |
| - runs-on: ubuntu-latest |
166 |
| - steps: |
167 |
| - - name: Download |
168 |
| - uses: actions/download-artifact@v4 |
169 |
| - with: |
170 |
| - name: bootc-c9s.tar.zst |
171 |
| - - name: Install |
172 |
| - run: tar -xvf bootc.tar.zst |
173 |
| - - name: Integration tests |
174 |
| - run: | |
175 |
| - set -xeuo pipefail |
176 |
| - # We should be able to install to-existing-root with no install config, |
177 |
| - # so we bind mount an empty directory over /usr/lib/bootc/install. |
178 |
| - empty=$(mktemp -d) |
179 |
| - image=quay.io/centos-bootc/centos-bootc-dev:stream9 |
180 |
| - sudo podman run --rm --privileged --env RUST_LOG=debug -v /:/target -v /var/lib/containers:/var/lib/containers -v ./usr/bin/bootc:/usr/bin/bootc -v ${empty}:/usr/lib/bootc/install --pid=host --security-opt label=disable \ |
181 |
| - ${image} bootc install to-existing-root |
182 |
| - install-to-loopback: |
183 |
| - if: ${{ !contains(github.event.pull_request.labels.*.name, 'control/skip-ci') }} |
184 |
| - name: "Test install to-disk --via-loopback" |
185 |
| - needs: [build-c9s] |
186 |
| - runs-on: ubuntu-latest |
187 |
| - steps: |
188 |
| - - name: Download |
189 |
| - uses: actions/download-artifact@v4 |
190 |
| - with: |
191 |
| - name: bootc-c9s.tar.zst |
192 |
| - - name: Install |
193 |
| - run: tar -xvf bootc.tar.zst |
194 | 120 | - name: Integration tests
|
195 | 121 | run: |
|
196 |
| - set -xeuo pipefail |
197 |
| - image=quay.io/centos-bootc/centos-bootc-dev:stream9 |
198 |
| - tmpdisk=$(mktemp -p /var/tmp) |
199 |
| - truncate -s 20G ${tmpdisk} |
200 |
| - sudo podman run --rm --privileged --env RUST_LOG=debug -v /dev:/dev -v /:/target -v /var/lib/containers:/var/lib/containers -v ./usr/bin/bootc:/usr/bin/bootc --pid=host --security-opt label=disable \ |
201 |
| - -v ${tmpdisk}:/disk ${image} bootc install to-disk --via-loopback /disk |
| 122 | + set -xeu |
| 123 | + sudo podman build -t localhost/bootc -f hack/Containerfile . |
| 124 | + # Nondestructive but privileged tests |
| 125 | + cargo run -p tests-integration host-privileged localhost/bootc |
| 126 | + # Finally the install-alongside suite |
| 127 | + cargo run -p tests-integration install-alongside localhost/bootc |
202 | 128 | docs:
|
203 | 129 | if: ${{ contains(github.event.pull_request.labels.*.name, 'documentation') }}
|
204 | 130 | runs-on: ubuntu-latest
|
|
0 commit comments