Skip to content

Fix Grove build issues

Keith Grootboom requested to merge keith/mongo_password_characters into main

Description

This PR fixes multiple issues discovered in running/building Grove.

MongoDB password

This PR changes the allowed characters to exclude * in the password used for MongoDB.

In yaml there are reserved characters that should not be used without quoting strings. This PR removes them from the override_special default list.

Specifically, *#! are removed.

Relevant failed pipeline: https://gitlab.com/opencraft/dev/grove-development/-/jobs/2180943350

Mkdocs version

Mkdocs 1.2.3 isn't compatible with Jinja2 3.1.0. See https://github.com/mkdocs/mkdocs/pull/280.

Relevant failed pipeline: https://gitlab.com/opencraft/dev/grove-development/-/jobs/2180943350

Docker TLS on Gitlab

Added DOCKER_TLS_CERTDIR to CI environment otherwise docker daemon doesn't work on shared runners.

Reference https://about.gitlab.com/blog/2019/07/31/docker-in-docker-with-docker-19-dot-03/

Relevant failed pipeline: https://gitlab.com/opencraft/dev/grove-development/-/jobs/2181258265

Building images

Added required build-args to the docker build command in the wrapper-script as those arguments are needed when building an image.

Escaping the tutor bucket name

Fixes the bash code for escaping the tutor bucket name.

export TUTOR_ID=keith-secondy
# Before, the TUTOR_ID wouldn't be parsed correctly to determine the bucket name.
echo '{"keith-secondy":"tenv-secondy-keith-thirdy-20220308161241194600000004"}' | jq -r '."$TUTOR_ID"'
# After it works
echo '{"keith-secondy":"tenv-secondy-keith-thirdy-20220308161241194600000004"}' | jq -r .\"$TUTOR_ID\"

Relevant pipeline: https://gitlab.com/opencraft/dev/grove-development/-/jobs/2180473918

Testing instructions

  • Provision a new cluster
  • Inspect the state file and check the password generated for MongoDB.
  • It should not contain any of the yaml special characters.
  • The build should run without a problem in the CI
Edited by Keith Grootboom

Merge request reports