forked from almalinux/cas_wrapper
ALBS-443: Integrate CodeNotary with git updater tool
- Env vars with credentials
This commit is contained in:
parent
f46eef7df9
commit
646b984d89
@ -54,6 +54,10 @@ class CasWrapper:
|
|||||||
'-a',
|
'-a',
|
||||||
f'{key}={value}',
|
f'{key}={value}',
|
||||||
]
|
]
|
||||||
|
with local.env(
|
||||||
|
CAS_API_KEY=self._cas_api_key,
|
||||||
|
SIGNER_ID=self._cas_signer_id
|
||||||
|
):
|
||||||
result_of_execution = command()
|
result_of_execution = command()
|
||||||
return json.loads(result_of_execution)['hash']
|
return json.loads(result_of_execution)['hash']
|
||||||
|
|
||||||
@ -76,8 +80,16 @@ class CasWrapper:
|
|||||||
'json',
|
'json',
|
||||||
]
|
]
|
||||||
try:
|
try:
|
||||||
|
with local.env(
|
||||||
|
CAS_API_KEY=self._cas_api_key,
|
||||||
|
SIGNER_ID=self._cas_signer_id
|
||||||
|
):
|
||||||
result_of_execution = command()
|
result_of_execution = command()
|
||||||
except ProcessExecutionError:
|
except ProcessExecutionError:
|
||||||
|
with local.env(
|
||||||
|
CAS_API_KEY=self._cas_api_key,
|
||||||
|
SIGNER_ID=self._cas_signer_id
|
||||||
|
):
|
||||||
# in case if commit is untrusted
|
# in case if commit is untrusted
|
||||||
result_of_execution = command(retcode=1)
|
result_of_execution = command(retcode=1)
|
||||||
return not bool(json.loads(result_of_execution)['status'])
|
return not bool(json.loads(result_of_execution)['status'])
|
||||||
|
Loading…
Reference in New Issue
Block a user