Skip to content

Commit

Permalink
Build only framework images for fips
Browse files Browse the repository at this point in the history
since we don't need isos for them. Isos need to be built manually (from
scratch) because to have a fips enabled flavor you need to have a fips
enabled OS in general.

Signed-off-by: Ettore Di Giacinto <ettore@spectrocloud.com>
  • Loading branch information
Dimitris Karakasilis authored and jimmykarily committed Jun 22, 2023
1 parent 6f26714 commit 69f8c9c
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 10 deletions.
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 }"
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
28 changes: 23 additions & 5 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 @@ -77,7 +96,6 @@ jobs:
build:
runs-on: ubuntu-latest
if: ${{ matrix.frameworkonly != "true" }}
needs:
- get-matrix
permissions:
Expand All @@ -87,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
2 changes: 0 additions & 2 deletions framework-profile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,6 @@ kairos-toolchain-nonfips:
packages:
- system/kcrypt
- system/kcrypt-challenger
- system/suc-upgrade
- system/grub2-efi
- system/immucore
- system/kairos-agent
ubuntu-kernel:
Expand Down

0 comments on commit 69f8c9c

Please sign in to comment.