feat(shell): Add an action to cache it #200

Open
mdebray wants to merge 2 commits from cache_shell into main
Owner
No description provided.
mdebray added 1 commit 2024-12-21 13:48:38 +01:00
feat(shell): Add an action to cache it
All checks were successful
Check workflows / check_workflows (push) Successful in 24s
Check meta / check_dns (pull_request) Successful in 18s
Check meta / check_meta (pull_request) Successful in 18s
Check workflows / check_workflows (pull_request) Successful in 20s
Run pre-commit on all files / pre-commit (push) Successful in 35s
Build all the nodes / ap01 (pull_request) Successful in 1m14s
Build all the nodes / bridge01 (pull_request) Successful in 1m55s
Build all the nodes / geo01 (pull_request) Successful in 1m52s
Build all the nodes / geo02 (pull_request) Successful in 1m54s
Build all the nodes / compute01 (pull_request) Successful in 2m30s
Build all the nodes / netcore02 (pull_request) Successful in 35s
Build all the nodes / hypervisor01 (pull_request) Successful in 1m28s
Build all the nodes / hypervisor03 (pull_request) Successful in 1m44s
Build all the nodes / hypervisor02 (pull_request) Successful in 1m45s
Build all the nodes / rescue01 (pull_request) Successful in 2m14s
Build all the nodes / vault01 (pull_request) Successful in 2m11s
Build all the nodes / storage01 (pull_request) Successful in 2m18s
Build all the nodes / web02 (pull_request) Successful in 1m48s
Run pre-commit on all files / pre-commit (pull_request) Successful in 35s
Build all the nodes / web01 (pull_request) Successful in 2m22s
Build the shell / build-shell (pull_request) Successful in 1m27s
Build all the nodes / web03 (pull_request) Successful in 1m43s
2132ef08d9
mdebray added 1 commit 2024-12-21 14:01:20 +01:00
fix(scripts): Refactor cache uploading
Some checks failed
Check meta / check_dns (pull_request) Successful in 18s
Check meta / check_meta (pull_request) Successful in 18s
Check workflows / check_workflows (push) Successful in 22s
Run pre-commit on all files / pre-commit (push) Successful in 35s
Check workflows / check_workflows (pull_request) Successful in 28s
Build all the nodes / ap01 (pull_request) Successful in 1m4s
Build all the nodes / bridge01 (pull_request) Successful in 1m41s
Build all the nodes / geo01 (pull_request) Successful in 1m40s
Build all the nodes / compute01 (pull_request) Successful in 2m17s
Build all the nodes / geo02 (pull_request) Successful in 1m37s
Build all the nodes / netcore02 (pull_request) Successful in 33s
Build all the nodes / hypervisor01 (pull_request) Successful in 1m40s
Build all the nodes / hypervisor02 (pull_request) Successful in 1m32s
Build all the nodes / hypervisor03 (pull_request) Successful in 1m41s
Build all the nodes / rescue01 (pull_request) Successful in 1m50s
Build all the nodes / storage01 (pull_request) Successful in 1m49s
Build all the nodes / vault01 (pull_request) Successful in 1m47s
Build the shell / build-shell (pull_request) Failing after 25s
Build all the nodes / web01 (pull_request) Successful in 2m8s
Run pre-commit on all files / pre-commit (pull_request) Successful in 37s
Build all the nodes / web02 (pull_request) Successful in 1m30s
Build all the nodes / web03 (pull_request) Successful in 1m35s
50587f33bc
mdebray force-pushed cache_shell from 50587f33bc to 48a09de93a 2024-12-21 16:42:45 +01:00 Compare
thubrecht requested changes 2024-12-21 17:32:23 +01:00
@ -0,0 +6,4 @@
# Build the derivation and send it to the great beyond
drv=$1
Owner

Tu peux juste utiliser $1 à la place de $drv dans la suite et pas rajouter une variable.

IL faudrait aussi tester qu'on passe bien un argument au script:

if [ $# -eq 0 ]; then
    echo "No arguments provided."
    exit 1
elif [ $# -gt 1 ]; then
    echo "Too many arguments provided."
    exit 1
fi
Tu peux juste utiliser $1 à la place de $drv dans la suite et pas rajouter une variable. IL faudrait aussi tester qu'on passe bien un argument au script: ```bash if [ $# -eq 0 ]; then echo "No arguments provided." exit 1 elif [ $# -gt 1 ]; then echo "Too many arguments provided." exit 1 fi ```
mdebray marked this conversation as resolved
@ -0,0 +16,4 @@
{ uses = "actions/checkout@v3"; }
{
name = "Build and cache shell";
run = "nix-shell -A eval-shell --run \"nix-instantiate-and-cache -A devShell\"";
Owner
run = ''nix-shell -A eval-shell --run "nix-instantiate-and-cache -A devShell"'';
```nix run = ''nix-shell -A eval-shell --run "nix-instantiate-and-cache -A devShell"''; ```
mdebray marked this conversation as resolved
mdebray force-pushed cache_shell from 48a09de93a to de08f79cca 2024-12-21 23:45:40 +01:00 Compare
mdebray force-pushed cache_shell from de08f79cca to 8b15789c24 2024-12-21 23:46:09 +01:00 Compare
thubrecht reviewed 2024-12-22 17:04:34 +01:00
@ -55,3 +38,1 @@
"$(nix-store --realise "$drv")"
rm .netrc
nix-cache "$drv"
Owner

Autant inline drv du coup

Autant inline drv du coup
All checks were successful
Check meta / check_dns (pull_request) Successful in 17s
Required
Details
Check meta / check_meta (pull_request) Successful in 21s
Required
Details
Check workflows / check_workflows (pull_request) Successful in 35s
Required
Details
Build all the nodes / ap01 (pull_request) Successful in 1m34s
Required
Details
Build all the nodes / bridge01 (pull_request) Successful in 2m3s
Required
Details
Build all the nodes / geo01 (pull_request) Successful in 1m57s
Required
Details
Build all the nodes / hypervisor01 (pull_request) Successful in 1m59s
Required
Details
Build all the nodes / geo02 (pull_request) Successful in 2m16s
Required
Details
Build all the nodes / compute01 (pull_request) Successful in 2m37s
Required
Details
Build all the nodes / netcore02 (pull_request) Successful in 34s
Required
Details
Build all the nodes / hypervisor02 (pull_request) Successful in 1m43s
Required
Details
Build all the nodes / hypervisor03 (pull_request) Successful in 1m41s
Required
Details
Build all the nodes / rescue01 (pull_request) Successful in 2m0s
Required
Details
Build all the nodes / vault01 (pull_request) Successful in 2m13s
Required
Details
Build all the nodes / storage01 (pull_request) Successful in 2m27s
Required
Details
Build all the nodes / web02 (pull_request) Successful in 1m38s
Required
Details
Build the shell / build-shell (pull_request) Successful in 32s
Build all the nodes / web01 (pull_request) Successful in 2m23s
Required
Details
Run pre-commit on all files / pre-commit (pull_request) Successful in 40s
Required
Details
Run pre-commit on all files / pre-commit (push) Successful in 36s
Required
Details
Build all the nodes / web03 (pull_request) Successful in 1m43s
Required
Details
This pull request has changes requested by an official reviewer.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin cache_shell:cache_shell
git checkout cache_shell
Sign in to join this conversation.
No description provided.