Hello! I have a pipeline where I need to run a database with test certificates as there are tests that verify that the client is able to connect via TLS.
The test certificates are in a tests/tls folder in the repo. and I am running the db (redis) as a service in the pipeline.
The redis container starts up, and the env vars are passed in, but I can see in the logs that it is unable to locate the certificates.
redis 11:51:18.64 ERROR ==> The X.509 certificate file in the specified path /src/tests/tls/redis.crt does not exist
What is the correct process to mount a volume to a service container?
Here is my bitbucket-pipelines.yaml file:
image: node:18
definitions:
services:
redis:
image: docker.io/bitnami/redis
variables:
ALLOW_EMPTY_PASSWORD: 'false'
REDIS_PASSWORD: $REDIS_CLIENT_PASSWORD
REDIS_TLS_CERT_FILE: /src/tests/tls/redis.crt
REDIS_TLS_KEY_FILE: /src/tests/tls/redis.key
REDIS_TLS_CA_FILE: /src/tests/tests/tls/ca.crt
REDIS_TLS_ENABLED: 'yes'
REDIS_PORT: '6379'
REDIS_TLS_PORT: '6378'
ports:
- 6379:6379
- 6378:6378
volumes:
- $BITBUCKET_CLONE_DIR:/src
steps:
- step: &npm-install
name: Install dependencies
caches:
- node
script:
- npm install
pipelines:
default:
- step: *npm-install
- parallel:
- step:
name: Build and Test
services:
- redis
caches:
- node
script:
- npm test
...