Administrate Package Repositories
Users with the System Admin role can perform global administration of repositories using the Administration | Package Repositories page. The list of repositories available to you on this page depends on your user account permissions.
On the Administration | Package Repositories page:
Active shows the list of the repositories that are attached to a project(s). After you create a repository in a project, it becomes attached to this project. The attached repository can be distinguished by its alias:
$project_name/$repository_name
. You can attach a repository to multiple projects. In this case, the repository will have multiple aliases.Detached shows the list of the repositories (repository aliases) that are no longer attached to a project.
How the repository becomes detached:
If someone deletes the repository.
If someone manually detaches the repository.
What happens next:
If the detached repository has no more aliases (not attached to other projects), after one week, it is automatically deleted. During this week, the detached repository is still available at its URL.
If the repository has other aliases (it is attached to other projects), it will not be deleted until these other aliases exist. During this time, the detached repository is still available at its URL.
In both cases, the repository will be deleted if someone creates a repository with the same name in the same project.
All shows all repositories in the organization.
Attach a repository to a project or multiple projects
In Administration, open the Package Repositories page.
Find the required repository and in the repository menu, choose Attach to project.
In the opened window, select the project to attach to and specify the repository name. Note that the repository is allowed to have different names in different projects.
After this, a new alias will be assigned to the repository, and the repository will become available on the project's Packages page.
Detach repositories from projects
In Administration, open the Package Repositories page.
Find the required repository alias (the alias associated with the project from which you want to detach the repository) and click the Detach alias button next to the alias.
After this, the detached repository will disappear from the project's Packages page but it will be available at its old URL within one week. After this week, if the repository has no more aliases (is not attached to at least one project), it will be deleted permanently. Otherwise, if the repository has other aliases, it will be available at its URL until these other aliases exist.
Delete repositories
Navigate to the project where you want to delete a repository.
On the project sidebar, choose Packages.
In the repository menu, choose Delete.
After this, the repository is not deleted permanently. Instead, it becomes detached: it will disappear from the project's Packages page but it will be available at its old URL within one week. After this week, it will be deleted permanently.
Note that if someone deletes the project this repository belongs to, the repository is deleted immediately and permanently.
Configure auto-deletion of packages
With packages being uploaded, a repository grows over time. To release storage space and improve repository performance, you can configure auto-deletion of old and no-longer-needed packages. This is done with a set of conditions called retention policies.
Note that 'retention policies' are not 'cleanup rules'. While the latter implies that a certain condition must be met in order to delete a package, 'retention policies' are conditions that prevent packages from deletion. If at least one condition is satisfied, the package will not be auto-deleted.
To configure auto-deletion of packages in a repository
Open the Packages page of the required project.
Find the required repository and in the repository menu, choose Settings.
Open the Retention Policies tab and switch on Automatic Repository Cleanup.
Specify retention policies:
Keep package versions for a set time frame after the most recent download: The package will not be deleted if it was downloaded at least once in the last specified number of Days.
Keep the specified number of package versions: If the specified number of package versions is exceeded, the oldest package will be deleted. For example, you have 5 package versions from
1.0.1
to1.0.5
and set the number of Versions to 5. Once the1.0.6
version is uploaded, the1.0.1
will be no longer protected by this policy.Keep package versions with at least one download.
Keep the pinned package versions: This policy is not shown on the page but it is always turned on. Learn how to pin a package next in this section.
Click Save.
If you want Packages to perform the cleanup immediately, click Clean up now. Otherwise, Packages will perform the cleanup once a day.
To pin a package (exclude it from auto-deletion)
Choose Pin in the package menu.
Pinned packages are marked with the Pinned tag.