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, which are used in the application.properties:
opencode.access-token=${OC_GL_APIKEY}
# DB Login data
spring.datasource.url=${DB_URL}
#spring.datasource.url=jdbc:postgresql://${host}:26257/${DB_USER}?sslmode=${ssl_mode}&sslrootcert=${ca_crt}&sslcert=${ssl_cert}&sslkey=${ssl_key}
spring.datasource.username=${DB_USER}
spring.datasource.password=${DB_PW}
# API key to access this server's API
security.api-key=${API_KEY}
security.admin-password=${ADMIN_PASSWORD}
directories.git-clone-target-directory=${GIT_CLONE_TARGET_DIRECTORY}
directories.tool-results-target-directory=${TOOL_RESULTS_TARGET_DIRECTORY}
server.port=${PORT}
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.
- Import the project into your IDE or use the commandline to build the application and run the server. For details on how to run the program manually consider the spring boot documentation.
Tests
To run the e2e tests make sure to install the git submodules in the test directory.