Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: How Renovate Works overview - Basic #25108

Merged
merged 34 commits into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from 32 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
a20693e
First draft
azro352 Oct 9, 2023
952aaaa
Lighter basic graph
azro352 Oct 9, 2023
50bd677
Apply suggestions from code review
azro352 Oct 14, 2023
fb96509
grammar
azro352 Oct 14, 2023
3a006e7
grammar
azro352 Oct 14, 2023
f253284
Apply suggestions from code review
azro352 Nov 5, 2023
2cba809
Add advanced wf
azro352 Nov 5, 2023
ec77991
Add advanced wf
azro352 Nov 5, 2023
4258dfc
Merge branch 'main' into feat/how-does-work-basic
azro352 Nov 5, 2023
50e1dd8
Apply suggestions from code review
azro352 Nov 6, 2023
bad2cb9
renamd
azro352 Nov 6, 2023
fe53bb3
Apply suggestions from code review
azro352 Nov 11, 2023
166ec5a
suggestions'
azro352 Nov 11, 2023
9505c56
Merge branch 'feat/how-does-work-basic' of https://github.com/azro352…
azro352 Nov 11, 2023
2b0aa08
Merge branch 'main' into feat/how-does-work-basic
azro352 Nov 11, 2023
d9e2ed8
lint
azro352 Nov 11, 2023
8d183dd
suggestions
azro352 Nov 13, 2023
0eaae45
Apply suggestions from code review
azro352 Nov 15, 2023
3972b24
Merge branch 'main' into feat/how-does-work-basic
azro352 Nov 15, 2023
c2858d7
suggestions
azro352 Nov 15, 2023
9cbedd1
suggestions
azro352 Nov 15, 2023
1b12035
suggestions
azro352 Nov 15, 2023
eb65672
Merge branch 'main' into feat/how-does-work-basic
azro352 Nov 15, 2023
5f0b9ce
suggestions
azro352 Nov 15, 2023
377c926
Apply suggestions from code review
azro352 Nov 16, 2023
9c8a3b9
suggestions
azro352 Nov 16, 2023
6f81b2f
Update how-renovate-works.md
azro352 Dec 9, 2023
6ebc769
Merge branch 'main' into feat/how-does-work-basic
azro352 Dec 9, 2023
f5c38cf
Update how-renovate-works.md
azro352 Dec 18, 2023
3c95e64
Update how-renovate-works.md
azro352 Dec 18, 2023
3543f7c
Update how-renovate-works.md
azro352 Dec 18, 2023
a5f261d
Update how-renovate-works.md
azro352 Dec 18, 2023
a8a89f8
Update how-renovate-works.md
azro352 Dec 19, 2023
4a39362
Update how-renovate-works.md
azro352 Dec 19, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/usage/key-concepts/.pages
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
nav:
- 'How Renovate works': 'how-renovate-works.md'
- 'Presets': 'presets.md'
- 'Dependency Dashboard': 'dashboard.md'
- 'Pull Requests': 'pull-requests.md'
Expand Down
113 changes: 113 additions & 0 deletions docs/usage/key-concepts/how-renovate-works.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
---
title: How Renovate works
description: Learn how Renovate works
---

# Introduction

Renovate usually performs these steps:

- Cloning the repository
- Scanning package files to extract dependencies
- Looking up registries to check for updates
- Applying any grouping rules defined
- Pushing branches and raising Pull Requests

Because Renovate must support a lot of dependency naming and versioning conventions, it has modules for each known convention.
You can contribute your own modules, if you want.

## Modules

Renovate's modules are:

- [datasource](../modules/datasource/index.md)
- [manager](../modules/manager/index.md)
- [platform](../modules/platform/index.md)
- [versioning](../modules/versioning.md).
rarkins marked this conversation as resolved.
Show resolved Hide resolved
azro352 marked this conversation as resolved.
Show resolved Hide resolved

Renovate uses these modules in order:

1. The platform module interacts with the source control platform and clones the repository
1. The manager module looks for files based on their name and extracts the dependencies (each dependency has a datasource)
1. The datasource module looks up versions of the dependency
1. The versioning module validates and sorts the returned versions

For example:

1. The `gitlabci` manager finds a dependency: `python:3.10-alpine` which has the `docker` datasource
2. The `docker` datasource looks for versions and finds: `[python:3.9,python:3.9-alpine,python:3.10,python:3.10-alpine,python:3.11,python:3.11-alpine]`
3. The `docker` versioning returns `python:3.11-alpine`, because that version is compatible with `python:3.10-alpine`

# Workflow

Here's an overview of the workflow:

```mermaid
flowchart TB
subgraph INITIALIZATION
direction TB
MC[Merge configurations \n most important to least: \n cli > env > file > default]
MC --> IP[Initialize platform]
IP --> AD[Query the platform for repositories]
AD --> NFIL[Narrow the list with filters]
end

subgraph REPOSITORY
direction TB
FER{{For each repository}}

subgraph EXTRACTD[EXTRACT DEPENDENCIES]
direction TB
CLBRANCH[Extract base branches]
CLBRANCH --> VULN[Check for vulnerabilities]
VULN --> CC{{For each manager}}
CC -->|managerA| CD["..."]
CC -->|managerB| CCF["match files"]
CCF --> CFEF{{For each file}}
CFEF -->|file1| CCD1[Extract dependency]
CFEF -->|file2| CCD2[...]
end

subgraph LOOKUP[LOOK UP UPDATES]
direction TB
UC{{For each manager}}
UC -->|managerA| UD["..."]
azro352 marked this conversation as resolved.
Show resolved Hide resolved
UC -->|managerB| UFEF{{For each file}}
UFEF -->|file1| FED{{For each dependency}}
UFEF -->|file2| FED2[...]
FED -->|dep1| D1[...]
D1 -..-> CU
FED -->|dep2| D2[use datasource to \n fetch versions]
D2 --> J[use versioning to find \n next valid update]
FED2 -...-> CU
UD -....-> CU
J --> CU[Look up updates]
end

subgraph WRITEU[WRITE UPDATES]
direction TB
FEU{{For each update}}
FEU --> AUCOND[Check if branch needed: \n existing/rebase/concurrent amount]
AUCOND --> AU[Create branch\nApply update\nCreate PR]
end

subgraph FINALIZE[FINALIZE]
direction TB
CM[Check for config migration]
CM --> CSB[Clean stale branches]

end

FER --> IRPO[Initialize repository]

IRPO --> EXTRACTD
EXTRACTD --> LOOKUP

LOOKUP --> WRITEU

WRITEU --> FINALIZE

end

INITIALIZATION --> REPOSITORY
```