parent
2834fbba8d
commit
5c6939bc83
1 changed files with 10 additions and 9 deletions
|
@ -55,16 +55,9 @@ sync_repos:
|
|||
- sync/repos.csv
|
||||
|
||||
.scripts_base: &scripts_base
|
||||
# load nix environment, enter dev shell, load cache and
|
||||
# load nix environment
|
||||
- . "$HOME/.nix-profile/etc/profile.d/nix.sh"
|
||||
# load teh dev shell so pipeline uses same binaries as devs
|
||||
- nix --extra-experimental-features 'nix-command flakes' develop
|
||||
# setup the cache
|
||||
- attic login skynet https://nix-cache.skynet.ie/ $CACHE_KEY
|
||||
- attic use skynet-cache
|
||||
- attic watch-store skynet-cache &
|
||||
# push all everything from the current system into cache (if its not already cached)
|
||||
- attic push skynet-cache /run/current-system
|
||||
- nix --extra-experimental-features 'nix-command flakes' profile install nixpkgs#colmena
|
||||
|
||||
.scripts_deploy: &scripts_deploy
|
||||
# setup ssh key
|
||||
|
@ -73,12 +66,18 @@ sync_repos:
|
|||
- mkdir -p ~/.ssh
|
||||
- chmod 700 ~/.ssh
|
||||
|
||||
.scripts_cache: &scripts_cache
|
||||
- nix --extra-experimental-features 'nix-command flakes' profile install nixpkgs#attic-client
|
||||
- attic login skynet https://nix-cache.skynet.ie/ $CACHE_KEY
|
||||
- attic use skynet-cache
|
||||
|
||||
# every commit on main will build and deploy
|
||||
.build_template: &builder
|
||||
tags:
|
||||
- nix
|
||||
before_script:
|
||||
- *scripts_base
|
||||
- *scripts_cache
|
||||
rules:
|
||||
- if: $UPDATE_FLAKE == "yes"
|
||||
when: never
|
||||
|
@ -95,6 +94,7 @@ sync_repos:
|
|||
before_script:
|
||||
- *scripts_deploy
|
||||
- *scripts_base
|
||||
- *scripts_cache
|
||||
rules:
|
||||
- if: $UPDATE_FLAKE == "yes"
|
||||
when: never
|
||||
|
@ -117,6 +117,7 @@ build:
|
|||
<<: *builder
|
||||
stage: test
|
||||
script:
|
||||
- attic watch-store skynet-cache &
|
||||
- colmena build -v --on @active-dns
|
||||
- colmena build -v --on @active-core
|
||||
- colmena build -v --on @active
|
||||
|
|
Loading…
Reference in a new issue