Compare commits

..

1 Commits

Author SHA1 Message Date
c96782f220
Build .drone.yml with jsonnet instead of drone
Some checks failed
continuous-integration/drone/push Build is failing
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.
2020-10-15 19:32:29 +11:00
3 changed files with 94 additions and 107 deletions

View File

@ -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" },
},
}
]
};

View File

@ -1,103 +1,91 @@
---
{
"environment": {
"CACHIX_CACHE": "xeals",
"CACHIX_SIGNING_KEY": {
"from_secret": "cachix_key"
},
"NUR_REPO": "xeals"
},
"kind": "pipeline",
"name": "nixpkgs-unstable",
"steps": [
{
"commands": [
"nix-channel --add https://nixos.org/channels/nixpkgs-unstable nixos",
"nix-channel --update",
"nix-build ci.nix -A buildOutputs",
"nix eval -f default.nix 'lib'",
"nix eval -f default.nix 'modules'",
"nix eval -f default.nix 'overlays'"
],
"image": "nixos/nix",
"name": "build"
},
{
"commands": [
"nix-build ci.nix -A cacheOutputs | cachix push \"${CACHIX_CACHE}\""
],
"image": "nixpkgs/cachix",
"name": "deploy"
}
],
"type": "docker"
}
kind: pipeline
type: docker
name: nixpkgs-unstable
platform:
os: linux
arch: amd64
steps:
- name: build
image: nixos/nix
commands:
- nix-channel --add https://nixos.org/channels/nixpkgs-unstable nixos
- nix-channel --update
- nix-build ci.nix -A buildOutputs
- nix eval -f default.nix 'lib'
- nix eval -f default.nix 'modules'
- nix eval -f default.nix 'overlays'
- name: deploy
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
---
{
"environment": {
"CACHIX_CACHE": "xeals",
"CACHIX_SIGNING_KEY": {
"from_secret": "cachix_key"
},
"NUR_REPO": "xeals"
},
"kind": "pipeline",
"name": "nixos-unstable",
"steps": [
{
"commands": [
"nix-channel --add https://nixos.org/channels/nixos-unstable nixos",
"nix-channel --update",
"nix-build ci.nix -A buildOutputs",
"nix eval -f default.nix 'lib'",
"nix eval -f default.nix 'modules'",
"nix eval -f default.nix 'overlays'"
],
"image": "nixos/nix",
"name": "build"
},
{
"commands": [
"nix-build ci.nix -A cacheOutputs | cachix push \"${CACHIX_CACHE}\""
],
"image": "nixpkgs/cachix",
"name": "deploy"
}
],
"type": "docker"
}
kind: pipeline
type: docker
name: nixos-unstable
platform:
os: linux
arch: amd64
steps:
- name: build
image: nixos/nix
commands:
- nix-channel --add https://nixos.org/channels/nixos-unstable nixos
- nix-channel --update
- nix-build ci.nix -A buildOutputs
- nix eval -f default.nix 'lib'
- nix eval -f default.nix 'modules'
- nix eval -f default.nix 'overlays'
- name: deploy
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
---
{
"environment": {
"CACHIX_CACHE": "xeals",
"CACHIX_SIGNING_KEY": {
"from_secret": "cachix_key"
},
"NUR_REPO": "xeals"
},
"kind": "pipeline",
"name": "nixos-20.03",
"steps": [
{
"commands": [
"nix-channel --add https://nixos.org/channels/nixos-20.03 nixos",
"nix-channel --update",
"nix-build ci.nix -A buildOutputs",
"nix eval -f default.nix 'lib'",
"nix eval -f default.nix 'modules'",
"nix eval -f default.nix 'overlays'"
],
"image": "nixos/nix",
"name": "build"
},
{
"commands": [
"nix-build ci.nix -A cacheOutputs | cachix push \"${CACHIX_CACHE}\""
],
"image": "nixpkgs/cachix",
"name": "deploy"
}
],
"type": "docker"
}
kind: pipeline
type: docker
name: nixos-20.03
platform:
os: linux
arch: amd64
steps:
- name: build
image: nixos/nix
commands:
- nix-channel --add https://nixos.org/channels/nixos-20.03 nixos
- nix-channel --update
- nix-build ci.nix -A buildOutputs
- nix eval -f default.nix 'lib'
- nix eval -f default.nix 'modules'
- nix eval -f default.nix 'overlays'
- name: deploy
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
...

View File

@ -2,6 +2,6 @@
pkgs.mkShell {
buildInputs = [
pkgs.jsonnet
pkgs.jsonnet pkgs.drone-cli
];
}