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:

  1. Load or prompt for the specified distribution configuration
  2. Ask for members to process
  3. Check if all configured members exist on GitLab
  4. Show you a summary of what will be created
  5. 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?

  1. Divekit creates a new code repository for each student/group
  2. If secure pipeline is enabled, sandbox repositories are created in a separate group
  3. Repository contents are individualized based on your variable configuration
  4. Students are assigned with appropriate permissions (developer/maintainer)
  5. Repository linking is established between code and sandbox repositories
  6. CI/CD pipelines are configured for automated testing
  7. Each repository gets a unique identifier via UUID

Next Steps