diff --git a/Makefile b/Makefile index 1720632..ecff3ac 100644 --- a/Makefile +++ b/Makefile @@ -133,6 +133,17 @@ else npx redocly bundle specification/eligibility-signposting-api.yaml --remove-unused-components --keep-url-references --ext yaml > build/specification/$(APIM_ENV)/eligibility-signposting-api.yaml endif +construct-spec-mac: guard-APIM_ENV + @ $(MAKE) update-spec-template APIM_ENV=$$APIM_ENV + mkdir -p build/specification/$(APIM_ENV) +ifeq ($(APIM_ENV), sandbox) + gsed '/^[[:space:]]*security:/,/^[[:space:]]*-[[:space:]]/c\ security:\n - app-level0: []' specification/eligibility-signposting-api.yaml > specification/eligibility-signposting-api.generated.yaml && \ + npx redocly bundle specification/eligibility-signposting-api.generated.yaml --remove-unused-components --keep-url-references --ext yaml > build/specification/$(APIM_ENV)/eligibility-signposting-api.yaml + rm specification/eligibility-signposting-api.generated.yaml +else + npx redocly bundle specification/eligibility-signposting-api.yaml --remove-unused-components --keep-url-references --ext yaml > build/specification/$(APIM_ENV)/eligibility-signposting-api.yaml +endif + SPEC_DIR := $(CURDIR)/specification POSTMAN_DIR := $(SPEC_DIR)/postman diff --git a/README.md b/README.md index 5e9c2b1..d55eb91 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,7 @@ The following software packages, or their equivalents, are expected to be instal - [Docker](https://www.docker.com/) container runtime or a compatible tool, e.g. [Podman](https://podman.io/), - [asdf](https://asdf-vm.com/) version manager, - [GNU make](https://www.gnu.org/software/make/) 3.82 or later, +- [npm](https://www.npmjs.com/) > [!NOTE]
> The version of GNU make available by default on macOS is earlier than 3.82. You will need to upgrade it or certain `make` tasks will fail. On macOS, you will need [Homebrew](https://brew.sh/) installed, then to install `make`, like so: diff --git a/sandbox/Makefile b/sandbox/Makefile index d49e0db..07e8c68 100644 --- a/sandbox/Makefile +++ b/sandbox/Makefile @@ -26,7 +26,7 @@ proxygen-docker-login: # Login to Proxygen Docker registry proxygen docker get-login | bash publish-to-docker-repo: - proxygen-docker-login + make proxygen-docker-login docker push 958002497996.dkr.ecr.eu-west-2.amazonaws.com/eligibility-signposting-api:latest build-and-publish-sandbox-image: @@ -35,7 +35,7 @@ build-and-publish-sandbox-image: deploy-sandbox-spec: make -C .. construct-spec APIM_ENV=sandbox - proxygen instance deploy sandbox eligibility-signposting-api ./build/specification/sandbox/eligibility-signposting-api.yaml + proxygen instance deploy sandbox eligibility-signposting-api build/specification/sandbox/eligibility-signposting-api.yaml up: build docker compose -f docker-compose.yaml up -d diff --git a/scripts/config/vale/styles/config/vocabularies/words/accept.txt b/scripts/config/vale/styles/config/vocabularies/words/accept.txt index 15d8c90..e19b75e 100644 --- a/scripts/config/vale/styles/config/vocabularies/words/accept.txt +++ b/scripts/config/vale/styles/config/vocabularies/words/accept.txt @@ -8,6 +8,7 @@ Dependabot Gitleaks Grype idempotence +npm OAuth Octokit onboarding diff --git a/specification/README.md b/specification/README.md index 8bf653c..bb97433 100644 --- a/specification/README.md +++ b/specification/README.md @@ -37,7 +37,7 @@ See the [Proxygen CLI user guide](https://nhsd-confluence.digital.nhs.uk/spaces/ We deploy our specifications using the Proxygen CLI. In order to do this, the following steps need to be performed: -1. Construct the specification for the environment of your choice, following the instructions above. This will be stored in +1. Construct the specification for the environment of your choice, following the instructions above. 2. Activate a poetry environment `poetry env activate` - you may need to run `make install-python` to install poetry etc. first. 3. Run `make retrieve-proxygen-key` from the root directory to retrieve the private key needed to authenticate with Proxygen. 4. Run `make setup-proxygen-credentials` from the root directory to set up credentials needed to interact with our API proxy.