Skip to content

Commit ca70f0e

Browse files
authored
ELI-338: Adds readme for deployment (#317)
* ELI-338: Adds readme for deployment * ELI-338: Fixes 'English' and 'Markdown' * ELI-338: Adds proxygen and apim to vale accept list * ELI-338: Fixing vale * ELI-338: Fixing vale * ELI-338: Fixing vale
1 parent be17f1d commit ca70f0e

3 files changed

Lines changed: 87 additions & 62 deletions

File tree

.github/DEPLOYMENT_README.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# GitHub Workflows for eligibility-signposting-api-specification
2+
3+
This directory contains GitHub Actions workflows that automate CI/CD processes for the eligibility-signposting-api-specification project. These workflows manage deployment, tagging, and notifications for different environments (dev, sandbox, preprod, prod) and integrate with external tools like proxygen and Postman.
4+
5+
## Workflows Overview
6+
7+
### 1. dev_sandbox_publish_deploy.yaml
8+
9+
- **Triggers:** On push to `main` branch.
10+
- **Environments:** dev, sandbox.
11+
- **Steps:**
12+
- Sets a version tag based on the current timestamp.
13+
- Installs dependencies (Python, Node.js, Poetry, proxygen-cli).
14+
- Generates and publishes OpenAPI specs to proxygen for dev and sandbox.
15+
- Publishes the Postman collection to Postman.
16+
- Tags the deployment in Git (Example tag: spec-20260122155331).
17+
- Notifies a Slack channel on completion.
18+
19+
### 2. preprod_publish_deploy.yaml
20+
21+
- **Triggers:** Manually via GitHub UI (`workflow_dispatch`).
22+
- **Inputs:** Tag to promote (defaults to latest).
23+
- **Environment:** preprod.
24+
- **Steps:**
25+
- Checks out the specified tag.
26+
- Installs dependencies.
27+
- Generates and publishes the OpenAPI spec to proxygen for preprod.
28+
- Deploys the spec to the preprod proxygen instance.
29+
30+
### 3. prod_publish_deploy.yaml
31+
32+
- **Triggers:** Manually via GitHub UI (`workflow_dispatch`).
33+
- **Inputs:** Tag to promote (required).
34+
- **Environment:** Prod.
35+
- **Steps:**
36+
- Checks out the specified tag.
37+
- Installs dependencies.
38+
- Generates and publishes the OpenAPI spec to proxygen for Prod.
39+
- Deploys the spec to the Prod proxygen instance.
40+
- Creates a GitHub Release for the deployed tag.
41+
42+
## How to Use
43+
44+
### dev & sandbox deployment
45+
46+
- Push changes to the `main` branch.
47+
- The workflow will automatically:
48+
- Deploy to dev and sandbox.
49+
- Publish the Postman collection.
50+
- Tag the deployment.
51+
- Notify Slack.
52+
53+
### preprod deployment
54+
55+
- Go to the **Actions** tab in GitHub.
56+
- Select **Deploy to preprod** workflow.
57+
- Click **Run workflow**.
58+
- Enter the tag to promote (or use the default `latest`).
59+
- The workflow will deploy the specified tag to preprod.
60+
61+
### prod deployment
62+
63+
- Go to the **Actions** tab in GitHub.
64+
- Select **Deploy to Prod** workflow.
65+
- Click **Run workflow**.
66+
- Enter the tag to promote (must match a tag from previous deployments).
67+
- The workflow will deploy the specified tag to Prod and create a GitHub Release.
68+
69+
## Notes
70+
71+
- All workflows require secrets to be set in the repository (e.g., `PROXYGEN_PRIVATE_KEY`, `POSTMAN_API_KEY`, `SLACK_WORKFLOW_WEBHOOK_URL`, `GITHUB_TOKEN`).
72+
- The tags created follow the format `spec-YYYYMMDDHHMMSS` indicative of the deployment time. This is NOT related to the [specification/eligibility-signposting-api](../specification/eligibility-signposting-api.yaml) version.
73+
- For more details, see the steps in each workflow YAML file.

README.md

Lines changed: 12 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,24 @@
1-
# Repository Template
1+
# Eligibility Signposting Specification
22

3-
[![CI/CD Pull Request](https://github.com/nhs-england-tools/repository-template/actions/workflows/cicd-1-pull-request.yaml/badge.svg)](https://github.com/nhs-england-tools/repository-template/actions/workflows/cicd-1-pull-request.yaml)
4-
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=repository-template&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=repository-template)
5-
6-
Start with an overview or a brief description of what the project is about and what it does. For example -
7-
8-
Welcome to our repository template designed to streamline your project setup! This robust template provides a reliable starting point for your new projects, covering an essential tech stack and encouraging best practices in documenting.
9-
10-
This repository template aims to foster a user-friendly development environment by ensuring that every included file is concise and adequately self-documented. By adhering to this standard, we can promote increased clarity and maintainability throughout your project's lifecycle. Bundled within this template are resources that pave the way for seamless repository creation. Currently supported technologies are:
11-
12-
- Docker
13-
14-
Make use of this repository template to expedite your project setup and enhance your productivity right from the get-go. Enjoy the advantage of having a well-structured, self-documented project that reduces overhead and increases focus on what truly matters - coding!
3+
This repository contains the OpenAPI specification and related tooling for the Eligibility Signposting API.
154

165
## Table of Contents
176

18-
- [Repository Template](#repository-template)
7+
- [Repository Template](#eligibility-signposting-specification)
198
- [Table of Contents](#table-of-contents)
20-
- [Setup](#setup)
9+
- [Information](#information)
2110
- [Prerequisites](#prerequisites)
2211
- [Configuration](#configuration)
23-
- [Usage](#usage)
24-
- [Testing](#testing)
2512
- [Sandbox](#sandbox)
2613
- [Specification](#specification)
27-
- [Design](#design)
28-
- [Diagrams](#diagrams)
29-
- [Modularity](#modularity)
14+
- [Deployment](#deployment)
3015
- [Contributing](#contributing)
3116
- [Contacts](#contacts)
3217
- [Licence](#licence)
3318

34-
## Setup
19+
## Information
3520

36-
By including preferably a one-liner or if necessary a set of clear CLI instructions we improve user experience. This should be a frictionless installation process that works on various operating systems (macOS, Linux, Windows WSL) and handles all the dependencies.
37-
38-
Clone the repository
39-
40-
```shell
41-
git clone https://github.com/nhs-england-tools/repository-template.git
42-
cd nhs-england-tools/repository-template
43-
```
21+
This repository was cloned from the [nhs-england-tools/repository-template](https://github.com/nhs-england-tools/repository-template.git)
4422

4523
### Prerequisites
4624

@@ -78,46 +56,18 @@ Installation and configuration of the toolchain dependencies
7856
make config
7957
```
8058
81-
## Usage
82-
83-
After a successful installation, provide an informative example of how this project can be used. Additional code snippets, screenshots and demos work well in this space. You may also link to the other documentation resources, e.g. the [User Guide](./docs/user-guide.md) to demonstrate more use cases and to show more features.
84-
85-
### Testing
86-
87-
There are `make` tasks for you to configure to run your tests. Run `make test` to see how they work. You should be able to use the same entry points for local development as in your CI pipeline.
88-
8959
## Sandbox
9060

91-
There is a minimalist sandbox environment in `/sandbox` with an accompanying README with instructions on how to run it locally.
61+
There is a minimalist sandbox environment in `sandbox` with an accompanying [README](sandbox/README.md) with instructions on how to run it locally.
9262

9363
## Specification
9464

95-
The OpenAPI specification is stored in `specification`. In that folder, there is an accompanying README with instructions on how to produce an environment-specification specification and publish
96-
it using Proxygen CLI.
97-
98-
## Design
99-
100-
### Diagrams
101-
102-
The [C4 model](https://c4model.com/) is a simple and intuitive way to create software architecture diagrams that are clear, consistent, scalable and most importantly collaborative. This should result in documenting all the system interfaces, external dependencies and integration points.
103-
104-
![Repository Template](./docs/diagrams/Repository_Template_GitHub_Generic.png)
105-
106-
The source for diagrams should be in Git for change control and review purposes. Recommendations are [draw.io](https://app.diagrams.net/) (example above in [docs](.docs/diagrams/) folder) and [Mermaids](https://github.com/mermaid-js/mermaid). Here is an example Mermaids sequence diagram:
107-
108-
```mermaid
109-
sequenceDiagram
110-
User->>+Service: GET /users?params=...
111-
Service->>Service: auth request
112-
Service->>Database: get all users
113-
Database-->>Service: list of users
114-
Service->>Service: filter users
115-
Service-->>-User: list[User]
116-
```
65+
The OpenAPI specification is stored in `specification`. In that folder, there is an accompanying [README](specification/README.md) with instructions on how to produce an environment-specific specification and publish
66+
it using proxygen CLI.
11767

118-
### Modularity
68+
## Deployment
11969

120-
Most of the projects are built with customisability and extendability in mind. At a minimum, this can be achieved by implementing service level configuration options and settings. The intention of this section is to show how this can be used. If the system processes data, you could mention here for example how the input is prepared for testing - anonymised, synthetic or live data.
70+
The deployment workflows are defined in the `.github/workflows/` folder. There is an accompanying [README](.github/DEPLOYMENT_README.md) with details on how the deployment works and how to use it.
12171

12272
## Contributing
12373

scripts/config/vale/styles/config/vocabularies/words/accept.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,5 @@ Terraform
2525
toolchain
2626
Trufflehog
2727
uat
28+
proxygen
29+
APIM

0 commit comments

Comments
 (0)