Skip to content

Commit

Permalink
just: demodir closer to released artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
burgerdev committed Feb 22, 2024
1 parent 7b4c4e1 commit f5de99d
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -165,13 +165,20 @@ fmt:
lint:
nix run .#scripts.golangci-lint -- run

demodir cli=default_cli: undeploy coordinator initializer
demodir: coordinator initializer
#!/usr/bin/env bash
set -eo pipefail
d=$(mktemp -d)
echo "Creating demo directory at ${d}"
nix build .#{{ cli }}
nix run .#scripts.write-coordinator-yaml -- "${container_registry}/nunki/coordinator:v$(cat version.txt)" |
tee "${d}/coordinator.yaml" |
yq 'select(.kind == "Deployment") | .spec.template.metadata.annotations["io.katacontainers.config.agent.policy"]' |
base64 -d | sha256sum | cut -d " " -f1 > cli/assets/coordinator-policy-hash
nix build .#cli-release
cp ./result-cli/bin/nunki "${d}/nunki"
cp -R ./deployments/emojivoto "${d}/deployment"
yq -i ".metadata.namespace = \"$(yq 'select(.kind == "Deployment") | .metadata.namespace' < "${d}/deployment/coordinator.yml")\"" "${d}/coordinator.yaml"
rm "${d}/deployment/coordinator.yml"
nix run .#scripts.patch-nunki-image-hashes -- "${d}/deployment"
nix run .#kypatch images -- "${d}/deployment" \
--replace ghcr.io/edgelesssys ${container_registry}
Expand Down

0 comments on commit f5de99d

Please sign in to comment.