Skip to content

Commit

Permalink
omnibus: Factorize environment variables forwarding (#29476)
Browse files Browse the repository at this point in the history
  • Loading branch information
chouquette authored Sep 20, 2024
1 parent df8074e commit b97517a
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions tasks/omnibus.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,15 +138,15 @@ def get_omnibus_env(
kubernetes_cpu_request = os.environ.get('KUBERNETES_CPU_REQUEST')
if kubernetes_cpu_request:
env['OMNIBUS_WORKERS_OVERRIDE'] = str(int(kubernetes_cpu_request) + 1)
# Forward the DEPLOY_AGENT variable so that we can use a higher compression level for deployed artifacts
deploy_agent = os.environ.get('DEPLOY_AGENT')
if deploy_agent:
env['DEPLOY_AGENT'] = deploy_agent
if 'PACKAGE_ARCH' in os.environ:
env['PACKAGE_ARCH'] = os.environ['PACKAGE_ARCH']
if 'INSTALL_DIR' in os.environ:
print('Forwarding INSTALL_DIR')
env['INSTALL_DIR'] = os.environ['INSTALL_DIR']
env_to_forward = [
# Forward the DEPLOY_AGENT variable so that we can use a higher compression level for deployed artifacts
'DEPLOY_AGENT',
'PACKAGE_ARCH',
'INSTALL_DIR',
]
for key in env_to_forward:
if key in os.environ:
env[key] = os.environ[key]

return env

Expand Down

0 comments on commit b97517a

Please sign in to comment.