ci: update to teh hash from teh flake bump
This commit is contained in:
parent
dae9549064
commit
945b43dddb
1 changed files with 10 additions and 0 deletions
|
@ -5,6 +5,9 @@ stages:
|
||||||
- test
|
- test
|
||||||
- deploy
|
- deploy
|
||||||
|
|
||||||
|
variables:
|
||||||
|
FLAKE_COMMIT=""
|
||||||
|
|
||||||
# Update the flake for any changes upstream
|
# Update the flake for any changes upstream
|
||||||
# Passed in from upstream
|
# Passed in from upstream
|
||||||
# $PACKAGE_NAME = name of the flake that needs to be updated
|
# $PACKAGE_NAME = name of the flake that needs to be updated
|
||||||
|
@ -31,6 +34,8 @@ update:
|
||||||
# we have a custom domain
|
# we have a custom domain
|
||||||
- git remote rm origin && git remote add origin ssh://git@gitlab.skynet.ie:2222/compsoc/skynet/nixos.git
|
- git remote rm origin && git remote add origin ssh://git@gitlab.skynet.ie:2222/compsoc/skynet/nixos.git
|
||||||
- git push origin HEAD:$CI_COMMIT_REF_NAME
|
- git push origin HEAD:$CI_COMMIT_REF_NAME
|
||||||
|
# update teh hash for further along in the pipeline
|
||||||
|
- $FLAKE_COMMIT=$(git rev-parse HEAD)
|
||||||
only:
|
only:
|
||||||
refs:
|
refs:
|
||||||
- main
|
- main
|
||||||
|
@ -41,6 +46,9 @@ build:
|
||||||
stage: test
|
stage: test
|
||||||
before_script:
|
before_script:
|
||||||
- . "$HOME/.nix-profile/etc/profile.d/nix.sh"
|
- . "$HOME/.nix-profile/etc/profile.d/nix.sh"
|
||||||
|
# use the
|
||||||
|
- git remote rm origin && git remote add origin ssh://git@gitlab.skynet.ie:2222/compsoc/skynet/nixos.git
|
||||||
|
- git pull origin $FLAKE_COMMIT
|
||||||
script:
|
script:
|
||||||
- nix --experimental-features 'nix-command flakes' run nixpkgs#colmena -- build
|
- nix --experimental-features 'nix-command flakes' run nixpkgs#colmena -- build
|
||||||
|
|
||||||
|
@ -55,6 +63,8 @@ deploy:
|
||||||
- chmod 700 ~/.ssh
|
- chmod 700 ~/.ssh
|
||||||
# load nix environment
|
# load nix environment
|
||||||
- . "$HOME/.nix-profile/etc/profile.d/nix.sh"
|
- . "$HOME/.nix-profile/etc/profile.d/nix.sh"
|
||||||
|
- git remote rm origin && git remote add origin ssh://git@gitlab.skynet.ie:2222/compsoc/skynet/nixos.git
|
||||||
|
- git pull origin $FLAKE_COMMIT
|
||||||
script:
|
script:
|
||||||
# dns is always deployed first
|
# dns is always deployed first
|
||||||
- nix --experimental-features 'nix-command flakes' run nixpkgs#colmena -- apply --on @active-dns
|
- nix --experimental-features 'nix-command flakes' run nixpkgs#colmena -- apply --on @active-dns
|
||||||
|
|
Loading…
Reference in a new issue