update, add sendreports, use attic cache
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Jeffrey C. Ollie 2023-05-23 22:07:16 -05:00
parent cefc5fa508
commit a48414255f
Signed by: jeff
GPG key ID: 6F86035A6D97044E
3 changed files with 54 additions and 22 deletions

View file

@ -11,6 +11,18 @@ get:
path: local
name: password
---
kind: secret
name: attic_url
get:
path: attic
name: url
---
kind: secret
name: attic_key
get:
path: attic
name: key
---
kind: pipeline
type: kubernetes
name: build
@ -19,17 +31,19 @@ steps:
image: docker.io/jcollie/nixos-runner:latest
pull: always
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
- 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
- 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
- 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
- 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
- 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
settings:
registry: r.ocj.io
@ -37,6 +51,10 @@ steps:
from_secret: local_username
password:
from_secret: local_password
attic_url:
from_secret: attic_url
attic_key:
from_secret: attic_key
- name: notify
image: plugins/webhook
failure: ignore

View file

@ -2,11 +2,11 @@
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1682879489,
"narHash": "sha256-sASwo8gBt7JDnOOstnps90K1wxmVfyhsTPPNTGBPjjg=",
"lastModified": 1684754342,
"narHash": "sha256-plGnjnbnPLoZCTdQX21oT7xliQhFtgcWlkuDHgtEb1o=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "da45bf6ec7bbcc5d1e14d3795c025199f28e0de0",
"rev": "7084250df3d7f9735087d3234407f3c1fc2400e3",
"type": "github"
},
"original": {

View file

@ -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 =
let
script = pkgs.writeShellScript "maintenance" ''
@ -163,18 +177,17 @@
${pkgs.curl}/bin/curl $CURL_OPTIONS http://webserver.healthchecks.svc/ping/$MAINTENANCE_CHECK_UUID
'';
in
pkgs.dockerTools.buildLayeredImage
(
pkgs.lib.attrsets.recursiveUpdate baseImage {
name = "healthchecks-maintenance";
config = {
Cmd = [
"${script}"
];
ExposedPorts = { };
};
}
);
pkgs.dockerTools.buildLayeredImage (
pkgs.lib.attrsets.recursiveUpdate baseImage {
name = "healthchecks-maintenance";
config = {
Cmd = [
"${script}"
];
ExposedPorts = { };
};
}
);
migrate = pkgs.dockerTools.buildLayeredImage (
pkgs.lib.attrsets.recursiveUpdate baseImage {
@ -206,10 +219,11 @@
harakiri = 10
http-socket = :8000
master
max-fd = 10000
mime-file = ${pkgs.mailcap}/etc/nginx/mime.types
module = hc.wsgi:application
plugins = python3
post-buffering = 4096
post-buffering = 16192
processes = 4
threads = 1
thunder-lock