Configuration
Divekit uses a hierarchical configuration system with both global and project-specific settings.
Configuration Levels
Divekit uses a multi-level configuration system based on the frequency of changes:
[0] Installation
Configurations that are set once during DiveKit installation and rarely changed afterwards. These contain global defaults and environment settings.
~
βββ .divekit/
βββ .env # Environment variables
βββ hosts.json # Hosts configuration
βββ members # Members configuration
β βββ 2025-01-21_12-28-15_pear_members.json
β βββ 2025-01-27_12-29-00_raspberry_members.json
β βββ 2025-01-27_12-40-02_sandwich_members.json
βββ origin.json # Origin configuration
βββ variation # Variation configuration (not finalized)
βββ relations.json # Relations configuration
βββ variableExtensions.json # Variable extensions configuration
βββ variations.json # Variations configuration
Environment Configuration
~/.divekit/.env
:
API_TOKEN=YOUR_ACCESS_TOKEN
DEFAULT_BRANCH=main
Remotes
Default:
~/.divekit/hosts.json
:
{
"version": "1.0",
"hosts": {
"default": {
"host": "https://gitlab.git.nrw/",
"token": "DIVEKIT_API_TOKEN"
}
}
}
Example:
~/.divekit/hosts.json
:
{
"version": "1.0",
"hosts": {
"default": {
"host": "https://gitlab.git.nrw/",
"tokenAt": "DIVEKIT_API_TOKEN"
},
"archilab": {
"host": "https://gitlab.archi-lab.io/",
"tokenAt": "DIVEKIT_API_TOKEN_ARCHILAB"
},
"gitlab": {
"host": "https://gitlab.com/",
"tokenAt": "DIVEKIT_API_TOKEN_GITLABCOM"
}
}
}
[1] Semester
Configurations that are typically set at the beginning of each semester. These define course-wide settings and distribution templates.
{ORIGIN_DIR}
βββ .divekit/ # Project configuration
βββ distributions/
βββ ST1-M1/ # Sandbox environment config
β βββ config.json # Distribution settings
βββ ST1-M2/ # Student environment config
βββ config.json # Distribution settings
Distribution Configuration (Example)
{ORIGIN}/.divekit/distributions/<distribution>/config.json
:
{
"version": "2.0",
"targets": {
"default": {
"remote": "default", // optional
"groupId": 12345, // optional (if set in global config)
"name": "ST1-M1-{{uuid}}",
"members": {
"path": "$DIVEKIT_MEMBERS/2025-01-25_13-37_ST1-M1_members.json",
"rights": "reporter"
}
},
"test": {
"remote": "gitlab",
"groupId": 67890, // optional (if set in global config)
"name": "ST1-M1-{{uuid}}_test",
"members": {
"path": "$DIVEKIT_MEMBERS/2025-01-25_13-37_ST1-M1_members.json",
"rights": null
}
}
}
}
[2] Milestone
Configurations that change with each milestone or assignment. These include specific repository settings and member assignments.
{ORIGIN_DIR}
βββ .divekit/
βββ distributions/
βββ <distribution>/ # e.g. ST1-M1
βββ config.json # Milestone-specific settings
Members Configuration
members.csv
:
username
tbuck
ada
charles
jobs
woz
generates:
~/.divekit/members/2025-01-25_13-37_ST1-M1_members.json
:
{
"version": "2.0",
"groups": [ // ? rename to "members"?
{
"uuid": "4a28af44-f2cd-4a9e-a93f-2f4c29d6dfc0",
"members": [ // ? rename to "group"?
"torben.buck"
]
},
{
"uuid": "3dc6bbc1-a4eb-44fd-80fc-230bea317bc1",
"members": [
"ada"
]
},
{
"uuid": "1fe6aa82-e04b-435f-8023-10104341825d",
"members": [
"charles"
]
},
{
"uuid": "eb64c6af-67da-4f55-ae3a-d4b2a02baae6",
"members": [
"jobs"
]
},
{
"uuid": "ade17515-bdb9-4398-90c1-cfc078f5ec36",
"members": [
"woz"
]
}
]
}
[3] π§ Call
Configurations that can be overridden during command execution. Any configuration value from the previous levels can be overridden using command-line arguments.
Examples:
# Specify individual files for patching
divekit patch --distribution="sandbox" src/main/java/Exercise.java src/test/java/ExerciseTest.java
# set debug loglevel
divekit patch --loglevel=debug