diff options
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r-- | .gitlab-ci.yml | 17 |
1 files changed, 15 insertions, 2 deletions
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' |