diff options
author | Aria Shrimpton <me@aria.rip> | 2024-01-29 23:10:11 +0000 |
---|---|---|
committer | Aria Shrimpton <me@aria.rip> | 2024-01-29 23:10:11 +0000 |
commit | d976cddbea716de16e8b949415aa75922662a882 (patch) | |
tree | b6b2916a35dd14854638de2f5ec038136eff1c51 | |
parent | 4ed1a7f603d8815137a9cb8eeb2284bcf6f6075d (diff) |
update ci
-rw-r--r-- | .experiments.gitlab-ci.yml | 30 | ||||
-rw-r--r-- | .gitlab-ci.yml | 17 |
2 files changed, 15 insertions, 32 deletions
diff --git a/.experiments.gitlab-ci.yml b/.experiments.gitlab-ci.yml deleted file mode 100644 index 8a6c3a7..0000000 --- a/.experiments.gitlab-ci.yml +++ /dev/null @@ -1,30 +0,0 @@ -stages: -- deploy -- test - -variables: - SSH_LOCATION: "root@192.168.1.246" - -deploy: - stage: deploy - before_script: - - 'command -v ssh-agent >/dev/null || ( apt-get update -y && apt-get install openssh-client -y )' - - eval $(ssh-agent -s) - - chmod 400 "$SSH_PRIVATE_KEY" - - ssh-add "$SSH_PRIVATE_KEY" - - mkdir -p ~/.ssh - - chmod 700 ~/.ssh - script: - - ssh $SSH_LOCATION 'cd /opt/candelabra && git pull && nixos-rebuild switch --flake .#default' - -run: - stage: deploy - before_script: - - 'command -v ssh-agent >/dev/null || ( apt-get update -y && apt-get install openssh-client -y )' - - eval $(ssh-agent -s) - - chmod 400 "$SSH_PRIVATE_KEY" - - ssh-add "$SSH_PRIVATE_KEY" - - mkdir -p ~/.ssh - - chmod 700 ~/.ssh - script: - - ssh $SSH_LOCATION 'cd /opt/candelabra && just run-all-tests' 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' |