aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-12-01 17:05:32 +0100
committerAlex Auvolat <alex@adnab.me>2022-12-01 17:05:32 +0100
commitee18ddcebcdd5744f7a5abaecfd1c4441ba69c35 (patch)
tree4e7cdfd3802eb6d50d73d61d61f549f24c7ceb8b
parent0ae7f5fbd924a293dcd3f1b6b61fc3cc46bd3876 (diff)
downloadtricot-ee18ddcebcdd5744f7a5abaecfd1c4441ba69c35.tar.gz
tricot-ee18ddcebcdd5744f7a5abaecfd1c4441ba69c35.zip
Add Drone CI
-rw-r--r--.drone.yml38
-rw-r--r--README.md2
-rw-r--r--flake.nix25
3 files changed, 55 insertions, 10 deletions
diff --git a/.drone.yml b/.drone.yml
new file mode 100644
index 0000000..f49665c
--- /dev/null
+++ b/.drone.yml
@@ -0,0 +1,38 @@
+---
+kind: pipeline
+name: default
+
+node:
+ nix-daemon: 1
+
+steps:
+ - name: check formatting
+ image: nixpkgs/nix:nixos-22.05
+ commands:
+ - nix-shell -p cargo --run "cargo fmt -- --check"
+
+ - name: build
+ image: nixpkgs/nix:nixos-22.05
+ commands:
+ - nix build --extra-experimental-features nix-command --extra-experimental-features flakes .#debug.x86_64-linux.tricot
+
+ - name: test
+ image: nixpkgs/nix:nixos-22.05
+ commands:
+ - nix build --extra-experimental-features nix-command --extra-experimental-features flakes .#test.x86_64-linux.tricot
+ - ./result-bin/bin/tricot-*
+
+trigger:
+ event:
+ - custom
+ - push
+ - pull_request
+ - tag
+ - cron
+
+
+---
+kind: signature
+hmac: c99528a32d4c9f5016e6143e08291c99a8b248880f7dc3ee3550803e16cd28ad
+
+...
diff --git a/README.md b/README.md
index 503b686..74ee06b 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,7 @@
# Tricot
+[![Build Status](https://drone.deuxfleurs.fr/api/badges/Deuxfleurs/tricot/status.svg)](https://drone.deuxfleurs.fr/Deuxfleurs/tricot)
+
Tricot is a reverse-proxy for exposing your services via TLS that integrates well with Consul and Nomad.
Tricot does the following things:
diff --git a/flake.nix b/flake.nix
index 450a5a1..351bd41 100644
--- a/flake.nix
+++ b/flake.nix
@@ -15,17 +15,22 @@
overlays = [ cargo2nix.overlays.default ];
};
packageFun = import ./Cargo.nix;
- packageSet = pkgs.rustBuilder.makePackageSet {
- inherit packageFun;
- release = true;
- rustVersion = "1.63.0";
- };
- tricot = packageSet.workspace.tricot {
- compileMode = "build";
- };
+ rustVersion = "1.63.0";
+
+ compile = args: compileMode:
+ let
+ packageSet = pkgs.rustBuilder.makePackageSet ({
+ inherit packageFun rustVersion;
+ } // args);
+ in
+ packageSet.workspace.tricot {
+ inherit compileMode;
+ };
in
{
- packages.x86_64-linux.tricot = tricot;
- packages.x86_64-linux.default = tricot;
+ test.x86_64-linux.tricot = compile { release = false; } "test";
+ debug.x86_64-linux.tricot = compile { release = false; } "build";
+ packages.x86_64-linux.tricot = compile { release = true; } "build";
+ packages.x86_64-linux.default = self.packages.x86_64-linux.tricot;
};
}