ci: test the deploy

This commit is contained in:
silver 2023-07-26 23:23:55 +01:00
parent 3465f645b9
commit ed6b61e13f

View file

@ -3,7 +3,7 @@
stages: stages:
- flake - flake
- test - test
#- deploy - deploy
# 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
@ -49,24 +49,25 @@ build:
# use ctrl+/ on intellij to mass uncoment # use ctrl+/ on intellij to mass uncoment
# set up deployment later # set up deployment later
#deploy: deploy:
# stage: deploy stage: deploy
# # from https://forum.gitlab.com/t/git-push-from-inside-a-gitlab-runner/30554/5 # from https://forum.gitlab.com/t/git-push-from-inside-a-gitlab-runner/30554/5
# before_script: before_script:
# # Check for ssh-agent + rsync and install if not present # Check for ssh-agent + rsync and install if not present
# #- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )' #- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
# - eval $(ssh-agent -s) - eval $(ssh-agent -s)
# # Inject the remote's private key # Inject the remote's private key
# - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null - echo "$DEPLOY_KEY" | tr -d '\r' | ssh-add - > /dev/null
# - mkdir -p ~/.ssh - mkdir -p ~/.ssh
# - chmod 700 ~/.ssh - chmod 700 ~/.ssh
# # Append keyscan output into known hosts # Append keyscan output into known hosts
# - ssh-keyscan $SERVER_IP >> ~/.ssh/known_hosts # - ssh-keyscan $SERVER_IP >> ~/.ssh/known_hosts
# - chmod 644 ~/.ssh/known_hosts # - chmod 644 ~/.ssh/known_hosts
# - . "$HOME/.nix-profile/etc/profile.d/nix.sh"
# script:
# # this will grab a fresh copy of teh repo script:
# - ssh $SERVER_USER@$SERVER_IP "cd /etc/nixos && git stash && git pull origin main && nixos-rebuild switch" # this will grab a fresh copy of teh repo
- nix --experimental-features 'nix-command flakes' run nixpkgs#colmena -- apply --on @active-dns
# #
# only: # only:
# refs: # refs: