Distribution
Learn how Divekit distributes programming assignments to students.
Overview
Divekit can distribute your assignment to multiple repositories on GitLab, creating individualized versions for each student or group. This process includes:
- Creating code repositories for each student/group
- Optionally creating secure pipeline repositories for automated testing
- Assigning the correct permissions to students
- Individualizing the content based on your configuration
- Setting up automated CI/CD pipelines
Initialize Distribution
Before you can distribute assignments, you need to initialize a distribution configuration:
divekit init
This command will guide you through creating a new distribution and create a .divekit/distributions/<name>/config.json
file in the current directory.
The distribution name is used to identify the distribution configuration.
Distribution Guide
After initializing your distribution, use the distribute command to start the distribution process:
divekit distribute
Or with the --distribution
flag:
divekit distribute --distribution <distribution-name>
The command will:
- Load or prompt for the specified distribution configuration
- Ask for members to process
- Check if all configured members exist on GitLab
- Show you a summary of what will be created
- Create the repositories after your confirmation
Example Flow
# First, initialize a new distribution
$ divekit init
[interactive prompts for configuration...]
# Then distribute the assignment
$ divekit distribute --distribution my-assignment
--- Distribution Plan ---
Distribution Name: my-assignment
Target: https://gitlab.git.nrw/
- Repo Name Template: assignment-{{uuid}}
- Target Group ID: 12345
- Members to process: 5 members across 2 groups
Would create 2 repositories with name "assignment-{{uuid}}" and assign 5 members.
Secure pipeline enabled - will also create sandbox repositories.
? Continue? [Y/n]: y
Creating main repositories at group #234567:
[ββββββββββββββββββββββββββββββββββββββββββββββββββ] 100% (2/2)
Creating secure pipeline repositories at group #345678:
[ββββββββββββββββββββββββββββββββββββββββββββββββββ] 100% (2/2)
Setting up repository linking (main β sandbox):
[ββββββββββββββββββββββββββββββββββββββββββββββββββ] 100% (2/2)
Assigning members:
[βββββββββββββββββββββββββββ ] 50% (1/2)
What Happens During Distribution?
- Divekit creates a new code repository for each student/group
- If secure pipeline is enabled, sandbox repositories are created in a separate group
- Repository contents are individualized based on your variable configuration
- Students are assigned with appropriate permissions (developer/maintainer)
- Repository linking is established between code and sandbox repositories
- CI/CD pipelines are configured for automated testing
- Each repository gets a unique identifier via UUID
Next Steps
- Learn more about configuration options
- Understand how to individualize assignments
- Check the CLI commands reference for advanced options
Last modified September 11, 2025: docs(cli): update documentation to ~current state (9bc308b)