Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build ubuntu fips framework image #1544

Merged
merged 4 commits into from
Jun 22, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions .github/flavors.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
[
{
"flavor": "opensuse-leap"
"flavor": "opensuse-leap"
},
{
"flavor": "opensuse-tumbleweed"
"flavor": "opensuse-tumbleweed"
},
{
"flavor": "ubuntu"
},
{
"flavor": "ubuntu-20-lts"
},
{
"flavor": "ubuntu-20-lts-fips",
"frameworkonly": "true"
},
{
"flavor": "ubuntu-22-lts"
},
Expand All @@ -32,4 +36,4 @@
{
"flavor": "almalinux"
}
]
]
28 changes: 25 additions & 3 deletions .github/workflows/image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ jobs:
- uses: actions/checkout@v3
- run: |
git fetch --prune --unshallow
sudo apt update && sudo apt install -y jq
- id: set-matrix
run: |
content=`cat ./.github/flavors.json`
content=`cat .github/flavors.json | jq 'map(select(.frameworkonly != "true"))'`
# the following lines are only required for multi line json
# the following lines are only required for multi line json
content="${content//'%'/'%25'}"
Expand All @@ -34,6 +35,27 @@ jobs:
# end of optional handling for multi line json
# end of optional handling for multi line json
echo "::set-output name=matrix::{\"include\": $content }"

get-framework-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v3
- run: |
git fetch --prune --unshallow
- id: set-matrix
run: |
content=`cat .github/flavors.json`
# the following lines are only required for multi line json
# the following lines are only required for multi line json
content="${content//'%'/'%25'}"
content="${content//$'\n'/'%0A'}"
content="${content//$'\r'/'%0D'}"
# end of optional handling for multi line json
# end of optional handling for multi line json
echo "::set-output name=matrix::{\"include\": $content }"
mauromorales marked this conversation as resolved.
Show resolved Hide resolved

build:
runs-on: ubuntu-latest
needs:
Expand Down Expand Up @@ -128,13 +150,13 @@ jobs:
build-framework:
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
needs:
- get-matrix
- get-framework-matrix
runs-on: self-hosted
permissions:
id-token: write
strategy:
fail-fast: false
matrix: ${{fromJson(needs.get-matrix.outputs.matrix)}}
matrix: ${{fromJson(needs.get-framework-matrix.outputs.matrix)}}
steps:
- uses: actions/checkout@v3
- run: |
Expand Down
27 changes: 23 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,28 @@ jobs:
- uses: actions/checkout@v3
- run: |
git fetch --prune --unshallow
sudo apt update && sudo apt install -y jq
- id: set-matrix
run: |
content=`cat ./.github/flavors.json`
content=`cat .github/flavors.json | jq 'map(select(.frameworkonly != "true"))'`
# the following lines are only required for multi line json
content="${content//'%'/'%25'}"
content="${content//$'\n'/'%0A'}"
content="${content//$'\r'/'%0D'}"
# end of optional handling for multi line json
echo "::set-output name=matrix::{\"include\": $content }"

