kairos-io/kairos

Artifact search form

Open

#1,991 opened on Nov 8, 2023

 (2 comments) (1 reaction) (0 assignees)Go (133 forks)github user discovery
enhancementgood first issuehelp wanted

Repository metrics

Stars
 (1,782 stars)
PR merge metrics
 (Avg merge 2d 3h) (14 merged PRs in 30d)

Description

With all those artifacts we have and their big names, it's hard to find the one you are looking for in the github release page.

Our naming now is more structured and is based solely on the flavors.json and the naming.sh script. For example with a script like the following, all artifact names can be generated:

~/workspace/kairos/kairos (master)*$ cat all-artifacts.sh 
#!/bin/bash
# https://stackoverflow.com/a/58009121

cat .github/flavors.json | jq -c '.[]' |
while IFS=$"\n" read -r c; do
    FAMILY=$(echo "$c" | jq -r '.family') && export FAMILY
    FLAVOR=$(echo "$c" | jq -r '.flavor') && export FLAVOR
    FLAVOR_RELEASE=$(echo "$c" | jq -r '.flavorRelease') && export FLAVOR_RELEASE
    VARIANT=$(echo "$c" | jq -r '.variant') && export VARIANT
    TARGETARCH=$(echo "$c" | jq -r '.arch') && export TARGETARCH
    MODEL=$(echo "$c" | jq -r '.model') && export MODEL
    REGISTRY_AND_ORG=quay.io/kairos && export REGISTRY_AND_ORG
    KAIROS_VERSION=$(git describe --always --tags --dirty) && export KAIROS_VERSION
    ./naming.sh container_artifact_name
done | sort

We could generate a static page with every release that allows users to search for an artifact using drop down menus for each "input" field. E.g.

select box -> family select box -> flavor select box -> type (iso, img etc) ...

and the form would output all mathing artifacts in a text area box of a ul or something like that.

Contributor guide