This repository contains the beta-stage frontend component of data.gov.uk
This repository contains an automated CI/CD pipeline for the main-mvp branch that enables rapid development and deployment of MVP features to the Integration environment.
What it does:
- Runs automated security scans and tests on every PR
- Builds Docker images when code is merged
- Automatically updates deployment configurations
- Deploys to Integration environment via ArgoCD
datagovuk_find repository:
├── main → Production deployments
└── main-mvp → MVP/Integration deployments
Developer creates PR → main-mvp
↓
CI Checks Run
├─ Security Analysis
├─ CodeQL SAST
├─ Dependency Review
└─ Test Suite
↓
PR Approved & Merged
↓
Docker Image Built
(ghcr.io/alphagov/datagovuk_find:main-mvp-<SHA>)
↓
Charts Updated
(charts/datagovuk/images/integration/find.yaml)
↓
ArgoCD Detects Change
↓
Deployed to Integration!
Located in .github/workflows/:
Purpose: Runs CI checks on every PR to main-mvp
Triggers:
- Pull requests to any branch
- Pushes to main-mvp
Jobs:
- Security Analysis - Brakeman security scanning
- CodeQL SAST - Semantic code analysis
- Dependency Review - Checks for vulnerable dependencies
- Test Suite - Full RSpec tests with Redis
Purpose: Builds and pushes Docker image on merge
Triggers:
- Merges to main-mvp branch
- Manual workflow dispatch
Process:
- Builds Docker image
- Tags with commit SHA
- Pushes to
ghcr.io/alphagov/datagovuk_find:<SHA>
Purpose: Updates deployment configuration automatically
Triggers:
- After
build-image-mvp.yamlcompletes successfully
Process:
- Runs
update-find-sha-mvp.shscript - Updates image SHA in govuk-dgu-charts
- Pushes directly to main-mvp branch
Located in docker/:
Purpose: Updates Find application image SHA in deployment charts
What it does:
- Clones
govuk-dgu-chartsrepository - Checks out
main-mvpbranch - Updates
charts/datagovuk/images/integration/find.yaml - Commits change with detailed message
- Pushes directly to main-mvp branch
- Cleans up temporary files
Environment Variables Required:
GH_TOKEN- GitHub token with write access to govuk-dgu-chartsGH_REF- Source branch reference (main-mvp)
File Updated and this path is on the govuk-dgu-charts repo:
# charts/datagovuk/images/integration/find.yaml
repository: ghcr.io/alphagov/datagovuk_find
tag: <SHA>
branch: main-mvp# 1. Create feature branch from main-mvp
git checkout main-mvp
git pull origin main-mvp
git checkout -b feature/jira-ticket-requirement
# 2. Make your changes
# ... code, commit, etc.
# 3. Push and create PR
git push origin feature/jira-ticket-requirementThis is useful to see the changes you made to markdown content. It will parse the markdown files, read the front matter, body and create or update the corresponding content in app/views/generated/collections directory.
bundle exec rake markdown:render- Go to GitHub and create PR targeting
main-mvp - CI checks will run automatically: - Security Analysis - CodeQL SAST scan - Dependency Review - Tests
- All checks must pass before merging
- Request review from national-data-library team
- Once approved, merge the PR
There are currently 3 ways to run this repo locally:
- Via govuk-dgu-charts - An end to end setup from ckan to Solr to Find. This is the closest stack to the Find app running on EKS. Instructions for how to setup and run Find this way available on the linked repo.
- Via docker stack in ckanext-datagovuk - This will be the fastest way to see your changes deployed and interact with a stack containing some seeded test data. It is also possible to run tests on it and debug issues within the containers.
- Manual installation - this will give the fastest way to run the tests. Instructions for this below.
You will need to install the following for development.
Most of these can be installed with Homebrew on a Mac.
bundle exec rake markdown:renderapp/content.
yarnyarn installs the node dependencies and builds the assets for the app.
bin/setupThis will install the ruby dependencies and start the server on http://localhost:3000 and you can view the app in your browser.
bundle exec rails s
Or
yarn && bundle exec rails s
The markdown rendering executed by the rake task markdown:render is a two step process:
-
The markdown files located at
app/contentare parsed and the content is extracted. -
The content is then used to create or update the corresponding content in the
app/views/generated/collectionsdirectory.
This rake task is also used in the CI pipeline to ensure that any changes to the markdown files are reflected in the app when deployed.
See the developer docs on data.gov.uk deployment
- Find landing page: https://data.gov.uk
- Search results: https://data.gov.uk/search?filters%5Btopic%5D=Environment
- Dataset: https://data.gov.uk/dataset/ce5f9a81-742d-4446-8610-2ec138e1b7e5/st-john-s-lake-intertidal-biotope-map-tamar-estuary-plymouth
- Dataset with publisher login: https://data.gov.uk/dataset/cf725d50-6535-4f8b-bc98-5ab01aa866a7/grants-to-voluntary-community-and-social-enterprise-organisations-local-government-transparency-code
- Support page: https://data.gov.uk/support
- Publisher login page: https://data.gov.uk/publishers