Create gitlab-runner home without skeletons files
What does this MR do?
gitlab-runner user is a technical user and for that reason should not contain bash profile scripts.
Why was this MR needed?
Solves:
Replaces:
Are there points in the code the reviewer needs to double check?
No.
-
gitlab-runner is a technical user. For that reason, it should never have had profile scripts in the first place.
-
useradd
(from shadow-utils) supports to--skel /dev/null
in at leastdebian:jessie
,centos:6
, etc. It's actually used since at least 2005: http://www.linuxfromscratch.org/lfs/downloads/6.1.1/
You can even find more references to -k /dev/null
:
-
http://www.linuxfromscratch.org/lfs/view/7.9-rc1/chapter04/addinguser.html
-
https://renenyffenegger.ch/notes/Linux/shell/commands/useradd
Concerning MR 1523, I really don't see why installation of the gitlab-runner should require a envvar (such as GITLAB_RUNNER_DISABLE_SKEL=true sudo apt-get install -y gitlab-runner
. For one, the default behavior should be the opposite if we were to use a envvar.
Does this MR meet the acceptance criteria?
-
Documentation created/updated -
Added tests for this feature/bug -
In case of conflicts with master
- branch was rebased