File tree 1 file changed +3
-11
lines changed
1 file changed +3
-11
lines changed Original file line number Diff line number Diff line change 3
3
config ,
4
4
pkgs ,
5
5
hostName ,
6
- self ,
7
6
...
8
7
} : {
9
8
publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHaa82NwBC+ty4Wyeuf5kdava7huSYF6k0NYF2ahwayW" ;
104
103
services . buildkite-agents . nix-build = {
105
104
tokenPath = config . age . secrets . buildkite-token . path ;
106
105
privateSshKeyPath = config . age . secrets . buildkite-ssh-key . path ;
107
- runtimePackages = [ pkgs . bash pkgs . gnutar pkgs . gzip pkgs . git pkgs . nix pkgs . cachix ] ;
106
+ runtimePackages = [ pkgs . bash pkgs . gnutar pkgs . gzip pkgs . git pkgs . nix pkgs . cachix pkgs . procps ] ;
108
107
extraConfig = ''
109
108
spawn=4
110
109
'' ;
122
121
pre-command = ''
123
122
#!/usr/bin/env bash
124
123
cachix use "$CACHE_NAME"
125
- cachix watch-store "$CACHE_NAME" &
126
- CACHIX_PID="$!"
127
- echo cachix pid is "$CACHIX_PID"
128
- echo "$CACHIX_PID" > /tmp/"$BUILDKITE_AGENT_ID".cachix.pid
129
- ps aux | grep cachix
130
124
'' ;
131
- post- command = ''
125
+ command = ''
132
126
#!/usr/bin/env bash
133
- CACHIX_PID="$(cat /tmp/"$BUILDKITE_AGENT_ID".cachix.pid)"
134
- echo "killing cachix with pid $CACHIX_PID"
135
- kill "$CACHIX_PID" || true
127
+ cachix --verbose watch-exec "$CACHE_NAME" -- "$BUILDKITE_COMMAND"
136
128
'' ;
137
129
} ;
138
130
} ;
You can’t perform that action at this time.
0 commit comments