From c96782f220eab36f23499d119e55824de8aa8b80 Mon Sep 17 00:00:00 2001 From: xeals Date: Thu, 15 Oct 2020 19:19:49 +1100 Subject: [PATCH] Build .drone.yml with jsonnet instead of drone The Drone tool completely ignores the environment key, because of course it does. It seems the CLI tool has been abandoned for feature parity here in favour of the built-in enterprise jsonnet parser, so guess we're doing this. --- .drone.jsonnet | 13 ++++++------- .drone.yml | 15 +++++++++++++++ 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/.drone.jsonnet b/.drone.jsonnet index cf32570..356bab3 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -2,12 +2,6 @@ local Pipeline(channel) = { kind: "pipeline", type: "docker", name: channel, - environment: { - NUR_REPO: "xeals", - // NIX_PATH: "nixpkgs=channel:" + channel, - CACHIX_CACHE: "xeals", - CACHIX_SIGNING_KEY: { from_secret: "cachix_key" }, - }, steps: [ { name: "build", @@ -28,7 +22,12 @@ local Pipeline(channel) = { 'nix-build ci.nix -A cacheOutputs | cachix push "${CACHIX_CACHE}"'//, // 'if [[ "cron" != "${DRONE_BUILD_EVENT}" && -z "${DRONE_PULL_REQUEST}" && "master" = "${DRONE_BRANCH}" ]]; then // curl -XPOST "https://nur-update.herokuapp.com/update?repo=${NUR_REPO}"; fi' - ] + ], + environment: { + NUR_REPO: "xeals", + CACHIX_CACHE: "xeals", + CACHIX_SIGNING_KEY: { from_secret: "cachix_key" }, + }, } ] }; diff --git a/.drone.yml b/.drone.yml index e44bac9..f47cd24 100644 --- a/.drone.yml +++ b/.drone.yml @@ -22,6 +22,11 @@ steps: image: nixpkgs/cachix commands: - nix-build ci.nix -A cacheOutputs | cachix push "${CACHIX_CACHE}" + environment: + CACHIX_CACHE: xeals + CACHIX_SIGNING_KEY: + from_secret: cachix_key + NUR_REPO: xeals --- kind: pipeline @@ -47,6 +52,11 @@ steps: image: nixpkgs/cachix commands: - nix-build ci.nix -A cacheOutputs | cachix push "${CACHIX_CACHE}" + environment: + CACHIX_CACHE: xeals + CACHIX_SIGNING_KEY: + from_secret: cachix_key + NUR_REPO: xeals --- kind: pipeline @@ -72,5 +82,10 @@ steps: image: nixpkgs/cachix commands: - nix-build ci.nix -A cacheOutputs | cachix push "${CACHIX_CACHE}" + environment: + CACHIX_CACHE: xeals + CACHIX_SIGNING_KEY: + from_secret: cachix_key + NUR_REPO: xeals ...