Skip to content

Commit

Permalink
Merge pull request #5 from TheRacetrack/4-keep-secret-vars-apart-from…
Browse files Browse the repository at this point in the history
…-regular-env-vars

Keep secret vars apart from regular env vars
  • Loading branch information
iszulcdeepsense authored Dec 14, 2023
2 parents 8e41b0e + e45f34e commit bf8d51e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/compatibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ This document describes compatibility of the versions of this plugin with the Ra
| Plugin version | Compatible Racetrack version |
|----------------|------------------------------|
| 1.7.0 | `> 2.20.0` |
| 1.8.0 | `> 2.23.0` |
2 changes: 2 additions & 0 deletions src/deployer.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def deploy_job(
runtime_env_vars: Dict[str, str],
family: JobFamilyDto,
containers_num: int = 1,
runtime_secret_vars: Dict[str, str] | None = None,
) -> JobDto:
"""Run Job as docker container on local docker"""
if self.job_exists(manifest.name, manifest.version):
Expand Down Expand Up @@ -73,6 +74,7 @@ def deploy_job(
if containers_num > 1:
common_env_vars['JOB_USER_MODULE_HOSTNAME'] = self.get_container_name(entrypoint_resource_name, 1)

runtime_env_vars = merge_env_vars(runtime_env_vars, runtime_secret_vars)
conflicts = common_env_vars.keys() & runtime_env_vars.keys()
if conflicts:
raise RuntimeError(f'found illegal runtime env vars, which conflict with reserved names: {conflicts}')
Expand Down
2 changes: 1 addition & 1 deletion src/plugin-manifest.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: remote-docker
version: '1.7.0'
version: '1.8.0'
url: https://github.com/TheRacetrack/plugin-remote-docker
category: 'infrastructure'
components:
Expand Down

0 comments on commit bf8d51e

Please sign in to comment.