2020-05-09 12:48:37 +00:00
|
|
|
stages:
|
|
|
|
- build
|
2020-05-09 17:53:17 +00:00
|
|
|
- deploy
|
2020-05-09 12:48:37 +00:00
|
|
|
|
2020-05-08 16:48:34 +00:00
|
|
|
nixCache:
|
2020-05-09 12:48:37 +00:00
|
|
|
stage: build
|
2020-05-08 16:48:34 +00:00
|
|
|
image: "nixos/nix:latest"
|
2020-05-09 22:49:32 +00:00
|
|
|
only:
|
|
|
|
- disabled_while_iterating
|
2020-05-08 16:48:34 +00:00
|
|
|
script:
|
2020-05-08 17:02:42 +00:00
|
|
|
- "mkdir -p ops/secrets"
|
|
|
|
- "cp ${OPS_SECRETS_DEFAULT_NIX} ops/secrets/default.nix"
|
2020-05-09 12:48:37 +00:00
|
|
|
- "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"
|
2020-05-09 17:53:17 +00:00
|
|
|
|
|
|
|
.deploy:
|
|
|
|
stage: deploy
|
|
|
|
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"
|