Skip to content

Commit 7572518

Browse files
committed
Only start emulator in non-production deployments
1 parent e21d1a5 commit 7572518

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
@@ -96,6 +96,7 @@ LOG_LEVEL=INFO"
9696
--arg pyver "$PYTHON_VERSION" \
9797
--arg envb64 "$ENV_CONTENT_B64" \
9898
--arg token "$GITHUB_TOKEN" \
99+
--arg env "$ENVIRONMENT" \
99100
'{
100101
location: $loc,
101102
properties: {
@@ -104,7 +105,8 @@ LOG_LEVEL=INFO"
104105
{ name: "ReleaseTag", value: $tag },
105106
{ name: "PythonVersion", value: $pyver },
106107
{ name: "EnvContentB64", value: $envb64 },
107-
{ name: "GitHubToken", value: $token }
108+
{ name: "GitHubToken", value: $token },
109+
{ name: "Environment", value: $env }
108110
],
109111
runAsSystem: true,
110112
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)