hack: rename find-image dir

Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
This commit is contained in:
Paul Meyer 2022-12-13 11:08:36 +01:00
parent 65f7958430
commit f2b324cb88
3 changed files with 8 additions and 9 deletions

View File

@ -34,4 +34,4 @@ runs:
run: |
image=$(./find-image.sh --ref "${ref}" --stream "${stream}")
echo "image=${image}" >> "${GITHUB_OUTPUT}"
working-directory: hack/find-image
working-directory: hack/api

View File

@ -22,7 +22,7 @@ With `cdbg` and `yq` installed in your path:
1. Run `constellation config generate` to create a new default configuration
2. Locate the latest debugd images by running `hack/find-image/find-image.sh --ref main --stream debug`
2. Locate the latest debugd images by running `hack/api/find-image.sh --ref main --stream debug`
3. Modify the `constellation-conf.yaml` to use an image with the debugd already included and add required firewall rules:

View File

@ -12,7 +12,7 @@ json=false
cdn_url="https://cdn.confidential.cloud"
function usage() {
cat <<'EOF'
cat << 'EOF'
Usage: find-image.sh [options] [command]
Options:
@ -95,7 +95,7 @@ function latest() {
latest_json=$(curl -sL "${latest_url}")
if [[ ${json} == true ]]; then
jq <<<"${latest_json}"
jq <<< "${latest_json}"
exit 0
fi
@ -133,12 +133,12 @@ function list() {
if [[ ${json} == true ]]; then
out="{}"
out=$(jq <<<"${out}" --arg ref "${ref}" '.ref = $ref')
out=$(jq <<<"${out}" --arg stream "${stream}" '.stream = $stream')
out=$(jq <<< "${out}" --arg ref "${ref}" '.ref = $ref')
out=$(jq <<< "${out}" --arg stream "${stream}" '.stream = $stream')
for patch in ${patch_list}; do
out=$(jq <<<"${out}" --arg patch "${patch}" '.versions += [$patch]')
out=$(jq <<< "${out}" --arg patch "${patch}" '.versions += [$patch]')
done
jq <<<"${out}"
jq <<< "${out}"
exit 0
fi
@ -148,7 +148,6 @@ function list() {
exit 0
}
case ${1-"latest"} in
"list")
list