From da4237c666f5e781b4afc22c4cd716cf434cb6a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=BChnel?= Date: Mon, 20 Jan 2020 10:07:54 +0100 Subject: [PATCH] buildkite not running as root anymore --- .../agent-debian-testing-clang8-buildkite/start_agent.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/containers/agent-debian-testing-clang8-buildkite/start_agent.sh b/containers/agent-debian-testing-clang8-buildkite/start_agent.sh index f78a16c..0b8e6c9 100755 --- a/containers/agent-debian-testing-clang8-buildkite/start_agent.sh +++ b/containers/agent-debian-testing-clang8-buildkite/start_agent.sh @@ -15,17 +15,18 @@ SSD_ROOT="/mnt/disks/ssd0" AGENT_ROOT="${SSD_ROOT}/agent" +USER=buildkite-agent # prepare root folder for Jenkins agent mkdir -p "${AGENT_ROOT}" -chown -R buildkite:buildkite "${AGENT_ROOT}" +chown -R ${USER}:${USER} "${AGENT_ROOT}" # prepare folder for ccache mkdir -p "${CCACHE_PATH}" -chown -R buildkite:buildkite "${CCACHE_PATH}" +chown -R ${USER}:${USER} "${CCACHE_PATH}" # TODO(kuhnel): wipe the disk(s) on startup # start the buildkite agent -buildkite-agent start --tags "os=linux" --build-path=/mnt/disks/ssd0/agent \ - --token `cat /credentials/buildkite-token` \ No newline at end of file +su buildkite-agent -c "buildkite-agent start --tags \"os=linux\" --build-path=/mnt/disks/ssd0/agent \ + --token `cat /credentials/buildkite-token`" \ No newline at end of file