Validate locally before rollout

Run Your First Distribution

Validate locally before rollout

Validate the setup locally before you let Divekit create anything remotely.

A real distribution creates remote repositories and assigns members.

Before you do that, validate the setup locally first.

For this course, that means:

  • check the environment with divekit doctor
  • optionally generate a local distribution result with divekit distribute -d M0 --provider local

Validate the setup

Step 1: re-run doctor

Before the rollout, re-check the setup:

divekit doctor

At this stage, doctor should no longer complain about missing authentication. If it still reports obvious problems, fix those first.

Step 2: optionally distribute locally

If you want to inspect a real generated result before touching GitLab, run:

divekit distribute -d M0 --provider local

Divekit supports two providers for distribute: gitlab (the default) and local.
The local provider writes the actual generated output to your filesystem instead of creating anything on GitLab.

The member input opens first

Even a local distribution needs to know how many repositories to generate.
If no members are configured yet, Divekit opens its interactive member input before it generates anything:

Member Name Input
Write one username per line, or comma-separate members that share one repository.

╭─────────────────────────────────────────────────────────────
│   1 student-one
│   2 student-two
╰─────────────────────────────────────────────────────────────

ctrl+s/d finish • ctrl+e external editor • esc/ctrl+c cancel

For this local test, two lines with a safe test account are enough — each line becomes one generated repository.
The next lesson explains the member input in detail. The input you enter here is stored and reused for the real rollout.

Confirm the distribution plan

Divekit then shows what it is about to generate and asks for confirmation:

┃  # Distribution Plan
┃  file://.divekit/local-data/M0/local/20260716-102455_311/work
┃  └─ work
┃     ├─ M0-b8520e99-2bad-c0de-b61c-1249a10f7a5a/repo
┃     └─ M0-a70decaf-bad7-4c95-b211-d0bc95f48204/repo

Proceed with distribution?

  Yes      No

Completed: 4/4

Distribution completed successfully!
Created repositories for 2 group(s)

Open the generated result

The local result lands under .divekit/local-data/M0/local/<timestamp>_<groupId>/.
Its work/ folder contains one directory per generated repository, so you can open the individualized files directly:

.divekit/local-data/M0/local/20260716-102455_311/
├── individuals.json
├── remotes.json
└── work/
    ├── M0-b8520e99-2bad-c0de-b61c-1249a10f7a5a/
    │   ├── members.json
    │   ├── variables.json
    │   └── repo/
    │       ├── README.md
    │       └── src/
    │           └── Car.java
    └── M0-a70decaf-bad7-4c95-b211-d0bc95f48204/
        └── ... (same structure, possibly with a different vehicle)

This is the first moment you can see the individualization with your own eyes.
Open a generated src/ file and compare it with your template:

public class Car {
    public String kind() {
        return "Car";
    }
}

Every $Vehicle$ was replaced consistently — in the file name and in the content.

Two details are worth knowing:

  • the variant per repository is chosen randomly, so two repositories can also end up with the same vehicle — that is normal, and individuals.json records what was chosen
  • the local run writes its own individuals.json and remotes.json into this timestamped folder instead of .divekit/distributions/M0/ — the state files there come from later rollouts against GitLab

What to look for

Look for these signals:

  • doctor reports a healthy environment
  • a local distribution finishes cleanly if you chose to run it
  • the generated local result matches your template and individualization before you touch remote systems

If your individualization still feels unclear at this point, go back to the previous lesson and re-run divekit dev there before the real rollout.

Quick interpretation

What you see How to read it What to do next
doctor looks healthy Environment validation passed Move on to the local or real rollout
local distribution completes and generated files look correct Strong local validation result Move on to the real rollout with more confidence
authentication or host problems in doctor Environment is not ready Fix host or token setup first
local distribution does not produce the files you expect Setup is still incomplete Re-check config, template, and individualization

Common failures

What to try

Open .divekit/distributions/M0/config.json and check:

  • remote
  • groupId
What to try

Run:

divekit config hosts list
What to try

Confirm that:

  • the template uses $Vehicle$
  • .divekit/individualization.json defines Vehicle
  • the local result still looks consistent with that definition
What to try

When local validation fails, do not immediately jump to a remote rollout. Instead:

  • inspect the files
  • verify aliases and target values
  • re-run doctor
  • if necessary, go back to the previous lesson and re-run divekit dev after one clear fix

Check

Run this command first:

divekit doctor

If you want one more realistic check before GitLab, also run:

divekit distribute -d M0 --provider local
Suggested answer
doctor only checks the environment and configuration. The local provider actually runs a distribution and writes generated output to your filesystem, so you can inspect a realistic result without creating anything on GitLab.
Suggested answer
divekit doctor reports a healthy environment, the local result looks correct if you generated one, and no remaining warning requires action.