global: refactor to use config.{file,runtime}.$member instead of config.file["$member"]
This commit is contained in:
parent
ba13293b93
commit
8ad18c00a6
15 changed files with 66 additions and 54 deletions
|
@ -22,7 +22,8 @@ class DockerWrapper(BaseWrapper):
|
|||
type: str = 'docker'
|
||||
|
||||
def wrap(self):
|
||||
script_path = config.runtime['script_source_dir']
|
||||
script_path = config.runtime.script_source_dir
|
||||
assert script_path
|
||||
with open(os.path.join(script_path, 'version.txt')) as version_file:
|
||||
version = version_file.read().replace('\n', '')
|
||||
tag = f'registry.gitlab.com/kupfer/kupferbootstrap:{version}'
|
||||
|
@ -34,7 +35,7 @@ class DockerWrapper(BaseWrapper):
|
|||
'.',
|
||||
'-t',
|
||||
tag,
|
||||
] + (['-q'] if not config.runtime['verbose'] else [])
|
||||
] + (['-q'] if not config.runtime.verbose else [])
|
||||
logging.debug('Running docker cmd: ' + ' '.join(cmd))
|
||||
result = subprocess.run(cmd, cwd=script_path, capture_output=True)
|
||||
if result.returncode != 0:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue