update, add sendreports, use attic cache
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
cefc5fa508
commit
a48414255f
3 changed files with 54 additions and 22 deletions
30
.drone.yml
30
.drone.yml
|
@ -11,6 +11,18 @@ get:
|
||||||
path: local
|
path: local
|
||||||
name: password
|
name: password
|
||||||
---
|
---
|
||||||
|
kind: secret
|
||||||
|
name: attic_url
|
||||||
|
get:
|
||||||
|
path: attic
|
||||||
|
name: url
|
||||||
|
---
|
||||||
|
kind: secret
|
||||||
|
name: attic_key
|
||||||
|
get:
|
||||||
|
path: attic
|
||||||
|
name: key
|
||||||
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: kubernetes
|
type: kubernetes
|
||||||
name: build
|
name: build
|
||||||
|
@ -19,17 +31,19 @@ steps:
|
||||||
image: docker.io/jcollie/nixos-runner:latest
|
image: docker.io/jcollie/nixos-runner:latest
|
||||||
pull: always
|
pull: always
|
||||||
commands:
|
commands:
|
||||||
- nix build -L .#webserver
|
- nix --extra-substituters $PLUGIN_ATTIC_URL --extra-trusted-public-keys $PLUGIN_ATTIC_KEY build -L .#webserver
|
||||||
- push-container result --repository network/healthchecks-webserver
|
- push-container result --repository network/healthchecks-webserver
|
||||||
- nix build -L .#smtpd
|
- nix --extra-substituters $PLUGIN_ATTIC_URL --extra-trusted-public-keys $PLUGIN_ATTIC_KEY build -L .#smtpd
|
||||||
- push-container result --repository network/healthchecks-smtpd
|
- push-container result --repository network/healthchecks-smtpd
|
||||||
- nix build -L .#sendalerts
|
- nix --extra-substituters $PLUGIN_ATTIC_URL --extra-trusted-public-keys $PLUGIN_ATTIC_KEY build -L .#sendalerts
|
||||||
- push-container result --repository network/healthchecks-sendalerts
|
- push-container result --repository network/healthchecks-sendalerts
|
||||||
- nix build -L .#maintenance
|
- nix --extra-substituters $PLUGIN_ATTIC_URL --extra-trusted-public-keys $PLUGIN_ATTIC_KEY build -L .#sendreports
|
||||||
|
- push-container result --repository network/healthchecks-sendreports
|
||||||
|
- nix --extra-substituters $PLUGIN_ATTIC_URL --extra-trusted-public-keys $PLUGIN_ATTIC_KEY build -L .#maintenance
|
||||||
- push-container result --repository network/healthchecks-maintenance
|
- push-container result --repository network/healthchecks-maintenance
|
||||||
- nix build -L .#migrate
|
- nix --extra-substituters $PLUGIN_ATTIC_URL --extra-trusted-public-keys $PLUGIN_ATTIC_KEY build -L .#migrate
|
||||||
- push-container result --repository network/healthchecks-migrate
|
- push-container result --repository network/healthchecks-migrate
|
||||||
- nix build -L .#static
|
- nix --extra-substituters $PLUGIN_ATTIC_URL --extra-trusted-public-keys $PLUGIN_ATTIC_KEY build -L .#static
|
||||||
- push-container result --repository network/healthchecks-static
|
- push-container result --repository network/healthchecks-static
|
||||||
settings:
|
settings:
|
||||||
registry: r.ocj.io
|
registry: r.ocj.io
|
||||||
|
@ -37,6 +51,10 @@ steps:
|
||||||
from_secret: local_username
|
from_secret: local_username
|
||||||
password:
|
password:
|
||||||
from_secret: local_password
|
from_secret: local_password
|
||||||
|
attic_url:
|
||||||
|
from_secret: attic_url
|
||||||
|
attic_key:
|
||||||
|
from_secret: attic_key
|
||||||
- name: notify
|
- name: notify
|
||||||
image: plugins/webhook
|
image: plugins/webhook
|
||||||
failure: ignore
|
failure: ignore
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1682879489,
|
"lastModified": 1684754342,
|
||||||
"narHash": "sha256-sASwo8gBt7JDnOOstnps90K1wxmVfyhsTPPNTGBPjjg=",
|
"narHash": "sha256-plGnjnbnPLoZCTdQX21oT7xliQhFtgcWlkuDHgtEb1o=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "da45bf6ec7bbcc5d1e14d3795c025199f28e0de0",
|
"rev": "7084250df3d7f9735087d3234407f3c1fc2400e3",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
40
flake.nix
40
flake.nix
|
@ -151,6 +151,20 @@
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
sendreports = pkgs.dockerTools.buildLayeredImage (
|
||||||
|
pkgs.lib.attrsets.recursiveUpdate baseImage {
|
||||||
|
name = "healthchecks-sendreports";
|
||||||
|
config = {
|
||||||
|
Cmd = [
|
||||||
|
"${self.packages.${system}.healthchecks}/app/manage.py"
|
||||||
|
"sendreports"
|
||||||
|
"--loop"
|
||||||
|
];
|
||||||
|
ExposedPorts = { };
|
||||||
|
};
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
maintenance =
|
maintenance =
|
||||||
let
|
let
|
||||||
script = pkgs.writeShellScript "maintenance" ''
|
script = pkgs.writeShellScript "maintenance" ''
|
||||||
|
@ -163,18 +177,17 @@
|
||||||
${pkgs.curl}/bin/curl $CURL_OPTIONS http://webserver.healthchecks.svc/ping/$MAINTENANCE_CHECK_UUID
|
${pkgs.curl}/bin/curl $CURL_OPTIONS http://webserver.healthchecks.svc/ping/$MAINTENANCE_CHECK_UUID
|
||||||
'';
|
'';
|
||||||
in
|
in
|
||||||
pkgs.dockerTools.buildLayeredImage
|
pkgs.dockerTools.buildLayeredImage (
|
||||||
(
|
pkgs.lib.attrsets.recursiveUpdate baseImage {
|
||||||
pkgs.lib.attrsets.recursiveUpdate baseImage {
|
name = "healthchecks-maintenance";
|
||||||
name = "healthchecks-maintenance";
|
config = {
|
||||||
config = {
|
Cmd = [
|
||||||
Cmd = [
|
"${script}"
|
||||||
"${script}"
|
];
|
||||||
];
|
ExposedPorts = { };
|
||||||
ExposedPorts = { };
|
};
|
||||||
};
|
}
|
||||||
}
|
);
|
||||||
);
|
|
||||||
|
|
||||||
migrate = pkgs.dockerTools.buildLayeredImage (
|
migrate = pkgs.dockerTools.buildLayeredImage (
|
||||||
pkgs.lib.attrsets.recursiveUpdate baseImage {
|
pkgs.lib.attrsets.recursiveUpdate baseImage {
|
||||||
|
@ -206,10 +219,11 @@
|
||||||
harakiri = 10
|
harakiri = 10
|
||||||
http-socket = :8000
|
http-socket = :8000
|
||||||
master
|
master
|
||||||
|
max-fd = 10000
|
||||||
mime-file = ${pkgs.mailcap}/etc/nginx/mime.types
|
mime-file = ${pkgs.mailcap}/etc/nginx/mime.types
|
||||||
module = hc.wsgi:application
|
module = hc.wsgi:application
|
||||||
plugins = python3
|
plugins = python3
|
||||||
post-buffering = 4096
|
post-buffering = 16192
|
||||||
processes = 4
|
processes = 4
|
||||||
threads = 1
|
threads = 1
|
||||||
thunder-lock
|
thunder-lock
|
||||||
|
|
Loading…
Reference in a new issue