Data Provider
Dev Setup
- Start the database docker service in
tools/db
. - Install OCCMD and edit the
script
resources/scripts/occmd.sh
to point at the installation directory - Set the necessary environment variables (the following shows examples):
# Access token for OpenCoDE
OC_GL_APIKEY=XXX
# Directories in which temporary data is stored
GIT_CLONE_TARGET_DIRECTORY=/tmp/opencode
TOOL_RESULTS_TARGET_DIRECTORY=/tmp/opencode/toolresults
# This sets the API key needed to acess this server's API
# Length of the key needs to be > 30 characters
API_KEY=XXX
# Password for the admin user who can access the
# restricted parts of the API
ADMIN_PASSWORD=XXX
# The port on which the spring boot server is started
PORT=XXX
# Access data for the database
DB_URL=jdbc:postgresql://${HOST}:${PORT}/${database}
DB_USER=XXX
DB_PW=XXX
Make sure that the db settings match the values in the database dockerfile!
If you are using IntelliJ for development it is easiest to create a .env
file in the resources
folder.
This file is automatically loaded by the IDE.
Tests
To run the e2e tests make sure to install the git submodules in the test directory.