feat(workflows/eval): Try to build and upload in one fell swoop
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
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
This commit is contained in:
parent
6c4099d369
commit
6b23df6b54
3 changed files with 23 additions and 12 deletions
|
@ -9,16 +9,6 @@ on:
|
||||||
- main
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build_krz01:
|
|
||||||
runs-on: nix
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Build krz01
|
|
||||||
run: |
|
|
||||||
# Enter the shell
|
|
||||||
nix-shell --run 'colmena build --on krz01'
|
|
||||||
|
|
||||||
build_compute01:
|
build_compute01:
|
||||||
runs-on: nix
|
runs-on: nix
|
||||||
steps:
|
steps:
|
||||||
|
@ -117,12 +107,12 @@ jobs:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Push to cache
|
- name: Push to cache
|
||||||
run: nix-shell --run push-to-nix-cache
|
run: nix-shell --run cache-node
|
||||||
env:
|
env:
|
||||||
STORE_ENDPOINT: "https://tvix-store.dgnum.eu/infra-signing/"
|
STORE_ENDPOINT: "https://tvix-store.dgnum.eu/infra-signing/"
|
||||||
STORE_USER: "admin"
|
STORE_USER: "admin"
|
||||||
STORE_PASSWORD: ${{ secrets.STORE_PASSWORD }}
|
STORE_PASSWORD: ${{ secrets.STORE_PASSWORD }}
|
||||||
NODES: '[ "krz01" ]'
|
BUILD_NODE: "krz01"
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v3
|
||||||
if: always()
|
if: always()
|
||||||
|
|
20
scripts/cache-node.sh
Normal file
20
scripts/cache-node.sh
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
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
|
|
@ -29,6 +29,7 @@ let
|
||||||
));
|
));
|
||||||
|
|
||||||
scripts = [
|
scripts = [
|
||||||
|
"cache-node"
|
||||||
"check-deployment"
|
"check-deployment"
|
||||||
"launch-vm"
|
"launch-vm"
|
||||||
"list-nodes"
|
"list-nodes"
|
||||||
|
|
Loading…
Reference in a new issue