diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8a5e066..319bd66 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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