Skip to content

Commit 0b9da5e

Browse files
committed
update README
1 parent afe9255 commit 0b9da5e

2 files changed

Lines changed: 35 additions & 2 deletions

File tree

README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -469,3 +469,38 @@ This returns your token, which you can use in testing the authentication on the
469469

470470
The /api/v1/verify route get's the client keys and redirect uri from the bucket.
471471

472+
### Deployments with Concourse
473+
474+
#### Allowlisting your IP
475+
To setup the deployment pipeline with concourse, you must first allowlist your IP address on the Concourse
476+
server. IP addresses are flushed everyday at 00:00 so this must be done at the beginning of every working day
477+
whenever the deployment pipeline needs to be used. Follow the instructions on the Confluence page (SDP Homepage > SDP Concourse > Concourse Login) to
478+
login. All our pipelines run on sdp-pipeline-prod, whereas sdp-pipeline-dev is the account used for
479+
changes to Concourse instance itself. Make sure to export all necessary environment variables from sdp-pipeline-prod (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN).
480+
481+
#### Setting up a pipeline
482+
When setting up our pipelines, we use ecs-infra-user on sdp-dev to be able to interact with our infrastructure on AWS. The credentials for this are stored on
483+
AWS Secrets Manager so you do not need to set up anything yourself.
484+
485+
To set the pipeline, run the following script:
486+
```bash
487+
chmod u+x ./concourse/scripts/set_pipeline.sh
488+
./concourse/scripts/set_pipeline.sh KEH-TAT-API
489+
```
490+
Note that you only have to run chmod the first time running the script in order to give permissions.
491+
This script will set the branch and pipeline name to whatever branch you are currently on. It will also set the image tag on ECR to the current commit hash at the time of setting the pipeline.
492+
493+
The pipeline name itself will usually follow a pattern as follows: `<repo-name>-<branch-name>`
494+
If you wish to set a pipeline for another branch without checking out, you can run the following:
495+
```bash
496+
./concourse/scripts/set_pipeline.sh KEH-TAT-API <branch_name>
497+
```
498+
499+
If the branch you are deploying is "main" or "master", it will trigger a deployment to the sdp-prod environment. To set the ECR image tag, you must draft a Github release pointing to the latest release of the main/master branch that has a tag in the form of vX.Y.Z. Drafting up a release will automatically deploy the latest version of the main/master branch with the associated release tag, but you can also manually trigger a build through the Concourse UI or the terminal prompt.
500+
501+
#### Triggering a pipeline
502+
Once the pipeline has been set, you can manually trigger a build on the Concourse UI, or run the following command:
503+
```bash
504+
fly -t aws-sdp trigger-job -j KEH-TAT-API-<branch-name>/build-and-push
505+
```
506+

concourse/ci.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ jobs:
1313
plan:
1414
- get: resource-repo
1515
timeout: 5m
16-
trigger: true
17-
timeout: 5m
1816
- task: build-image
1917
privileged: true
2018
config:

0 commit comments

Comments
 (0)