mirror of
https://github.com/kairos-io/kairos.git
synced 2025-02-09 05:18:51 +00:00
🤖 Add SBOM artifacts to CI pipelines (#998)
* 🤖 Add image-sbom target Signed-off-by: mudler <mudler@c3os.io> * 🤖 Add image-sbom to main targets Signed-off-by: mudler <mudler@c3os.io> * 🤖 Add SBOM artifacts to pipelines Signed-off-by: mudler <mudler@c3os.io> --------- Signed-off-by: mudler <mudler@c3os.io>
This commit is contained in:
parent
99749ed679
commit
1460d77fdb
7
.github/workflows/image.yaml
vendored
7
.github/workflows/image.yaml
vendored
@ -66,6 +66,13 @@ jobs:
|
|||||||
*.iso
|
*.iso
|
||||||
*.sha256
|
*.sha256
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
- uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: kairos-${{ matrix.flavor }}.sbom.zip
|
||||||
|
path: |
|
||||||
|
*.syft.json
|
||||||
|
*.spdx.json
|
||||||
|
if-no-files-found: error
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: kairos-${{ matrix.flavor }}.initrd.zip
|
name: kairos-${{ matrix.flavor }}.initrd.zip
|
||||||
|
6
.github/workflows/release-arm.yaml
vendored
6
.github/workflows/release-arm.yaml
vendored
@ -92,3 +92,9 @@ jobs:
|
|||||||
sudo luet util pack quay.io/kairos/core-${{ matrix.flavor }}:$VERSION.img build.tar image.tar
|
sudo luet util pack quay.io/kairos/core-${{ matrix.flavor }}:$VERSION.img build.tar image.tar
|
||||||
sudo -E docker load -i image.tar
|
sudo -E docker load -i image.tar
|
||||||
sudo -E docker push quay.io/kairos/core-${{ matrix.flavor }}:$VERSION.img
|
sudo -E docker push quay.io/kairos/core-${{ matrix.flavor }}:$VERSION.img
|
||||||
|
- name: Release
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
|
with:
|
||||||
|
files: |
|
||||||
|
build/*.json
|
||||||
|
16
.github/workflows/release.yaml
vendored
16
.github/workflows/release.yaml
vendored
@ -118,22 +118,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
files: |
|
files: |
|
||||||
release/*
|
release/*
|
||||||
- run: |
|
|
||||||
sudo mv release/*.iso ./
|
|
||||||
sudo mv release/*.sha256 ./
|
|
||||||
sudo mv release/*.sha256.pem ./
|
|
||||||
sudo mv release/*.sha256.sig ./
|
|
||||||
- uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: kairos-${{ matrix.flavor }}.iso.zip
|
|
||||||
path: |
|
|
||||||
*.iso
|
|
||||||
*.sha256
|
|
||||||
*.sha256.pem
|
|
||||||
*.sha256.sig
|
|
||||||
if-no-files-found: error
|
|
||||||
|
|
||||||
|
|
||||||
# build-vm-images:
|
# build-vm-images:
|
||||||
# needs: build
|
# needs: build
|
||||||
# runs-on: macos-12
|
# runs-on: macos-12
|
||||||
|
17
Earthfile
17
Earthfile
@ -36,12 +36,14 @@ ARG IMAGE_REPOSITORY_ORG=quay.io/kairos
|
|||||||
|
|
||||||
all:
|
all:
|
||||||
BUILD +docker
|
BUILD +docker
|
||||||
|
BUILD +image-sbom
|
||||||
BUILD +iso
|
BUILD +iso
|
||||||
BUILD +netboot
|
BUILD +netboot
|
||||||
BUILD +ipxe-iso
|
BUILD +ipxe-iso
|
||||||
|
|
||||||
all-arm:
|
all-arm:
|
||||||
BUILD --platform=linux/arm64 +docker
|
BUILD --platform=linux/arm64 +docker
|
||||||
|
BUILD +image-sbom
|
||||||
BUILD +arm-image
|
BUILD +arm-image
|
||||||
|
|
||||||
go-deps:
|
go-deps:
|
||||||
@ -196,6 +198,21 @@ lint:
|
|||||||
BUILD +shellcheck-lint
|
BUILD +shellcheck-lint
|
||||||
BUILD +yamllint
|
BUILD +yamllint
|
||||||
|
|
||||||
|
syft:
|
||||||
|
FROM anchore/syft:latest
|
||||||
|
SAVE ARTIFACT /syft syft
|
||||||
|
|
||||||
|
image-sbom:
|
||||||
|
FROM +docker
|
||||||
|
WORKDIR /build
|
||||||
|
COPY +version/VERSION ./
|
||||||
|
ARG VERSION=$(cat VERSION)
|
||||||
|
ARG FLAVOR
|
||||||
|
COPY +syft/syft /usr/bin/syft
|
||||||
|
RUN syft / -o json=sbom.syft.json -o spdx-json=sbom.spdx.json
|
||||||
|
SAVE ARTIFACT /build/sbom.syft.json sbom.syft.json AS LOCAL core-${FLAVOR}-${VERSION}-sbom.syft.json
|
||||||
|
SAVE ARTIFACT /build/sbom.spdx.json sbom.spdx.json AS LOCAL core-${FLAVOR}-${VERSION}-sbom.spdx.json
|
||||||
|
|
||||||
luet:
|
luet:
|
||||||
FROM quay.io/luet/base:$LUET_VERSION
|
FROM quay.io/luet/base:$LUET_VERSION
|
||||||
SAVE ARTIFACT /usr/bin/luet /luet
|
SAVE ARTIFACT /usr/bin/luet /luet
|
||||||
|
Loading…
Reference in New Issue
Block a user