developers

Continuous integration

The current latest default branch build deploys to staging automatically.

After a deployment to stage environment, we run smoke tests against the stage API and then e2e tests on the front-end pointing the production wellcomecollection.org at the stage catalogue API.

After a successful stage deployment we run the diff_tool and wait for a user to review and deploy to production.

We then run the same smoke & e2e tests pointed at production to confirm a successful deployment.

The CI flow looks as follows:

Buildkite pipelines

Dependencies

  • Java 1.8

  • Scala 2.12

  • SBT

  • Terraform

  • Docker

  • Make

Installing dependencies

We suggest using SDKMAN to manage Java versions. It can be installed with:

curl -s "https://get.sdkman.io" | bash
source "$HOME/.sdkman/bin/sdkman-init.sh"

Then install Java 11 with:

sdk install java 11.0.24-amzn

At the root of the project you should be able to use sbt to run the project as described below.

Running locally

Currently only the search & items API can be run locally. It will use the configured pipeline index in ElastiConfig.scala.

You will need to have signed in to the AWS on the CLI to allow the application to assume the required role.

To run with reloading of code changes using sbt-revolver from the root of the repository:

sbt "project search" "~reStart"
AWS_PROFILE=catalogue-developer sbt "project items" "~reStart"

You should then be able to access the APIs at:

  • http://localhost:8080/works: Seach

  • http://localhost:8081/items: Items

To specify a different pipeline index, you can set the pipelineDate environment variable for the search API:

pipelineDate=2021-01-01 sbt "project search" "~reStart"

Last updated