Skip to content

Commit

Permalink
feat(Workspaces): allow user to specify workspace docker image (#95)
Browse files Browse the repository at this point in the history
  • Loading branch information
cheikhgwane authored Dec 6, 2023
1 parent 93e277e commit 2455a3e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions openhexa/cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,8 @@ def pipelines_run(
if force_pull:
cmd.extend(["--pull", "always"])

image = env_vars["WORKSPACE_DOCKER_IMAGE"] if env_vars.get("WORKSPACE_DOCKER_IMAGE") else image

cmd.extend(
[
image,
Expand Down
4 changes: 4 additions & 0 deletions openhexa/sdk/pipelines/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,4 +147,8 @@ def get_local_workspace_config(path: Path):
for key, value in connection_config.items():
if key != "type":
env_vars[stringcase.constcase(f"{slug}_{key.lower()}")] = str(value)
# Workspace docker image
if "image" in local_workspace_config:
env_vars["WORKSPACE_DOCKER_IMAGE"] = local_workspace_config["image"]

return env_vars

0 comments on commit 2455a3e

Please sign in to comment.