Skip to content

Commit 6a6d501

Browse files
committed
Reverting PTL changes in workflows and make commands
1 parent ddb1c78 commit 6a6d501

12 files changed

Lines changed: 61 additions & 80 deletions

.github/workflows/dev_sandbox_publish_deploy.yaml

Lines changed: 45 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -23,50 +23,49 @@ jobs:
2323
echo "Deploying to: DEV & Sandbox"
2424
echo "VERSION=${{ steps.variables.outputs.version }}"
2525
26-
# internal-dev:
27-
# name: "Publish spec & deploy to dev"
28-
# needs: metadata
29-
# runs-on: ubuntu-latest
30-
# if: false # Skip this job
31-
# steps:
32-
# - name: Checkout repository
33-
# uses: actions/checkout@v6
34-
#
35-
# - name: Set up Python 3.11
36-
# uses: actions/setup-python@v6
37-
# with:
38-
# python-version: '3.11'
39-
#
40-
# - name: Set up Node.js
41-
# uses: actions/setup-node@v6
42-
# with:
43-
# node-version: '20'
44-
#
45-
# - name: Install Poetry
46-
# run: curl -sSL https://install.python-poetry.org | python3 -
47-
#
48-
# - name: Install Python and Node dependencies
49-
# run: |
50-
# make install
51-
#
52-
# - name: Install proxygen-cli
53-
# run: |
54-
# pip install proxygen-cli
55-
#
56-
# - name: Set up Proxygen credentials
57-
# env:
58-
# PROXYGEN_PRIVATE_KEY: ${{ secrets.PROXYGEN_PRIVATE_KEY_PTL }}
59-
# run: |
60-
# mkdir -p ~/.proxygen
61-
# echo "$PROXYGEN_PRIVATE_KEY" > ~/.proxygen/eligibility-signposting-api.pem
62-
# make setup-proxygen-credentials ENV=ptl
63-
# - name: Generate specification
64-
# run: |
65-
# make construct-spec APIM_ENV=internal-dev
66-
#
67-
# - name: Deploy internal-dev spec to Proxygen
68-
# run: |
69-
# proxygen instance deploy internal-dev eligibility-signposting-api build/specification/internal-dev/eligibility-signposting-api.yaml --no-confirm
26+
internal-dev:
27+
name: "Publish spec & deploy to dev"
28+
needs: metadata
29+
runs-on: ubuntu-latest
30+
steps:
31+
- name: Checkout repository
32+
uses: actions/checkout@v6
33+
34+
- name: Set up Python 3.11
35+
uses: actions/setup-python@v6
36+
with:
37+
python-version: '3.11'
38+
39+
- name: Set up Node.js
40+
uses: actions/setup-node@v6
41+
with:
42+
node-version: '20'
43+
44+
- name: Install Poetry
45+
run: curl -sSL https://install.python-poetry.org | python3 -
46+
47+
- name: Install Python and Node dependencies
48+
run: |
49+
make install
50+
51+
- name: Install proxygen-cli
52+
run: |
53+
pip install proxygen-cli
54+
55+
- name: Set up Proxygen credentials
56+
env:
57+
PROXYGEN_PRIVATE_KEY: ${{ secrets.PROXYGEN_PRIVATE_KEY_PROD }}
58+
run: |
59+
mkdir -p ~/.proxygen
60+
echo "$PROXYGEN_PRIVATE_KEY" > ~/.proxygen/eligibility-signposting-api.pem
61+
make setup-proxygen-credentials
62+
- name: Generate specification
63+
run: |
64+
make construct-spec APIM_ENV=internal-dev
65+
66+
- name: Deploy internal-dev spec to Proxygen
67+
run: |
68+
proxygen instance deploy internal-dev eligibility-signposting-api build/specification/internal-dev/eligibility-signposting-api.yaml --no-confirm
7069
7170
sandbox:
7271
name: "Publish spec & deploy to sandbox"
@@ -102,8 +101,8 @@ jobs:
102101
PROXYGEN_PRIVATE_KEY: ${{ secrets.PROXYGEN_PRIVATE_KEY_PROD }}
103102
run: |
104103
mkdir -p ~/.proxygen
105-
echo "$PROXYGEN_PRIVATE_KEY" > ~/.proxygen/eligibility-signposting-api-prod.pem
106-
make setup-proxygen-credentials ENV=prod
104+
echo "$PROXYGEN_PRIVATE_KEY" > ~/.proxygen/eligibility-signposting-api.pem
105+
make setup-proxygen-credentials
107106
108107
- name: Generate specification
109108
run: |

