Skip to content

Build a Docker image with lunr.js enabled

Addresses #1255 (closed).

  • Updates the .gitlab-ci.yml file to add one more job and test to build the archived version pushed to a new registry folder (registry.gitlab.com/gitlab-org/gitlab-docs/archives:$VER).
  • Find out how to make use of the index script make build-lunr-index.

How to verify locally

Build the site with ALGOLIA_SEARCH="false" set, and then build the index:

ALGOLIA_SEARCH="false" bundle exec nanoc compile
make build-lunr-index
make check-lunr-index

To emulate the CI environment:

docker build --build-arg NANOC_ENV=test --build-arg VER=15.4 --build-arg ALGOLIA_SEARCH="false" -t 15.4:lunrjs -f dockerfiles/single.Dockerfile .
CI=true IMAGE_NAME=15.4:lunrjs GITLAB_VERSION=15.4 make check-lunr-index

Merge request reports

Loading