Skip to content

Commit 7042307

Browse files
committed
support container url as env
1 parent 06c6864 commit 7042307

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

runtime-deploy-action/script.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
STK_IAM_DOMAIN = os.getenv("STK_IAM_DOMAIN", "https://idm.stackspot.com")
1212
STK_RUNTIME_MANAGER_DOMAIN = os.getenv("STK_RUNTIME_MANAGER_DOMAIN", "https://runtime-manager.v1.stackspot.com")
13+
CONTAINER_DEPLOY_URL = os.getenv("CONTAINER_DEPLOY_URL", "stackspot/runtime-job-deploy:latest")
1314

1415
FEATURES_BASEPATH_TMP = "/tmp/runtime/deploys"
1516
FEATURES_BASEPATH_EBS = "/opt/runtime"
@@ -93,7 +94,6 @@ def build_flags(inputs: dict) -> list:
9394

9495
def run(metadata):
9596
inputs: dict = metadata.inputs
96-
container_url: str = 'stackspot/runtime-job-deploy:latest'
9797
run_task_id: str = inputs["run_task_id"]
9898
output_file: str = inputs.get("output_file") or "deploy-output.json"
9999
path_to_mount: str = inputs.get("path_to_mount") or "."
@@ -102,7 +102,7 @@ def run(metadata):
102102
flags = build_flags(inputs)
103103
cmd = ["docker", "run", "--rm", "-v", path_to_mount] + flags + [
104104
"--entrypoint=/app/stackspot-runtime-job-deploy",
105-
container_url,
105+
CONTAINER_DEPLOY_URL,
106106
"start",
107107
f"--run-task-id={run_task_id}",
108108
f"--output-file={output_file}",

runtime-iac-action/script.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
STK_IAM_DOMAIN = os.getenv("STK_IAM_DOMAIN", "https://idm.stackspot.com")
1212
STK_RUNTIME_MANAGER_DOMAIN = os.getenv("STK_RUNTIME_MANAGER_DOMAIN", "https://runtime-manager.v1.stackspot.com")
13+
CONTAINER_IAC_URL = os.getenv("CONTAINER_IAC_URL", "stackspot/runtime-job-iac:latest")
1314

1415

1516
def check(result: subprocess.Popen) -> None:
@@ -80,7 +81,6 @@ def build_flags(inputs: dict) -> list:
8081

8182
def run(metadata):
8283
inputs: dict = metadata.inputs
83-
container_url: str = 'stackspot/runtime-job-iac:latest'
8484
run_task_id: str = inputs["run_task_id"]
8585
base_path_output: str = inputs.get("base_path_output") or "."
8686
path_to_mount: str = inputs.get("path_to_mount") or "."
@@ -89,7 +89,7 @@ def run(metadata):
8989
flags = build_flags(inputs)
9090
cmd = ["docker", "run", "--rm", "-v", path_to_mount] + flags + [
9191
"--entrypoint=/app/stackspot-runtime-job-iac",
92-
container_url,
92+
CONTAINER_IAC_URL,
9393
"start",
9494
f"--run-task-id={run_task_id}",
9595
f"--base-path-output={base_path_output}",

0 commit comments

Comments
 (0)