Skip to content

Commit

Permalink
hack: rename find-image dir
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
  • Loading branch information
katexochen committed Dec 13, 2022
1 parent 65f7958 commit f2b324c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/actions/find_latest_image/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion debugd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
13 changes: 6 additions & 7 deletions hack/find-image/find-image.sh → hack/api/find-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand All @@ -148,7 +148,6 @@ function list() {
exit 0
}


case ${1-"latest"} in
"list")
list
Expand Down

0 comments on commit f2b324c

Please sign in to comment.