Skip to content

Commit 352e8ed

Browse files
committed
Update makefile credentials command
1 parent de04e13 commit 352e8ed

2 files changed

Lines changed: 9 additions & 5 deletions

File tree

.github/workflows/dev_sandbox_publish_deploy.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ on:
55
branches:
66
- feature/rgjb-eli-604-rotate_proxygen_key_in_ptl_and_prod
77

8-
98
jobs:
109
metadata:
1110
name: "Set CI/CD metadata"
@@ -103,7 +102,7 @@ jobs:
103102
PROXYGEN_PRIVATE_KEY: ${{ secrets.PROXYGEN_PRIVATE_KEY_PROD }}
104103
run: |
105104
mkdir -p ~/.proxygen
106-
echo "$PROXYGEN_PRIVATE_KEY" > ~/.proxygen/eligibility-signposting-api-prod.pem
105+
echo "$PROXYGEN_PRIVATE_KEY" > ~/.proxygen/eligibility-signposting-api.pem
107106
make setup-proxygen-credentials ENV=prod
108107
- name: Generate specification
109108
run: |

Makefile

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,14 @@ retrieve-proxygen-key: guard-ENV
6767
# This location required location for local proxygen usage
6868
setup-proxygen-credentials: guard-ENV
6969
@ cd specification && \
70-
cp .proxygen/credentials-$(ENV).yaml ~/.proxygen/credentials.yaml && \
71-
cp .proxygen/settings-$(ENV).yaml ~/.proxygen/settings.yaml && \
72-
echo "Set up proxygen credentials for the APIM '$(ENV)' environment"
70+
if [ -f ".proxygen/credentials-$(ENV).yaml" ] && [ -f ".proxygen/settings-$(ENV).yaml" ]; then \
71+
cp .proxygen/credentials-$(ENV).yaml ~/.proxygen/credentials.yaml && \
72+
cp .proxygen/settings-$(ENV).yaml ~/.proxygen/settings.yaml && \
73+
echo "Set up proxygen credentials for the APIM '$(ENV)' environment"
74+
else \
75+
cp -r .proxygen ~
76+
fi
77+
7378

7479
get-spec: # Get the most recent specification live in proxygen
7580
$(MAKE) setup-proxygen-credentials ENV=prod

0 commit comments

Comments
 (0)