Skip to content

Commit 8eebc97

Browse files
palkerecsenyizzacharo
authored andcommitted
vcs: add GitLab/GitHub repo syncing docs
1 parent 85d2c8f commit 8eebc97

7 files changed

Lines changed: 105 additions & 1 deletion

File tree

docs/communities/submit.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,16 @@ If you are unsure which community to submit to, the table below covers the most
1313
| Dataset or software produced as part of a CERN experiment | The relevant experiment community |
1414

1515
!!! note "Can't find your community?"
16+
1617
If your community does not appear in the new CDS or the deposit form, it may still only be present in the legacy CDS. Communities are being migrated progressively to the new CDS.
1718
See the [CDS Migration page](https://new-cds-project.docs.cern.ch/) for updates on the migration status and timeline.
1819

20+
!!! tip "Submitting software to CDS"
21+
22+
If your software is in a repository on either CERN's internal GitLab instance ([gitlab.cern.ch](https://gitlab.cern.ch)) or on [GitHub.com](https://github.com), you can set up automatic archiving in a few easy steps.
23+
24+
See our [guide to GitLab & GitHub repositories](../deposit/repositories.md).
25+
1926
You can submit your record to more than one community only **after** your record has already been published to an initial community.
2027
Only then can you submit it to additional communities if it fits multiple scopes. See [Multiple communities](#multiple-communities) below for details.
2128

41.4 KB
Loading
54.4 KB
Loading

docs/deposit/images/vcs-list.png

64.8 KB
Loading
35.5 KB
Loading

docs/deposit/repositories.md

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
# Publish GitLab and GitHub repositories
2+
3+
You can sync your GitLab and GitHub repositories directly to CDS.
4+
Each new release will create a record on CDS with a ZIP archive of the repository's contents and automatically extracted metadata.
5+
6+
## Connect your account
7+
8+
To be able to sync your repositories, you need to connect your GitLab and/or GitHub account.
9+
10+
1. From any page on CDS, click on the user dropdown, and click either **CERN GitLab** or **GitHub**. The option you select depends on where your repository is located.
11+
- Select **CERN GitLab** if your repository is on [**gitlab.cern.ch**](https://gitlab.cern.ch).
12+
- Select **GitHub** if your repository is on [**github.com**](https://github.com).
13+
14+
![The user dropdown, with the "CERN GitLab" and "GitHub" options](./images/vcs-dropdown.png){width=200px}
15+
16+
2. Click **Connect** and follow the steps to log in with the service.
17+
3. Your repositories will show up in a list.
18+
19+
![The repository management page, with the full list of available repositories shown.](./images/vcs-list.png)
20+
21+
!!! info "Supported repository services"
22+
23+
**We only support CERN's internal GitLab instance and public GitHub.** We do not currently support
24+
any other repository services. If your repository is hosted elsewhere, you can create and publish records
25+
for its releases manually: see how to [upload a record](./upload.md).
26+
27+
!!! info "Repository visibility"
28+
29+
**Only repositories for which you have sufficient access permissions are shown.**
30+
In general, you must be able to view the repository and manage its webhooks.
31+
If you do not have the correct level of access to a repository, it will not be visible in the list on CDS.
32+
33+
On GitLab, this means you need either the **Maintainer** or **Owner** role on the project or its group. See [GitLab's project permissions documentation](https://docs.gitlab.com/user/permissions/#projects) for more information.
34+
35+
On GitHub, this usually means you need at least the **Admin** role on the repository. See [GitHub's roles documentation](https://docs.github.com/en/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/repository-roles-for-an-organization) for more information.
36+
37+
## Enable a repository
38+
39+
When a repository is enabled, CDS will start listening for releases and automatically create a record when a new one is received.
40+
By default, none of your repositories are enabled, so no records will be created.
41+
42+
1. Find the repository in the list. If you cannot find it, please refer to the "Repository visibility" section above.
43+
2. Click on the **toggle switch**.
44+
3. Select the [community](../communities/communities.md) that records made for the repository's releases should be published to.
45+
All records on CDS must be published to a community. The record will be subject to the [community's review policy](../communities/submit.md) as normal.
46+
47+
![The modal for selecting a community for a repository's records, showing a searchable list of communities](./images/vcs-community-select.png)
48+
49+
4. The repository is enabled! New releases from this point will result in the creation of a record on CDS.
50+
51+
## View a repository's releases
52+
53+
Whenever you create a new release for an enabled repository, CDS will receive it and attempt to publish a record from it.
54+
55+
To view the status of a release and the record created from it, click on the repository's name in the list.
56+
57+
![The list of a repository's release, with each item showing the status and a link to the record](./images/vcs-releases.png)
58+
59+
### Release statuses
60+
The status of each release is shown. The possible statuses are as follows:
61+
62+
- **Received**/**Processing**: CDS has received the release from GitHub/GitLab and is processing it. This normally takes a few seconds, but can sometimes take longer for very large repositories. If a repository is stuck in this state for a longer time, please [contact the CDS team via ServiceNow](https://cern.service-now.com/service-portal?id=sc_cat_item&name=incident&se=CDS-Service) with the full name of your repository.
63+
64+
- **Failed**: There was a problem creating a record from the release. Usually, this means some part of the repository contained unexpected data. Click on the release and click on the "Errors" tab to see more information.
65+
66+
- In most cases, you will need to modify the repository, and then create a new release.
67+
- If an "Edit record" button is visible, you can instead edit the draft record to correct the errors, and then publish it manually.
68+
69+
- **Pending review**: The record was successfully created as a draft and is pending review by the community it was submitted to. Once it is accepted, it will be published immediately. No further action is required from you.
70+
71+
- **Published**: The record has been published.
72+
73+
### Create a DOI
74+
75+
By default, records published from repository releases are not assigned a DOI.
76+
If a release's published record does not have a DOI, you can create one:
77+
78+
1. Click on the **View record** button for the relevant release.
79+
2. Click on the **Edit** button.
80+
3. Follow the [steps to either obtain a new DOI or specify an existing one](./upload.md#dois).
81+
4. Click on the **Publish** button to save your changes.
82+
83+
If a release's record has a DOI, this is shown in the list of releases.
84+
85+
## Disable a repository
86+
87+
Disabling a repository will stop new releases from being published as record on CDS.
88+
89+
!!! warning "Existing records created from repository releases"
90+
**Disabling a repository will not affect existing records created from its releases**.
91+
Deleting published records is usually not possible on CDS.
92+
Please [see the deletion policy](../deposit/published-records.md#delete) for more details.
93+
94+
1. Find the repository in the list. It will be shown above other, non-enabled repositories, in a separate section titled "Enabled Projects" or "Enabled Repositories".
95+
2. Click on the toggle switch.
96+
3. The repository is disabled. New releases will no longer result in the creation of a record on CDS.

mkdocs.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ site_author: CERN
77
repo_url: ""
88

99
# Copyright
10-
copyright: Copyright © CERN 2025
10+
copyright: Copyright © CERN 2025-2026
1111

1212
# Theme configuration
1313
theme:
@@ -112,6 +112,7 @@ nav:
112112
- Upload: deposit/upload.md
113113
- Published records: deposit/published-records.md
114114
- Access & Share: deposit/access-share.md
115+
- GitLab & GitHub repositories: deposit/repositories.md
115116
- Search:
116117
- How to search: search/search.md
117118
- Communities:

0 commit comments

Comments
 (0)