-
Notifications
You must be signed in to change notification settings - Fork 5
added runner reuse instead of register/unregister every time #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
…runner config instead
| podman run -it \ | ||
| -e PRIVATE_KEY="$(cat <private key filename>)" | ||
| --env-file=env.txt \ | ||
| -v ~/runner.toml:/home/gitlab-runner/.gitlab-runner/config.toml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this line is not necessary for this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since I do not set UNREGISTER_ON_EXIT and REGISTER_ON_ENTER by default it makes perfectly sense to volume/persist the runner config by default.
This however depends on how you want to run it.
| --custom-run-exec="$HOME"/run.py \ | ||
| --custom-cleanup-exec="$HOME"/cleanup.py | ||
| else | ||
| gitlab-runner start |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is already gitlab-runner run command below. Moreover, gitlab-runner start requires root.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nope, there is no gitlab-runner run in the script but a gitlab-runner register this does execute register and start in one command. That is actually why I changed this with this changeset so you can start without register. Same goes for unregister.
You may have needed root if your mounted config file (volume) had incorrect permissions/owner on your system.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry, the last line containing gitlab-runner run was hidden in the changeset so i did not see it and not realize.
I am not exactly sure what the difference between start and run is. The man page and docs do not make this more clear to me. is start as service and run as foreground? or do you need to call bost? Maybe you can help me understand this better?
It did however work for me like this and I did not face a issue till now.
Also I can tell register/unregister is not what I want all the time.
added option to not register/unregister every start/stop but reuse a runner config instead