infrastructure/scripts/cache-node.sh
Tom Hubrecht 6b23df6b54
Some checks failed
build configuration / build_web01 (push) Has been cancelled
build configuration / build_rescue01 (push) Has been cancelled
build configuration / build_storage01 (push) Has been cancelled
build configuration / build_compute01 (push) Has been cancelled
build configuration / build_geo01 (push) Has been cancelled
build configuration / build_web02 (push) Has been cancelled
build configuration / build_vault01 (push) Has been cancelled
build configuration / build_geo02 (push) Has been cancelled
build configuration / build_bridge01 (push) Has been cancelled
build configuration / push_to_cache_krz01 (push) Has been cancelled
build configuration / push_to_cache_compute01 (push) Has been cancelled
build configuration / push_to_cache_storage01 (push) Has been cancelled
build configuration / push_to_cache_rescue01 (push) Has been cancelled
build configuration / push_to_cache_geo01 (push) Has been cancelled
build configuration / push_to_cache_geo02 (push) Has been cancelled
build configuration / push_to_cache_vault01 (push) Has been cancelled
build configuration / push_to_cache_web01 (push) Has been cancelled
build configuration / push_to_cache_web02 (push) Has been cancelled
build configuration / push_to_cache_bridge01 (push) Has been cancelled
lint / check (push) Successful in 25s
feat(workflows/eval): Try to build and upload in one fell swoop
2024-10-09 21:32:38 +02:00

20 lines
545 B
Bash

set -eu -o pipefail
cat <<EOF >.netrc
default
login $STORE_USER
password $STORE_PASSWORD
EOF
drv=$("@colmena@/bin/colmena" eval --instantiate -E "{ nodes, ... }: nodes.${BUILD_NODE}.config.system.build.toplevel")
# Build the derivation and send it to the great beyond
nix-store --query --requisites --force-realise --include-outputs "$drv" | grep -v '.*\.drv' >paths.txt
nix copy \
--extra-experimental-features nix-command \
--to "$STORE_ENDPOINT?compression=none" \
--netrc-file .netrc \
"$(nix-store --realise "$drv")"
rm .netrc