Skip to content

Commit 90c1036

Browse files
committed
Remove root-owned files
Some of the SDK's tests are running as root and create root-owned files. These files cannot be deleted by BuildKite's agent since the agent is running as its own user. This change removes all root-owned files before checking out a Git repository and finishing each build job. Signed-off-by: Kazuyoshi Kato <[email protected]>
1 parent e550269 commit 90c1036

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.buildkite/hooks/pre-checkout

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#! /bin/sh
2+
set -euo pipefail
3+
4+
find . -user root -print0 | xargs -0 sudo rm -rf '{}'

.buildkite/hooks/pre-exit

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
#!/bin/bash
2+
set -euo pipefail
23

3-
sudo rm -rf testdata/logs
4+
find . -user root -print0 | xargs -0 sudo rm -rf '{}'

0 commit comments

Comments
 (0)