Define Buildkite pipelines corresponding to git server hooks
I think maintaining a 1:1 correspondence with the git server hook makes sense right now. Let's try it out!
This commit is contained in:
		
							parent
							
								
									098ca0da15
								
							
						
					
					
						commit
						4241339963
					
				
					 3 changed files with 20 additions and 19 deletions
				
			
		| 
						 | 
				
			
			@ -1,17 +0,0 @@
 | 
			
		|||
{ pkgs, ... }:
 | 
			
		||||
 | 
			
		||||
let
 | 
			
		||||
  pipeline.steps = [
 | 
			
		||||
    {
 | 
			
		||||
      key = "lint";
 | 
			
		||||
      command = "${pkgs.git-secrets}/bin/git-secrets --scan-history";
 | 
			
		||||
      label = ":broom: lint";
 | 
			
		||||
    }
 | 
			
		||||
    {
 | 
			
		||||
      key = "build";
 | 
			
		||||
      command = "nix-build . -I briefcase=$(pwd) --no-out-link --show-trace";
 | 
			
		||||
      label = ":nix: build";
 | 
			
		||||
      depends_on = "lint";
 | 
			
		||||
    }
 | 
			
		||||
  ];
 | 
			
		||||
in pkgs.writeText "briefcase.yaml" (builtins.toJSON pipeline)
 | 
			
		||||
| 
						 | 
				
			
			@ -3,6 +3,12 @@
 | 
			
		|||
let
 | 
			
		||||
  pipeline.steps = [
 | 
			
		||||
    {
 | 
			
		||||
      key = "build-briefcase";
 | 
			
		||||
      command = "nix-build . -I briefcase=$(pwd) --no-out-link --show-trace";
 | 
			
		||||
      label = ":nix: build briefcase";
 | 
			
		||||
    }
 | 
			
		||||
    {
 | 
			
		||||
      key = "build-socrates";
 | 
			
		||||
      command = ''
 | 
			
		||||
        nix-build '<nixpkgs/nixos>' \
 | 
			
		||||
          -I briefcase="$(pwd)" \
 | 
			
		||||
| 
						 | 
				
			
			@ -12,7 +18,8 @@ let
 | 
			
		|||
          --no-out-link \
 | 
			
		||||
          --show-trace
 | 
			
		||||
      '';
 | 
			
		||||
      label = ":nix: build";
 | 
			
		||||
      label = ":nix: build socrates";
 | 
			
		||||
      depends_on = "build-briefcase";
 | 
			
		||||
    }
 | 
			
		||||
  ];
 | 
			
		||||
in pkgs.writeText "socrates.yml" (builtins.toJSON pipeline)
 | 
			
		||||
in pkgs.writeText "pipeline.yaml" (builtins.toJSON pipeline)
 | 
			
		||||
							
								
								
									
										11
									
								
								ci/pipelines/pre-receive.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								ci/pipelines/pre-receive.nix
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,11 @@
 | 
			
		|||
{ pkgs, ... }:
 | 
			
		||||
 | 
			
		||||
let
 | 
			
		||||
  pipeline.steps = [
 | 
			
		||||
    {
 | 
			
		||||
      key = "lint";
 | 
			
		||||
      command = "${pkgs.git-secrets}/bin/git-secrets --scan-history";
 | 
			
		||||
      label = ":broom: lint";
 | 
			
		||||
    }
 | 
			
		||||
  ];
 | 
			
		||||
in pkgs.writeText "pipeline.yaml" (builtins.toJSON pipeline)
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue