Skip to content

Commit 153a6e7

Browse files
author
Sam
committed
Temporary copy Github CI workflow from @ader1990 to allow image build
1 parent 3fff80e commit 153a6e7

File tree

1 file changed

+9
-112
lines changed

1 file changed

+9
-112
lines changed

.github/workflows/ci.yaml

+9-112
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
description: |
88
Space-separated vendor formats to build.
99
required: true
10-
default: qemu_uefi pxe
10+
default: qemu_uefi
1111
custom_sdk_version:
1212
type: string
1313
required: false
@@ -21,7 +21,7 @@ on:
2121
description: |
2222
Space-separated vendor formats to build.
2323
required: true
24-
default: qemu_uefi pxe
24+
default: qemu_uefi
2525
custom_sdk_version:
2626
type: string
2727
required: false
@@ -35,14 +35,11 @@ jobs:
3535
packages:
3636
name: "Build Flatcar packages"
3737
runs-on:
38-
- self-hosted
39-
- debian
40-
- build
41-
- x64
38+
- ubuntu-latest
4239
strategy:
43-
fail-fast: false
40+
fail-fast: true
4441
matrix:
45-
arch: ["amd64", "arm64"]
42+
arch: ["arm64"]
4643
defaults:
4744
run:
4845
working-directory: scripts
@@ -59,7 +56,7 @@ jobs:
5956
sudo mkdir -p /etc/apt/keyrings
6057
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
6158
echo \
62-
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \
59+
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
6360
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
6461
sudo apt-get update
6562
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin
@@ -96,7 +93,7 @@ jobs:
9693
arch="${{ matrix.arch }}"
9794
echo "arch=${arch}" >> $GITHUB_ENV
9895
99-
IMAGE_FORMATS="qemu_uefi pxe"
96+
IMAGE_FORMATS="qemu_uefi"
10097
[ -z "${{ inputs.image_formats }}" ] || IMAGE_FORMATS="${{ inputs.image_formats }}"
10198
echo "IMAGE_FORMATS=${IMAGE_FORMATS}" >> $GITHUB_ENV
10299
@@ -142,31 +139,6 @@ jobs:
142139
-C "${sdk_image}" \
143140
./build_packages --board="${arch}-usr"
144141
145-
# Create binpkgs tarball for archiving as artifact later
146-
./run_sdk_container -n "${container_name}" \
147-
tar -C "/build/${arch}-usr/var/lib/portage/pkgs/" \
148-
-cvf binpkgs.tar .
149-
150-
- name: Extract build logs
151-
if: always() && !cancelled()
152-
shell: bash
153-
run: |
154-
set -euo pipefail
155-
set -x
156-
# Copy logs
157-
./run_sdk_container -n "${container_name}" \
158-
tar -cJf ebuild_logs.tar.xz /build/${arch}-usr/var/log/portage \
159-
/build/${arch}-usr/var/tmp/portage
160-
161-
- name: Upload build logs
162-
if: always() && !cancelled()
163-
uses: actions/upload-artifact@v4
164-
with:
165-
retention-days: 7
166-
name: ${{ matrix.arch }}-build-logs
167-
path: |
168-
scripts/ebuild_logs.tar.xz
169-
170142
- name: Build image
171143
shell: bash
172144
run: |
@@ -185,7 +157,7 @@ jobs:
185157
./run_sdk_container -n "${container_name}" \
186158
./build_image --board="${arch}-usr" --group="${channel}" \
187159
--output_root="${CI_CONTAINER_ARTIFACT_ROOT}" \
188-
prodtar container sysext
160+
--image_compression_formats=none
189161
190162
- name: Build VM image(s)
191163
shell: bash
@@ -243,88 +215,13 @@ jobs:
243215
mv * ../../images/
244216
)
245217
246-
- name: Generate reports against last release
247-
run: .github/workflows/image_changes.sh ${{ matrix.arch }} release
248-
249-
- name: Generate reports against last nightly
250-
run: .github/workflows/image_changes.sh ${{ matrix.arch }} nightly
251-
252-
- name: Upload binpkgs
253-
uses: actions/upload-artifact@v4
254-
with:
255-
retention-days: 7
256-
name: ${{ matrix.arch }}-binpkgs
257-
path: |
258-
scripts/binpkgs.tar
259-
260-
- name: Upload update image (used with kola tests later)
261-
uses: actions/upload-artifact@v4
262-
with:
263-
retention-days: 7
264-
name: ${{ matrix.arch }}-test-update
265-
path: |
266-
scripts/artifacts/images/flatcar_test_update.gz
267-
268218
- name: Upload generic image
269219
uses: actions/upload-artifact@v4
270220
with:
271221
retention-days: 7
272222
name: ${{ matrix.arch }}-generic-image
273223
path: |
274-
scripts/artifacts/images/flatcar_production_image.bin
275-
scripts/artifacts/images/flatcar_production_image.grub
276-
scripts/artifacts/images/flatcar_production_image.shim
277-
scripts/artifacts/images/flatcar_production_image.vmlinuz
278-
scripts/artifacts/images/flatcar_production_image*.txt
279-
scripts/artifacts/images/flatcar_production_image*.json
280-
scripts/artifacts/images/flatcar_production_image_pcr_policy.zip
224+
scripts/artifacts/images/*.img
281225
scripts/artifacts/images/flatcar_production_*_efi_*.qcow2
282226
scripts/artifacts/images/flatcar_production_qemu.sh
283227
284-
- name: Upload developer container
285-
uses: actions/upload-artifact@v4
286-
with:
287-
retention-days: 7
288-
name: ${{ matrix.arch }}-devcontainer
289-
path: |
290-
scripts/artifacts/images/flatcar_developer_container*
291-
292-
- name: Upload reports
293-
uses: actions/upload-artifact@v4
294-
with:
295-
retention-days: 7
296-
name: ${{ matrix.arch }}-image-changes-reports
297-
path: |
298-
scripts/image-changes-reports*.txt
299-
300-
# Clean up what we uploaded already so the "vendor images" wildcard
301-
# works when uploading artifacts in the next step.
302-
- name: Remove update, generic and devcontainer images
303-
shell: bash
304-
run: |
305-
set -euo pipefail
306-
set -x
307-
rm -f artifacts/images/flatcar_test_update.gz \
308-
artifacts/images/flatcar_production_image* \
309-
artifacts/images/flatcar_developer_container* \
310-
artifacts/images/flatcar_production_update*
311-
312-
- name: Upload vendor images
313-
uses: actions/upload-artifact@v4
314-
with:
315-
retention-days: 7
316-
name: ${{ matrix.arch }}-vm-images
317-
path: |
318-
scripts/artifacts/images/*.img
319-
scripts/artifacts/images/*.bin
320-
scripts/artifacts/images/flatcar_production_*_efi_*.qcow2
321-
scripts/artifacts/images/*.txt
322-
scripts/artifacts/images/flatcar-*.raw
323-
scripts/artifacts/images/flatcar_production_*.sh
324-
scripts/artifacts/images/flatcar_production_pxe_image.cpio.gz
325-
scripts/artifacts/images/flatcar_production_pxe.vmlinuz
326-
327-
test:
328-
needs: packages
329-
name: "Run kola tests"
330-
uses: ./.github/workflows/run-kola-tests.yaml

0 commit comments

Comments
 (0)