Prompt: Add project description
Install project dependencies using:
yarn | npm | other
You should install serverless if you haven't already.
yarn global add serverless
To set up your local environment, you'll need to decrypt the environment values in concourse/private.yml. The easiest way to do this is by running git keybase unlock. Then copy .env.example to .env and fill in the blanks as directed in the comments.
Once you've created your .env file you can simulate Lambda and API Gateway locally using the following command.
sls offline start
Prompt: Does this service need LocalStack for local SQS or other offline services?
Unit tests are run using package scripts e.g. yarn test:unit
(or NPM if this repo uses that) Prompt: Do they require any special setup? Do they access any external services?
Feature tests on the other hand require a deployment of this service (or the local simulation) and will make HTTP requests to it. In order to run them, you need to set up your local environment:
- ensure your .env file is set up as described above
- prompt: any special requirements - e.g. VPN access to databases?
You can then run the feature tests using a package script like yarn test:feat
.
To run against serverless-offline, which is the recommended way to test, follow these steps:
configure STAGING_BASE_URL=http://localhost:3001/ in your .env file
open a separate terminal and set valid AWS credentials – get them from AWS SSO for the [AWS Account for this service] account
start yarn offline --stage staging
Deployments are run automatically by Concourse when new commits are pushed to master. You can check the pipeline status here.
The pipeline config is in the concourse
directory. Any changes need to be deployed to Concourse manually. Follow these steps:
-
Make your changes in the bootstrap repo, open a pull request and request review.
-
Once approved and before merging, apply the changes to Concourse:
i. Set up the target: e.g.
yarn fly:login
(only needs to be done once)ii. Update the pipeline: e.g.
yarn fly:set-pipeline
-
Check that the changes work as expected. If there are problems, you can push fixes to your PR branch and retry.
-
Merge your PR.
Pull requests are tested using Github actions, which will run code style and unit tests against the PR. Github actions are defined in the .github
folder under workflows
Prompt: Does this service have a trigger for a CI deploy into a PR environment?
Prompt: What environments does this service use? Production, Staging and Sandbox?
Domains for this service are:
Prompt: If the service uses queues, describe and address here
- API documentation is generated at the same time as deploy, it is generated using APIDoc. It is deployed to this-service-apidocs.s3-website-eu-west-1.amazonaws.com.
- Sample requests - to run with Postman, targetting staging.