[Fix] Set primary group to enable access to rpms for deployer user
This commit is contained in:
parent
1a168a295b
commit
5a5847b9ef
|
@ -38,7 +38,7 @@ if ! id %{name}-runner; then
|
|||
--home-dir /home/%{name}-runner \
|
||||
--shell=%{_bindir}/rpmdev-setuptree \
|
||||
--groups %{name}-git-runner,%{name}-runner-deployer \
|
||||
--user-group \
|
||||
--gid %{name}-runner-deployer \
|
||||
%{name}-runner
|
||||
runuser --login %{name}-runner
|
||||
runuser --login %{name}-runner -- git \
|
||||
|
@ -102,4 +102,4 @@ fi
|
|||
%attr(755, %{name}-runner, %{name}-runner) %dir %{_rundir}/%{name}/runner
|
||||
%attr(775, %{name}-deployer, %{name}-runner-deployer) %dir %{_rundir}/%{name}/pids
|
||||
%attr(755, root, root) %dir %{_tmppath}/%{name}
|
||||
%attr(755, %{name}-runner, %{name}-runner) %dir %{_tmppath}/%{name}/repositories
|
||||
%attr(755, %{name}-runner, root) %dir %{_tmppath}/%{name}/repositories
|
||||
|
|
|
@ -4,7 +4,7 @@ After=network.target netoik-cicd-deployer.service
|
|||
|
||||
[Service]
|
||||
User=netoik-cicd-runner
|
||||
Group=netoik-cicd-runner
|
||||
Group=netoik-cicd-runner-deployer
|
||||
ExecStart=/usr/bin/netoik-cicd-runner
|
||||
Restart=always
|
||||
|
||||
|
|
|
@ -14,10 +14,10 @@ conf_file="${temp}${sysconf_dir}/${name}/${name}.conf"
|
|||
errs_file="${temp}${sysconf_dir}/${name}/errors.conf"
|
||||
|
||||
# Name of group unifying git and runner.
|
||||
git_runner_groupname="$(id --user --name)"
|
||||
git_runner_groupname="$(id --group --name)"
|
||||
|
||||
# Name of group unifying runner and deployer.
|
||||
runner_deployer_groupname="$(id --user --name)"
|
||||
runner_deployer_groupname="$(id --group --name)"
|
||||
|
||||
# Name of the user responsible of the deployer server.
|
||||
deployer_username="$(id --user --name)"
|
||||
|
|
Loading…
Reference in New Issue