Originally this was set up so updating teh flake and pushing out to servers would occur in a single pipeline.

Add 

Relates to #79
This commit is contained in:
silver 2024-06-15 14:02:01 +00:00
parent 452f33baa8
commit ed331c3f08

View file

@ -30,7 +30,7 @@ update:
# the part that updates the flake
- nix --experimental-features 'nix-command flakes' flake lock --update-input $PACKAGE_NAME
- git add flake.lock
- git commit -m "[skip ci] Updated flake for $PACKAGE_NAME" || echo "No changes, nothing to commit"
- git commit -m "Updated flake for $PACKAGE_NAME" || echo "No changes, nothing to commit"
# we have a custom domain
- git remote rm origin && git remote add origin ssh://git@gitlab.skynet.ie:2222/compsoc1/skynet/nixos.git
- git push origin HEAD:$CI_COMMIT_REF_NAME
@ -51,11 +51,11 @@ sync_repos:
- if: '$CI_PROJECT_NAMESPACE == "compsoc1/skynet" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
changes:
- sync/repos.csv
- if: $UPDATE_FLAKE == "yes"
when: never
.scripts_base: &scripts_base
# load nix environment
- echo $CI_COMMIT_REF_NAME
- git pull origin $CI_COMMIT_REF_NAME
- . "$HOME/.nix-profile/etc/profile.d/nix.sh"
- nix --extra-experimental-features 'nix-command flakes' profile install nixpkgs#colmena
@ -86,6 +86,8 @@ sync_repos:
- flake.*
- .gitlab-ci.yml
- config/**/*
- if: $UPDATE_FLAKE == "yes"
when: never
# deploy items only run on main
.deploy_template: &deployment
@ -102,6 +104,8 @@ sync_repos:
- machines/**/*
- secrets/**/*
- config/**/*
- if: $UPDATE_FLAKE == "yes"
when: never
linter:
<<: *builder
@ -155,7 +159,6 @@ deploy_ext:
- deploy_dns
script:
- colmena apply -v --on @active-ext
allow_failure: true
deploy_gitlab:
<<: *builder