Skip to content

Commit e445978

Browse files
committed
CCM-11938: try
1 parent a3ee7e8 commit e445978

File tree

3 files changed

+30
-10
lines changed

3 files changed

+30
-10
lines changed

.github/actions/build-proxies/action.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,15 +103,15 @@ runs:
103103
run: |
104104
#Change this back to proxy-deploy.yaml after testing
105105
.github/scripts/dispatch_internal_repo_workflow.sh \
106-
--infraRepoName "$(echo ${{ github.repository }} | cut -d'/' -f2)" \
107106
--internalRef "feature/CCM-11938_workflow" \
108-
--targetWorkflow "proxy-deploy.yaml" \
107+
--targetWorkflow "dispatch-deploy-notify-account-provisioning.yaml" \
109108
--targetEnvironment "${{ inputs.environment }}" \
110109
--runId "${{ inputs.runId }}" \
111110
--buildSandbox ${{ inputs.buildSandbox }} \
112111
--apimEnvironment "${{ inputs.apimEnv }}" \
113112
--boundedContext "notify-supplier" \
114-
--targetDomain "$TARGET_DOMAIN"
113+
--targetDomain "$TARGET_DOMAIN" \
114+
--version "${{ inputs.version }}"
115115
116116
# - name: Set docker tag
117117
# shell: bash

.github/scripts/dispatch_internal_repo_workflow.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@ while [[ $# -gt 0 ]]; do
100100
targetDomain="$2"
101101
shift 2
102102
;;
103+
--version) # Version (optional)
104+
version="$2"
105+
shift 2
106+
;;
103107
*)
104108
echo "[ERROR] Unknown argument: $1"
105109
exit 1
@@ -141,6 +145,10 @@ if [[ -z "$targetDomain" ]]; then
141145
targetDomain=""
142146
fi
143147

148+
if [[ -z "$version" ]]; then
149+
version=""
150+
fi
151+
144152
echo "==================== Workflow Dispatch Parameters ===================="
145153
echo " infraRepoName: $infraRepoName"
146154
echo " releaseVersion: $releaseVersion"
@@ -159,6 +167,7 @@ echo " buildSandbox: $buildSandbox"
159167
echo " apimEnvironment: $apimEnvironment"
160168
echo " boundedContext: $boundedContext"
161169
echo " targetDomain: $targetDomain"
170+
echo " version: $version"
162171

163172
DISPATCH_EVENT=$(jq -ncM \
164173
--arg infraRepoName "$infraRepoName" \
@@ -177,6 +186,7 @@ DISPATCH_EVENT=$(jq -ncM \
177186
--arg apimEnvironment "$apimEnvironment" \
178187
--arg boundedContext "$boundedContext" \
179188
--arg targetDomain "$targetDomain" \
189+
--arg version "$version" \
180190
'{
181191
"ref": "'"$internalRef"'",
182192
"inputs": (
@@ -193,6 +203,7 @@ DISPATCH_EVENT=$(jq -ncM \
193203
(if $apimEnvironment != "" then { "apimEnvironment": $apimEnvironment } else {} end) +
194204
(if $boundedContext != "" then { "boundedContext": $boundedContext } else {} end) +
195205
(if $targetDomain != "" then { "targetDomain": $targetDomain } else {} end) +
206+
(if $version != "" then { "version": $version } else {} end) +
196207
{ "targetEnvironment": $targetEnvironment } +
197208
{ "targetAccountGroup": $targetAccountGroup }
198209
)

.github/workflows/manual-proxy-environment-deploy.yaml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ name: Deploy proxy to environment
33
on:
44
workflow_dispatch:
55
inputs:
6+
version:
7+
description: Version number
8+
required: true
9+
type: string
610
environment:
711
description: Name of the environment to deploy
812
required: true
@@ -53,24 +57,29 @@ jobs:
5357
5458
- name: Set APIM_ENV
5559
shell: bash
60+
env:
61+
ENVIRONMENT: ${{ inputs.environment }}
62+
PR_NUMBER: ${{ steps.pr_exists.outputs.pr_number }}
5663
run: |
57-
if [ -z "${{ steps.pr_exists.outputs.pr_number }}" ]; then
58-
echo "APIM_ENV=${{ inputs.environment }}" >> $GITHUB_ENV
64+
if [ -z "$PR_NUMBER" ]; then
65+
echo "APIM_ENV=$ENVIRONMENT" >> $GITHUB_ENV
5966
else
60-
echo "APIM_ENV=${{ inputs.environment }}-pr" >> $GITHUB_ENV
67+
echo "APIM_ENV=${ENVIRONMENT}-pr" >> $GITHUB_ENV
6168
fi
6269
- name: Build environment oas
6370
working-directory: .
6471
shell: bash
65-
run: make build-json-oas-spec APIM_ENV=${{ env.APIM_ENV }}
72+
env:
73+
APIM_ENV: ${{ env.APIM_ENV }}
74+
run: make build-json-oas-spec APIM_ENV=$APIM_ENV
6675
- name: "Build proxies"
6776
uses: ./.github/actions/build-proxies
6877
with:
6978
version: "${{ inputs.version }}"
7079
environment: "${{ env.APIM_ENV }}"
71-
apim_env: "${{ env.APIM_ENV }}"
72-
run_id: "${{ github.run_id }}"
73-
build_sandbox: false
80+
apimEnv: "${{ env.APIM_ENV }}"
81+
runId: "${{ github.run_id }}"
82+
buildSandbox: false
7483

7584
# - name: Set target and cert
7685
# shell: bash

0 commit comments

Comments
 (0)