Skip to content

Commit

Permalink
fix write permission in pre-start
Browse files Browse the repository at this point in the history
  • Loading branch information
gmllt committed Dec 18, 2024
1 parent eb1563f commit a59fb27
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions jobs/gitlab-runner/templates/pre-start.erb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export https_proxy=<%= proxy %>
export no_proxy=<%= proxy %>
<% end -%>

runuser -u vcap -- /var/vcap/packages/gitlab-runner/bin/gitlab-runner register \
/var/vcap/packages/gitlab-runner/bin/gitlab-runner register \
--non-interactive \
--config "${CONFIG_FILE}" \
--name "${RUNNER_NAME}" \
Expand Down Expand Up @@ -54,10 +54,12 @@ runuser -u vcap -- /var/vcap/packages/gitlab-runner/bin/gitlab-runner register \
sed -i \
-e '/log_format/d' \
-e '/log_level/d' \
"${STORE_DIR}/config.toml"
"${CONFIG_FILE}"

sed -i \
-e 's/concurrent *=.*/concurrent = <%= p("runner.concurent") %>/g' \
-e '/concurrent/alog_format = <%= p("runner.log_format", "info").to_json %>' \
-e '/concurrent/alog_level = <%= p("runner.log_level", "info").to_json %>' \
"${STORE_DIR}/config.toml"
"${CONFIG_FILE}"

chown -R vcap:vcap "${STORE_DIR}"

0 comments on commit a59fb27

Please sign in to comment.