From 18490045b7d7dfe5c273e3f5d482223e073bf47c Mon Sep 17 00:00:00 2001 From: Sridhar Ratnakumar Date: Sat, 25 Mar 2023 10:50:41 -0400 Subject: [PATCH] Add Jenkinsfile --- Jenkinsfile | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..18a64e6 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,32 @@ +pipeline { + agent any + stages { + stage ('Nix build') { + steps { + sh 'nix build' + } + } + stage ('Nix develop shell') { + steps { + sh 'nix develop -c echo' + } + } + stage ('Flake checks') { + steps { + sh ''' + # Because 'nix flake check' is not system-aware + # See https://srid.ca/haskell-template/checks + nix run nixpkgs#sd \ + 'systems = nixpkgs.lib.systems.flakeExposed' \ + 'systems = [ "x86_64-linux" ]' \ + flake.nix + # Sandbox must be disabed for: + # https://github.com/srid/haskell-flake/issues/21 + nix \ + --option sandbox false \ + flake check -L + ''' + } + } + } +}