Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
Runner Mirror
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Package registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Adrian Schmitz
Runner Mirror
Commits
a39e2342
Commit
a39e2342
authored
1 year ago
by
Felix Tomski
Browse files
Options
Downloads
Patches
Plain Diff
Fix installer with downscope disabled
parent
ff045057
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Installer.py
+15
-10
15 additions, 10 deletions
Installer.py
with
15 additions
and
10 deletions
Installer.py
+
15
−
10
View file @
a39e2342
...
@@ -186,7 +186,7 @@ def CLI():
...
@@ -186,7 +186,7 @@ def CLI():
parser
=
argparse
.
ArgumentParser
(
prog
=
'
Aixcellenz CI Driver Installer
'
)
parser
=
argparse
.
ArgumentParser
(
prog
=
'
Aixcellenz CI Driver Installer
'
)
add_parameters
(
parser
,
parameters
[
'
global
'
])
add_parameters
(
parser
,
parameters
[
'
global
'
])
subparsers
=
parser
.
add_subparsers
(
help
=
'
sub-command help
'
)
subparsers
=
parser
.
add_subparsers
(
dest
=
'
cmd_name
'
,
help
=
'
sub-command help
'
)
for
cmd
in
subcommands
:
for
cmd
in
subcommands
:
subcmd_parser
=
subparsers
.
add_parser
(
cmd
,
help
=
f
'
{
cmd
}
help
'
,
aliases
=
subcommands
[
cmd
][
'
aliases
'
])
subcmd_parser
=
subparsers
.
add_parser
(
cmd
,
help
=
f
'
{
cmd
}
help
'
,
aliases
=
subcommands
[
cmd
][
'
aliases
'
])
...
@@ -200,10 +200,14 @@ def CLI():
...
@@ -200,10 +200,14 @@ def CLI():
args_to_expand
=
[
'
runner_install_path
'
,
'
shell_installation
'
,
'
mapping_path
'
,
args_to_expand
=
[
'
runner_install_path
'
,
'
shell_installation
'
,
'
mapping_path
'
,
'
public_key_path
'
,
'
key_path
'
,
'
log_path
'
,
'
rt_utility_path
'
]
'
public_key_path
'
,
'
key_path
'
,
'
log_path
'
,
'
rt_utility_path
'
]
for
arg
in
args_to_expand
:
for
arg
in
args_to_expand
:
try
:
vars
(
ret
)[
arg
]
=
os
.
path
.
expandvars
(
os
.
path
.
expanduser
(
vars
(
ret
)[
arg
]))
vars
(
ret
)[
arg
]
=
os
.
path
.
expandvars
(
os
.
path
.
expanduser
(
vars
(
ret
)[
arg
]))
if
not
os
.
path
.
isabs
(
vars
(
ret
)[
arg
]):
if
not
os
.
path
.
isabs
(
vars
(
ret
)[
arg
]):
vars
(
ret
)[
arg
]
=
os
.
path
.
join
(
ret
.
install_path
,
vars
(
ret
)[
arg
])
vars
(
ret
)[
arg
]
=
os
.
path
.
join
(
ret
.
install_path
,
vars
(
ret
)[
arg
])
except
KeyError
as
_
:
pass
if
ret
.
cmd_name
==
'
install
'
:
ret
.
shell_file
=
os
.
path
.
expandvars
(
os
.
path
.
expanduser
(
ret
.
shell_file
))
ret
.
shell_file
=
os
.
path
.
expandvars
(
os
.
path
.
expanduser
(
ret
.
shell_file
))
if
not
os
.
path
.
isabs
(
ret
.
shell_file
):
if
not
os
.
path
.
isabs
(
ret
.
shell_file
):
ret
.
shell_file
=
os
.
path
.
join
(
ret
.
rt_utility_path
,
ret
.
shell_file
)
ret
.
shell_file
=
os
.
path
.
join
(
ret
.
rt_utility_path
,
ret
.
shell_file
)
...
@@ -275,6 +279,7 @@ def install():
...
@@ -275,6 +279,7 @@ def install():
with
open
(
args
.
shell_file
,
"
a
"
)
as
shell_fp
:
with
open
(
args
.
shell_file
,
"
a
"
)
as
shell_fp
:
shell_fp
.
writelines
(
f
"
export PATH=$PATH:
{
_runner_install_path
}
\n
"
)
shell_fp
.
writelines
(
f
"
export PATH=$PATH:
{
_runner_install_path
}
\n
"
)
if
args
.
downscope
:
set_utility_permissions
(
_runner_install_path
,
[
'
gitlab-runner
'
])
set_utility_permissions
(
_runner_install_path
,
[
'
gitlab-runner
'
])
set_utility_permissions
(
args
.
rt_utility_path
)
set_utility_permissions
(
args
.
rt_utility_path
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment