Skip to content

Allow user to run custom commands before starting Runner

Daniel requested to merge Lohausen/gitlab-runner:custom-commands into master

This MR extends the current helm chart to allow injecting shell commands before the entrypoint. Our use-case is to create a docker config in the gitlab-runner home directory for the ECR credentials via:

preEntrypointCommands:
  - mkdir -p /home/gitlab-runner/.docker/
  - "echo '{\"credHelpers\": {\"AWS_ACCOUNT_IND.dkr.ecr.eu-central-1.amazonaws.com\": \"ecr-login\" }}' > /home/gitlab-runner/.docker/config.json"

Let me know if anything else is missing on this MR.

Edited by Steve Xuereb

Merge request reports