Connect your code to the Designer

Add a code source - the CLI, an upload or a repository - so your designs can be matched to what was really built.

In short

A code source tells {{brand}} what was built. It reads only the structure - service names, how they connect and their endpoints - never code or a secret value. Readings arrive three ways: the {{brand}} CLI, files you upload, or a repository {{brand}} reads on every push.

Before you start

Steps

  1. On the Designer home, choose "Code", then press "Add code source".
  2. Choose "Scan with the CLI", give it a "Name" such as shop-backend, and press "Add the source".
  3. Copy the command it shows and run it in the repository's folder, on your machine or in a pipeline step, with an access token in KAMOCORE_TOKEN.
  1. Press "Add code source", choose "Upload files", name it and press "Add the source".
  2. Drop your docker-compose files, Helm charts, Kubernetes manifests or OpenAPI documents, then press "Read N files".
  1. Press "Add code source" and choose "Connect a repository". It is offered once an organization admin has connected a code host in Organization settings.
  2. Choose the "Connection", then type the "Repository" as the example under the field shows, and a "Branch to follow" if not the default branch.
  3. Give it a "Name" if you like, and press "Connect".
  4. The first reading starts at once. The connection's webhook reads again on every push; until it hears one, an hourly check stands in.
  5. Press "Test connection", then "Done".

Result: the source shows "Last read" with what it found, such as "12 services, 9 connections, 40 endpoints". Open an architecture and press "Check against code" to compare it.

  1. On the Designer home, choose "Code" and press "Import from repository". It shows in an organization that has a git connection, to people who manage the Designer here.
  2. Under "Repository", choose the "Git connection", type the "Repository" as the host writes it, such as acme/shop, and the "Branch", then press "Next".
  3. Under "What to map", choose the "Code to map": "Backend", "Web" or "Both". Under "Bring into", choose the products that look for what they can use, then press "Find what is there".
  4. Under "What was found", open a group to see its items and tick what to bring in; a large group is ticked only when you choose it. Under "Bring into", pick where the items go, or "A new one" with its name, then press "Next".
  5. Under "Keep in step", choose "As drafts to review" or "Add at once", and press "Import".

Result: "Imported" counts what was added, updated and left out, and says "Following acme/shop at main." With "As drafts to review", changes from later pushes wait in "From the repository" until someone presses "Accept" or "Ignore".

Good to know

Give a token that can only read A GitLab token with api or write scopes is refused. Azure DevOps cannot tell {{brand}} what a token may do, so give it only Code (Read).

Details for your IT team

If something goes wrong

Related