blog-rekahsoft-ca/.drone.jsonnet
Collin J. Doering 913c2f0e67
.drone/ci.libsonnet: Add and renamed methods relocated from .drone.jsonnet: guix.pipeline, guix.step, awsDeployStep
* .drone.yml: Update file after updates to .drone.jsonnet

* .drone.jsonnet: Relocate guix_pipeline, guix_step, and deployStep to .drone/ci.libsonnet
library. Adjust existing function names to match new names in library.

Explicitly pass PLAN environment variable to ci.awsDeployStep for plan and apply stages
2021-12-11 13:19:55 -05:00

22 lines
716 B
Plaintext

local ci = import '.drone/ci.libsonnet';
[
ci.guix.pipeline("validate").withTrigger(ci.trigger.new().withEvent(["push", "pull_request", "tag"])).withSteps([
ci.guix.stepTimeMachine("build", "build -f guix.scm"),
ci.promoteStep("staging"),
ci.promoteStep("production"),
]),
ci.guix.pipeline("deploy").withTrigger(ci.trigger.new().withEvent("promote")).withSteps([
ci.awsDeployStep("init", "setup"),
ci.awsDeployStep("plan").withEnv({
PLAN: "out.plan"
}).withRuntimeEnvVar({
TF_VAR_site_static_files_dir: "$(guix time-machine -C channels.scm -- build -f guix.scm | grep -e '^.*-site$')"
}),
ci.awsDeployStep("deploy").withEnv({
PLAN: "out.plan"
}),
])
]