2021-12-11 17:53:01 +00:00
|
|
|
local ci = import '.drone/ci.libsonnet';
|
2021-12-09 15:34:37 +00:00
|
|
|
|
|
|
|
[
|
2021-12-11 18:19:55 +00:00
|
|
|
ci.guix.pipeline("validate").withTrigger(ci.trigger.new().withEvent(["push", "pull_request", "tag"])).withSteps([
|
|
|
|
ci.guix.stepTimeMachine("build", "build -f guix.scm"),
|
2021-12-10 04:03:53 +00:00
|
|
|
ci.promoteStep("staging"),
|
|
|
|
ci.promoteStep("production"),
|
2021-12-09 15:34:37 +00:00
|
|
|
]),
|
|
|
|
|
2021-12-11 18:19:55 +00:00
|
|
|
ci.guix.pipeline("deploy").withTrigger(ci.trigger.new().withEvent("promote")).withSteps([
|
|
|
|
ci.awsDeployStep("init", "setup"),
|
|
|
|
ci.awsDeployStep("plan").withEnv({
|
|
|
|
PLAN: "out.plan"
|
|
|
|
}).withRuntimeEnvVar({
|
2021-12-09 23:12:57 +00:00
|
|
|
TF_VAR_site_static_files_dir: "$(guix time-machine -C channels.scm -- build -f guix.scm | grep -e '^.*-site$')"
|
|
|
|
}),
|
2021-12-11 18:19:55 +00:00
|
|
|
ci.awsDeployStep("deploy").withEnv({
|
|
|
|
PLAN: "out.plan"
|
|
|
|
}),
|
2021-12-09 15:34:37 +00:00
|
|
|
])
|
|
|
|
]
|