-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathinitializeInfrastructureFromTemplate.bash
More file actions
32 lines (28 loc) · 1.35 KB
/
initializeInfrastructureFromTemplate.bash
File metadata and controls
32 lines (28 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
REPOSITORY=${REPOSITORY:-"https://raw.githubusercontent.com/criticalmanufacturing/install-scripts/main"}
while [[ "$#" -gt 0 ]]; do
case $1 in
-a|--agent) agent="$2"; shift ;;
-i|--infrastructure) infrastructure="$2"; shift ;;
-o|--infrastructureTemplate) infrastructureTemplate="$2"; shift ;;
-e|--environmentType) environmentType="$2"; shift ;;
-n|--internetNetworkName) internetNetworkName="$2"; shift ;;
-t|--portalToken) portalToken="$2"; shift ;;
-p|--parameters) parameters="$2"; shift ;;
-v|--verbose) verbose=1 ;;
*) echo "Unknown parameter passed: $1"; exit 1 ;;
esac
shift
done
if [[ $verbose -eq 1 ]]
then
echo "agent: $agent"
echo "infrastructure: $infrastructure"
echo "infrastructureTemplate: $infrastructureTemplate"
echo "environmentType: $environmentType"
echo "internetNetworkName: $internetNetworkName"
echo "pat: $portalToken"
echo "parameters: $parameters"
fi
curl -Os "$REPOSITORY/utils/portal/runInitializeInfrastructureFromTemplate.ps1"
pwsh -File ./runInitializeInfrastructureFromTemplate.ps1 -agent "$agent" -infrastructure "$infrastructure" -infrastructureTemplate "$infrastructureTemplate" -environmentType "$environmentType" -internetNetworkName "$internetNetworkName" -portalToken "$portalToken" -parameters "$parameters"