From d976cddbea716de16e8b949415aa75922662a882 Mon Sep 17 00:00:00 2001 From: Aria Shrimpton Date: Mon, 29 Jan 2024 23:10:11 +0000 Subject: update ci --- .gitlab-ci.yml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to '.gitlab-ci.yml') diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c1db01e..9971c38 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,17 @@ +variables: + SSH_LOCATION: "root@192.168.1.246" + run-tests: when: manual - trigger: - include: .experiments.gitlab-ci.yml + image: alpine + before_script: + - apk update && apk add openssh-client + - eval $(ssh-agent -s) + - chmod 400 "$SSH_PRIVATE_KEY" + - ssh-add "$SSH_PRIVATE_KEY" + - mkdir -p ~/.ssh + - chmod 700 ~/.ssh + - cp "$SSH_KNOWN_HOSTS" ~/.ssh/known_hosts + script: + - ssh $SSH_LOCATION 'cd /opt/candelabra && git pull && nixos-rebuild switch --flake .#default' + - ssh $SSH_LOCATION 'cd /opt/candelabra && just run-all-tests' -- cgit v1.2.3