.github/workflows/preprod_publish_deploy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
run: |
5151
mkdir -p ~/.proxygen
5252
echo "$PROXYGEN_PRIVATE_KEY" > ~/.proxygen/eligibility-signposting-api.pem
53-
make setup-proxygen-credentials ENV=prod
53+
make setup-proxygen-credentials
5454
- name: Generate specification
5555
run: |
5656
make construct-spec APIM_ENV=preprod

.github/workflows/prod_publish_deploy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
run: |
5050
mkdir -p ~/.proxygen
5151
echo "$PROXYGEN_PRIVATE_KEY" > ~/.proxygen/eligibility-signposting-api.pem
52-
make setup-proxygen-credentials ENV=prod
52+
make setup-proxygen-credentials
5353
- name: Generate specification
5454
run: |
5555
make construct-spec APIM_ENV=prod

.github/workflows/publish-specification.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
run: |
5151
mkdir -p ~/.proxygen
5252
echo "$PROXYGEN_PRIVATE_KEY" > ~/.proxygen/eligibility-signposting-api.pem
53-
make setup-proxygen-credentials ENV=prod
53+
make setup-proxygen-credentials
5454
5555
- name: Generate specification
5656
run: |

.github/workflows/publish_sandbox.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
run: |
4242
mkdir -p ~/.proxygen
4343
echo "$PROXYGEN_PRIVATE_KEY" > ~/.proxygen/eligibility-signposting-api.pem
44-
make setup-proxygen-credentials ENV=prod
44+
make setup-proxygen-credentials
4545
4646
- name: Generate sandbox specification
4747
run: |

Makefile

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -60,39 +60,36 @@ retrieve-proxygen-key: guard-ENV
6060
mkdir -p ~/.proxygen
6161
aws ssm get-parameter --name /$$ENV/proxygen/private_key --with-decryption \
6262
| jq -r ".Parameter.Value" \
63-
> ~/.proxygen/eligibility-signposting-api-$(ENV).pem && \
63+
> ~/.proxygen/eligibility-signposting-api.pem && \
6464
echo "Retrieved proxygen key for APIM '$(ENV)' environment"
6565

6666
# Copy proxygen credentials for the specified environment to `~/.proxygen/`
6767
# This location required location for local proxygen usage
68-
setup-proxygen-credentials: guard-ENV
69-
@ 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"
68+
setup-proxygen-credentials:
69+
@ cd specification && cp -r .proxygen ~
7370

7471
get-spec: # Get the most recent specification live in proxygen
75-
$(MAKE) setup-proxygen-credentials ENV=prod
72+
$(MAKE) setup-proxygen-credentials
7673
proxygen spec get
7774

7875
get-spec-uat: # Get the most recent specification live in proxygen
79-
$(MAKE) setup-proxygen-credentials ENV=prod
76+
$(MAKE) setup-proxygen-credentials
8077
proxygen spec get --uat
8178

8279
publish-spec: # Publish the specification to proxygen
83-
$(MAKE) setup-proxygen-credentials ENV=prod
80+
$(MAKE) setup-proxygen-credentials
8481
proxygen spec publish build/specification/prod/eligibility-signposting-api.yaml
8582

8683
publish-spec-uat: # Publish the specification to proxygen
87-
$(MAKE) setup-proxygen-credentials ENV=prod
84+
$(MAKE) setup-proxygen-credentials
8885
proxygen spec publish build/specification/preprod/eligibility-signposting-api.yaml --uat
8986

9087
delete-spec: # Delete the specification from proxygen
91-
$(MAKE) setup-proxygen-credentials ENV=prod
88+
$(MAKE) setup-proxygen-credentials
9289
proxygen spec delete
9390

9491
delete-spec-uat: # Delete the specification from proxygen
95-
$(MAKE) setup-proxygen-credentials ENV=prod
92+
$(MAKE) setup-proxygen-credentials
9693
proxygen spec delete --uat
9794

9895
#####################

sandbox/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
SHELL := /bin/bash
2-
ENV ?= prod
2+
33
dirname := $(notdir $(patsubst %/,%,$(CURDIR)))
44
project_name = eligibility-signposting-api
55

@@ -23,7 +23,7 @@ build-and-tag:
2323
make tag-service-image
2424

2525
proxygen-docker-login: # Login to Proxygen Docker registry
26-
make -C .. setup-proxygen-credentials ENV=$(ENV)
26+
make -C .. setup-proxygen-credentials
2727
proxygen docker get-login | bash
2828

2929
publish-to-docker-repo:

specification/.proxygen/credentials-prod.yaml

Lines changed: 0 additions & 5 deletions
This file was deleted.

specification/.proxygen/credentials-ptl.yaml

Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
client_id: eligibility-signposting-api-client
22
private_key_path: eligibility-signposting-api.pem
3-
key_id: eligibility-signposting-api
3+
key_id: 2027-01-21-Prod-eligibility-signposting-api

0 commit comments

Comments
 (0)