Drone configuration

CHANNEL_SWITCHER_KEYBearer token for Channel Rest Api of
CLOUDFLARE_TOKENBearer token for Cloudflare to communicate with DNS entires
DOMAINFull domain that points out to our testing server
HETZNER_TOKENBearer token for Hetzner to request server creation and destruction
ZONE_IDIdentificator of a zone to which all our DNS entries are related
Cronjob TitleBranchCronjob Value
weekly-builddevelopment@weeklyOur main job we run every week to ensure the upstream of our application is able to deploy onto a clean server completely. We'd like to build everyday, but for now we need to solve acme problem, since it rejects our requests if we do it every 24 hours...

Drone pipeline

Stage Default:

cloneCheckout the HEAD commit
deployCreate script and send it with a POST request to the clean server to deploy our testing environment
dnsCreate DNS entries for subdomains to ensure networking and certificates for properly
sleepWait for the environment to build (it takes a while...)
testRequest for overall status, do basic checks on the server
teardownDestroy the environment and all DNS entries, tests are over!
switch-channelUpdate upstream NixOS channel at

It is ensured that teardown step must happen whether the pipeline fails or succeeds, because we need the server to be clean before every new job. It is done by forcing the step to be called with status trigger:

- name: teardown
  . . . 
    - failure
    - success