Luke Granger-Brown
84f607d7cf
This won't work yet, since the deployer user isn't correctly configured, but this should at least trigger the right sets of things to happen.
28 lines
717 B
YAML
28 lines
717 B
YAML
stages:
|
|
- build
|
|
- deploy
|
|
|
|
nixCache:
|
|
stage: build
|
|
image: "nixos/nix:latest"
|
|
script:
|
|
- "mkdir -p ops/secrets"
|
|
- "cp ${OPS_SECRETS_DEFAULT_NIX} ops/secrets/default.nix"
|
|
- "nix build -v -f ./ci-root.nix --substituters \"https://cache.nixos.org s3://lukegb-nix-cache?endpoint=storage.googleapis.com&trusted=1\""
|
|
- "nix copy -v --to 's3://lukegb-nix-cache?endpoint=storage.googleapis.com' ./result"
|
|
|
|
.deploy:
|
|
stage: deploy
|
|
rules:
|
|
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
|
|
variables:
|
|
SSH_ARGS: ''
|
|
script: './hack/deploy.sh "$DEPLOY_TO" "$SSH_ARGS"'
|
|
tags:
|
|
- deployer
|
|
|
|
ixvm-fra01:
|
|
extends: .deploy
|
|
variables:
|
|
# TODO(lukegb): DNS...
|
|
DEPLOY_TO: "141.98.136.124"
|