Skip to content

Commit 3dbaffd

Browse files
CMSNAV-798: Create new make command for getting Apigee token
1 parent 4dd4f24 commit 3dbaffd

2 files changed

Lines changed: 5 additions & 7 deletions

File tree

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ release: clean publish build-proxy
5353
cp ecs-proxies-deploy.yml dist/ecs-deploy-internal-qa-sandbox.yml
5454
cp ecs-proxies-deploy.yml dist/ecs-deploy-internal-dev-sandbox.yml
5555

56+
get_apigee_access_token:
57+
SSO_LOGIN_URL=https://login.apigee.com get_token
58+
5659
#################
5760
# Test commands #
5861
#################
@@ -76,7 +79,7 @@ smoketest:
7679

7780
test:
7881
$(TEST_CMD) \
79-
--junitxml=test-report.xml \
82+
--junitxml=test-report.xml
8083

8184
smoketest-prod:
8285
$(PROD_TEST_CMD) \

README.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,7 @@ Consider using a **dev container**. While this is in no way a requirement, you m
3838
- You can get an `APIGEE_ACCESS_TOKEN` via the `get_token` command. If you don't already have access to the `get_token` command, you can install it using [these instructions](https://docs.apigee.com/api-platform/system-administration/auth-tools#install).
3939
- You can get the latest `SOURCE_COMMIT_ID` via the `/_ping` endpoint of the proxy you're using. For example, with `PROXY_NAME` set to `nhs-website-content-api-internal-dev`, we would want to access the URL https://internal-dev.api.service.nhs.uk/nhs-website-content/_ping - this should return some JSON, and the value we want has key `commitId`.
4040

41-
:bulb: One way to use the `get_token` command is to call:
42-
43-
```
44-
export APIGEE_ACCESS_TOKEN=$(SSO_LOGIN_URL=https://login.apigee.com get_token)
45-
echo $APIGEE_ACCESS_TOKEN
46-
```
41+
:bulb: The `make get_apigee_access_token` command provides a useful shorthand for calling `get_token` with all the right environmental variables.
4742

4843
### Let's Roll
4944

0 commit comments

Comments
 (0)