get-framework-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v3
- run: |
git fetch --prune --unshallow
- id: set-matrix
run: |
content=`cat .github/flavors.json`
# the following lines are only required for multi line json
content="${content//'%'/'%25'}"
content="${content//$'\n'/'%0A'}"
Expand All @@ -26,13 +45,13 @@ jobs:
build-framework:
runs-on: self-hosted
needs:
- get-matrix
- get-framework-matrix
permissions:
id-token: write # OIDC support
contents: write
strategy:
fail-fast: false
matrix: ${{fromJson(needs.get-matrix.outputs.matrix)}}
matrix: ${{fromJson(needs.get-framework-matrix.outputs.matrix)}}
steps:
- uses: actions/checkout@v3
- run: |
Expand Down Expand Up @@ -86,7 +105,7 @@ jobs:
security-events: write
strategy:
fail-fast: false
matrix: ${{fromJson(needs.get-matrix.outputs.matrix)}}
matrix: ${{ fromJson(needs.get-matrix.outputs.matrix) }}
steps:
- uses: actions/checkout@v3
- run: |
Expand Down
76 changes: 67 additions & 9 deletions framework-profile.yaml
Original file line number Diff line number Diff line change
@@ -1,69 +1,104 @@
common:
- dracut/immucore
- static/grub-config
- system/kcrypt
- system/kcrypt-challenger
- system/suc-upgrade
- system/grub2-efi
- system/immucore
- system/kairos-agent
# Additional common packages to be added to all the FLAVORS
## common:
## - category/name@version
flavors:
debian:
- common-packages
- kairos-toolchain
- systemd-base
- dracut-network-legacy
ubuntu:
- common-packages
- kairos-toolchain
- systemd-base
- dracut-network-legacy
ubuntu-arm-rpi:
- common-packages
- kairos-toolchain
- systemd-base
- dracut-network-legacy
ubuntu-20-lts-arm-nvidia-jetson-agx-orin:
- common-packages
- kairos-toolchain
- systemd-base
- dracut-network-legacy-compat
ubuntu-20-lts-arm-rpi:
- common-packages
- kairos-toolchain
- systemd-base
- dracut-network-legacy-compat
ubuntu-22-lts-arm-rpi:
- common-packages
- kairos-toolchain
- systemd-base
- dracut-network-legacy-compat
ubuntu-22-lts:
- common-packages
- kairos-toolchain
- systemd-base
- dracut-network-legacy-compat
ubuntu-20-lts:
- common-packages
- kairos-toolchain
- systemd-base
- dracut-network-legacy-compat
ubuntu-20-lts-fips:
- common-packages
- kairos-toolchain-fips
- systemd-base
- dracut-network-legacy-compat
fedora:
- common-packages
- kairos-toolchain
- systemd-base
- dracut-network-legacy-compat
rockylinux:
- common-packages
- kairos-toolchain
- systemd-base
- dracut-network-legacy-compat
almalinux:
- common-packages
- kairos-toolchain
- systemd-base
- dracut-network-legacy-compat
opensuse-tumbleweed:
- common-packages
- kairos-toolchain
- systemd-base
- systemd-latest
- dracut-network-legacy
opensuse-tumbleweed-arm-rpi:
- common-packages
- kairos-toolchain
- systemd-base
- systemd-latest
- dracut-network-legacy
opensuse-leap:
- common-packages
- kairos-toolchain
- systemd-base
- systemd-latest
- dracut-network-legacy
opensuse-leap-arm-rpi:
- common-packages
- kairos-toolchain
- systemd-base
- systemd-latest
- dracut-network-legacy
alpine-arm-rpi:
- common-packages
- kairos-toolchain
- opensuse-leap-kernel
- openrc
alpine-opensuse-leap:
- common-packages
- kairos-toolchain
- openrc
- opensuse-leap-kernel
alpine-ubuntu:
- common-packages
- kairos-toolchain
- ubuntu-kernel
- openrc
# See https://github.com/kairos-io/packages/pull/67 for rationale
Expand All @@ -84,6 +119,29 @@ opensuse-leap-kernel:
packages:
- distro-kernels/opensuse-leap
- distro-initrd/opensuse-leap

## Packages (cat/name@version) that are added to ALL flavors
## Static files, no binary
common-packages:
packages:
- static/grub-config
- dracut/immucore
- system/suc-upgrade
- system/grub2-efi

kairos-toolchain-fips:
packages:
- fips/kcrypt
- fips/kcrypt-challenger
- fips/immucore
- fips/kairos-agent

kairos-toolchain:
packages:
- system/kcrypt
- system/kcrypt-challenger
- system/immucore
- system/kairos-agent
ubuntu-kernel:
packages:
- distro-kernels/ubuntu
Expand Down
Loading