Skip to content

Commit 0b9bece

Browse files
committed
Only start emulator in non-production deployments
1 parent 4501f1c commit 0b9bece

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

scripts/bash/deploy_arc_ring.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ SAMPLE_IMAGES_PATH=${BASE_PATH}/current/sample_images"
9797
--arg pyver "$PYTHON_VERSION" \
9898
--arg envb64 "$ENV_CONTENT_B64" \
9999
--arg token "$GITHUB_TOKEN" \
100+
--arg env "$ENVIRONMENT" \
100101
'{
101102
location: $loc,
102103
properties: {
@@ -105,7 +106,8 @@ SAMPLE_IMAGES_PATH=${BASE_PATH}/current/sample_images"
105106
{ name: "ReleaseTag", value: $tag },
106107
{ name: "PythonVersion", value: $pyver },
107108
{ name: "EnvContentB64", value: $envb64 },
108-
{ name: "GitHubToken", value: $token }
109+
{ name: "GitHubToken", value: $token },
110+
{ name: "Environment", value: $env }
109111
],
110112
runAsSystem: true,
111113
timeoutInSeconds: 1800

scripts/powershell/deploy.ps1

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@ param(
4343
[string]$GitHubToken,
4444

4545
[Parameter()]
46-
[string]$EnvContentB64 = ""
46+
[string]$EnvContentB64 = "",
47+
48+
[Parameter()]
49+
[string]$Environment = "prod"
4750
)
4851

4952
Set-StrictMode -Version Latest
@@ -335,9 +338,11 @@ $services = @(
335338
@{ Name = "Gateway-Relay"; Script = "relay_listener.py" },
336339
@{ Name = "Gateway-PACS"; Script = "pacs_main.py" },
337340
@{ Name = "Gateway-MWL"; Script = "mwl_main.py" },
338-
@{ Name = "Gateway-Upload"; Script = "upload_main.py" },
339-
@{ Name = "Gateway-Emulator"; Script = "modality_emulator.py" }
341+
@{ Name = "Gateway-Upload"; Script = "upload_main.py" }
340342
)
343+
if ($Environment -ne "prod") {
344+
$services += @{ Name = "Gateway-Emulator"; Script = "modality_emulator.py" }
345+
}
341346

342347
# -- Extraction ---------------------------------------------------------------
343348

0 commit comments

Comments
 (0)