Skip to content

Commit 7459198

Browse files
committed
CCM-11938: try
1 parent aa28f52 commit 7459198

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

.github/scripts/dispatch_internal_repo_workflow.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,10 @@ while [[ $# -gt 0 ]]; do
8888
buildSandbox="$2"
8989
shift 2
9090
;;
91+
--apimEnvironment) # APIM environment (optional)
92+
apimEnvironment="$2"
93+
shift 2
94+
;;
9195
*)
9296
echo "[ERROR] Unknown argument: $1"
9397
exit 1
@@ -117,6 +121,10 @@ if [[ -z "$buildSandbox" ]]; then
117121
buildSandbox=""
118122
fi
119123

124+
if [[ -z "$apimEnvironment" ]]; then
125+
apimEnvironment=""
126+
fi
127+
120128
echo "==================== Workflow Dispatch Parameters ===================="
121129
echo " infraRepoName: $infraRepoName"
122130
echo " releaseVersion: $releaseVersion"
@@ -132,6 +140,7 @@ echo " overrideRoleName: $overrideRoleName"
132140
echo " targetProject: $targetProject"
133141
echo " runId: $runId"
134142
echo " buildSandbox: $buildSandbox"
143+
echo " apimEnvironment: $apimEnvironment"
135144

136145
DISPATCH_EVENT=$(jq -ncM \
137146
--arg infraRepoName "$infraRepoName" \
@@ -147,6 +156,7 @@ DISPATCH_EVENT=$(jq -ncM \
147156
--arg targetProject "$targetProject" \
148157
--arg runId "$runId" \
149158
--arg buildSandbox "$buildSandbox" \
159+
--arg apimEnvironment "$apimEnvironment" \
150160
'{
151161
"ref": "'"$internalRef"'",
152162
"inputs": (
@@ -160,6 +170,7 @@ DISPATCH_EVENT=$(jq -ncM \
160170
(if $overrides != "" then { "overrides": $overrides } else {} end) +
161171
(if $runId != "" then { "runId": $runId } else {} end) +
162172
(if $buildSandbox != "" then { "buildSandbox": $buildSandbox } else {} end) +
173+
(if $apimEnvironment != "" then { "apimEnvironment": $apimEnvironment } else {} end) +
163174
{ "targetEnvironment": $targetEnvironment } +
164175
{ "targetAccountGroup": $targetAccountGroup }
165176
)

0 commit comments

Comments
 (0)