Skip to content

Commit

Permalink
Filter which flavors to build standard image for
Browse files Browse the repository at this point in the history
and stop running the release pipeline our current branch

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
  • Loading branch information
jimmykarily committed Aug 8, 2023
1 parent f6b1607 commit 0dbbc35
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 25 deletions.
13 changes: 8 additions & 5 deletions .github/flavors-arm.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
[
{
"flavor": "opensuse-leap-arm-rpi",
"model": "rpi64",
"worker": "ubuntu-latest"
"flavor": "opensuse-leap-arm-rpi",
"model": "rpi64",
"worker": "ubuntu-latest",
"standard": "true"
},
{
"flavor": "opensuse-tumbleweed-arm-rpi",
"model": "rpi64",
"worker": "ubuntu-latest"
"worker": "ubuntu-latest",
"standard": "true"
},
{
"flavor": "alpine-arm-rpi",
"model": "rpi64",
"worker": "ubuntu-latest"
"worker": "ubuntu-latest",
"standard": "true"
},
{
"flavor": "ubuntu-arm-rpi",
Expand Down
30 changes: 20 additions & 10 deletions .github/flavors.json
Original file line number Diff line number Diff line change
@@ -1,37 +1,47 @@
[
{
"flavor": "opensuse-leap"
"flavor": "opensuse-leap",
"standard": "true"
},
{
"flavor": "opensuse-tumbleweed"
"flavor": "opensuse-tumbleweed",
"standard": "true"
},
{
"flavor": "ubuntu"
"flavor": "ubuntu",
"standard": "true"
},
{
"flavor": "ubuntu-20-lts"
"flavor": "ubuntu-20-lts",
"standard": "true"
},
{
"flavor": "fips-systemd",
"frameworkonly": "true"
},
{
"flavor": "ubuntu-22-lts"
"flavor": "ubuntu-22-lts",
"standard": "true"
},
{
"flavor": "alpine-ubuntu"
"flavor": "alpine-ubuntu",
"standard": "true"
},
{
"flavor": "alpine-opensuse-leap"
"flavor": "alpine-opensuse-leap",
"standard": "true"
},
{
"flavor": "fedora"
"flavor": "fedora",
"standard": "true"
},
{
"flavor": "debian"
"flavor": "debian",
"standard": "true"
},
{
"flavor": "rockylinux"
"flavor": "rockylinux",
"standard": "true"
},
{
"flavor": "almalinux"
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/image-arm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,8 @@ jobs:
sudo mv luet /usr/bin/luet
# Construct an array like this from the found versions:
sudo luet --config framework-profile.yaml search -o json k8s/k3s | jq '.packages | map(.version)' > k3s_versions.json
# Exclude framework only flavors and orin (for which we only build a core image)
# Also create a combination of flavors and k3s versions.
content=$(jq -s '. | [combinations | .[0] + {"k3s_version": .[1]}] | map(select(.frameworkonly != "true")) | map(select(.flavor|test(".*agx-orin")|not))' .github/flavors-arm.json k3s_versions.json)
# Create a combination of flavors and k3s versions.
content=$(jq -s '. | [combinations | .[0] + {"k3s_version": .[1]}] | map(select(.frameworkonly != "true")) | map(select(.standard == "true"))' .github/flavors-arm.json k3s_versions.json)
# the following lines are only required for multi line json
content="${content//'%'/'%25'}"
content="${content//$'\n'/'%0A'}"
Expand All @@ -66,7 +65,7 @@ jobs:
model: ${{ matrix.model }}
worker: ${{ matrix.worker }}
needs:
- get-matrix
- get-core-matrix
strategy:
fail-fast: false
matrix: ${{fromJson(needs.get-matrix.outputs.matrix)}}
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/release-arm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ on:
push:
tags:
- '*'
branches:
- "1609-release-standard-images"
jobs:
get-core-matrix:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -42,9 +40,8 @@ jobs:
sudo mv luet /usr/bin/luet
# Construct an array like this from the found versions:
sudo luet --config framework-profile.yaml search -o json k8s/k3s | jq '.packages | map(.version)' > k3s_versions.json
# Exclude framework only flavors and orin (for which we only build a core image)
# Also create a combination of flavors and k3s versions.
content=$(jq -s '. | [combinations | .[0] + {"k3s_version": .[1]}] | map(select(.frameworkonly != "true")) | map(select(.flavor|test(".*agx-orin")|not))' .github/flavors-arm.json k3s_versions.json)
# Create a combination of flavors and k3s versions.
content=$(jq -s '. | [combinations | .[0] + {"k3s_version": .[1]}] | map(select(.frameworkonly != "true")) | map(select(.standard == "true"))' .github/flavors-arm.json k3s_versions.json)
# the following lines are only required for multi line json
content="${content//'%'/'%25'}"
content="${content//$'\n'/'%0A'}"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
sudo mv luet /usr/bin/luet
# Construct an array like this from the found versions:
sudo luet --config framework-profile.yaml search -o json k8s/k3s | jq '.packages | map(.version)' > k3s_versions.json
content=$(jq -s '. | [combinations | .[0] + {"k3s_version": .[1]}] | map(select(.frameworkonly != "true"))' .github/flavors.json k3s_versions.json)
content=$(jq -s '. | [combinations | .[0] + {"k3s_version": .[1]}] | map(select(.frameworkonly != "true")) | map(select(.standard == "true"))' .github/flavors.json k3s_versions.json)
# the following lines are only required for multi line json
content="${content//'%'/'%25'}"
content="${content//$'\n'/'%0A'}"
Expand Down

0 comments on commit 0dbbc35

Please sign in to comment.