Skip to content

Commit d6459f2

Browse files
committed
docs: add JSON mapping explanation
1 parent 56fa746 commit d6459f2

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,43 @@ gitlab-sync \
7272
--destination-token <destination_gitlab_token> \
7373
--mirror-mapping /path/to/mirror.json
7474
```
75+
76+
## JSON Mapping File
77+
78+
The JSON mapping file is used to define the projects and groups to be synchronized between the two GitLab instances. You also define the copy options for each project / group.
79+
80+
Allowed options are:
81+
| Option | Description |
82+
|--------|-------------|
83+
| `destination_path` | The path to the project / group on the destination GitLab instance. |
84+
| `ci_cd_catalog` | Whether to add the project to the CI/CD catalog. |
85+
| `issues` | Whether to copy issues from the source project to the destination project. |
86+
| `visibility` | The visibility level of the project on the destination GitLab instance. Can be `public`, `internal`, or `private`. |
87+
| `mirror_trigger_builds` | Whether to trigger builds on the destination project when a push is made to the source project. |
88+
89+
Be aware that the destination path must be unique for each project / group. If you try to synchronize a project / group with the same destination path as an existing project / group, the synchronization will fail.
90+
91+
Also, the destination namespace must exist on the destination GitLab instance. If the namespace does not exist, the synchronization will fail.
92+
93+
```json
94+
{
95+
"projects": {
96+
"existingGroup1/project1" : {
97+
"destination_path": "existingGroup64/project1",
98+
"ci_cd_catalog": true,
99+
"issues": false,
100+
"visibility": "public",
101+
"mirror_trigger_builds": false
102+
}
103+
},
104+
"groups": {
105+
"existingGroup152" : {
106+
"destination_path": "existingGroup64/existingGroup152",
107+
"ci_cd_catalog": true,
108+
"issues": false,
109+
"visibility": "public",
110+
"mirror_trigger_builds": false
111+
}
112+
}
113+
}
114+
```

0 commit comments

Comments
 (0)