Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-20 21:38:24 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-20 21:38:24 +0300
commit983a0bba5d2a042c4a3bbb22432ec192c7501d82 (patch)
treeb153cd387c14ba23bd5a07514c7c01fddf6a78a0 /doc/user/packages
parenta2bddee2cdb38673df0e004d5b32d9f77797de64 (diff)
Add latest changes from gitlab-org/gitlab@12-10-stable-ee
Diffstat (limited to 'doc/user/packages')
-rw-r--r--doc/user/packages/img/group_packages_list_v12_10.pngbin0 -> 41637 bytes
-rw-r--r--doc/user/packages/img/package_activity_v12_10.pngbin0 -> 14515 bytes
-rw-r--r--doc/user/packages/img/package_detail_v12_10.pngbin0 -> 63529 bytes
-rw-r--r--doc/user/packages/img/project_packages_list_v12_10.pngbin0 -> 39163 bytes
-rw-r--r--doc/user/packages/index.md79
-rw-r--r--doc/user/packages/pypi_repository/index.md84
6 files changed, 163 insertions, 0 deletions
diff --git a/doc/user/packages/img/group_packages_list_v12_10.png b/doc/user/packages/img/group_packages_list_v12_10.png
new file mode 100644
index 00000000000..ba9f2892961
--- /dev/null
+++ b/doc/user/packages/img/group_packages_list_v12_10.png
Binary files differ
diff --git a/doc/user/packages/img/package_activity_v12_10.png b/doc/user/packages/img/package_activity_v12_10.png
new file mode 100644
index 00000000000..4fea9a7ca3f
--- /dev/null
+++ b/doc/user/packages/img/package_activity_v12_10.png
Binary files differ
diff --git a/doc/user/packages/img/package_detail_v12_10.png b/doc/user/packages/img/package_detail_v12_10.png
new file mode 100644
index 00000000000..b2cd8e31955
--- /dev/null
+++ b/doc/user/packages/img/package_detail_v12_10.png
Binary files differ
diff --git a/doc/user/packages/img/project_packages_list_v12_10.png b/doc/user/packages/img/project_packages_list_v12_10.png
new file mode 100644
index 00000000000..2dfb92fa796
--- /dev/null
+++ b/doc/user/packages/img/project_packages_list_v12_10.png
Binary files differ
diff --git a/doc/user/packages/index.md b/doc/user/packages/index.md
index 78ddc06173c..8e98dd70346 100644
--- a/doc/user/packages/index.md
+++ b/doc/user/packages/index.md
@@ -14,6 +14,85 @@ The Packages feature allows GitLab to act as a repository for the following:
| [Maven Repository](maven_repository/index.md) **(PREMIUM)** | The GitLab Maven Repository enables every project in GitLab to have its own space to store [Maven](https://maven.apache.org/) packages. | 11.3+ |
| [NPM Registry](npm_registry/index.md) **(PREMIUM)** | The GitLab NPM Registry enables every project in GitLab to have its own space to store [NPM](https://www.npmjs.com/) packages. | 11.7+ |
| [NuGet Repository](nuget_repository/index.md) **(PREMIUM)** | The GitLab NuGet Repository will enable every project in GitLab to have its own space to store [NuGet](https://www.nuget.org/) packages. | 12.8+ |
+| [PyPi Repository](pypi_repository/index.md) **(PREMIUM)** | The GitLab PyPi Repository will enable every project in GitLab to have its own space to store [PyPi](https://pypi.org/) packages. | 12.10+ |
+
+## Enable the Package Registry for your project
+
+If you cannot find the **{package}** **Packages > List** entry under your
+project's sidebar, it is not enabled in your GitLab instance. Ask your
+administrator to enable GitLab Package Registry following the administration
+documentation.
+
+Once enabled for your GitLab instance, to enable Package Registry for your
+project:
+
+1. Go to your project's **Settings > General** page.
+1. Expand the **Visibility, project features, permissions** section and enable the
+**Packages** feature on your project.
+1. Press **Save changes** for the changes to take effect. You should now be able to
+see the **Packages > List** link in the sidebar.
+
+### View Packages for your project
+
+Navigating to your project's **{package}** **Packages > List** will show a list
+of all packages that have been added to your project.
+
+![Project Packages list](img/project_packages_list_v12_10.png)
+
+On this page, you can:
+
+- View all the packages that have been uploaded to the project.
+- Sort the packages list by created date, version or name.
+- Filter the list by package name.
+- Change tabs to display packages of a certain type.
+- Remove a package (if you have suitable [permissions](../permissions.md)).
+- Navigate to specific package detail page.
+
+### View Packages for your group
+
+You can view all packages belonging to a group by navigating to **{package}**
+**Packages > List** from the group sidebar.
+
+![Group Packages list](img/group_packages_list_v12_10.png)
+
+On this page, you can:
+
+- View all the packages that have been uploaded to each of the groups projects.
+- Sort the packages list by created date, version, name or project.
+- Filter the list by package name.
+- Change tabs to display packages of a certain type.
+- Navigate to specific package detail page.
+
+### View additional package information
+
+Additional package information can be viewed by browsing to the package details
+page from the either the project or group list.
+
+![Package detail](img/package_detail_v12_10.png)
+
+On this page you can:
+
+- See the extended package information, including metadata. This is unique to
+each package type and will display different information for different types.
+- View quick installation and registry setup instructions. These are a shortcut
+for users who have already set up the Package Registry and just want quick
+installation instructions.
+- View the package activity, including when and how a package was published.
+- View and download the contents of the package. Outside of installing a
+package via a manager, you can also download the files individually.
+- Delete the package (if you have suitable [permissions](../permissions.md)).
+
+### Build packages via GitLab CI/CD
+
+Some of the supported packages can be built via [GitLab CI/CD](./../../ci/README.md)
+using the `CI_JOB_TOKEN`. If a package is built this way, then extended activity
+information is displayed on the package details page:
+
+![Package CI/CD activity](img/package_activity_v12_10.png)
+
+You can view which pipeline published the package, as well as the commit and
+user who triggered it. To see if a package type supports being built via CI/CD,
+check the specific documentation for your package type.
## Suggested contributions
diff --git a/doc/user/packages/pypi_repository/index.md b/doc/user/packages/pypi_repository/index.md
new file mode 100644
index 00000000000..11d7b828813
--- /dev/null
+++ b/doc/user/packages/pypi_repository/index.md
@@ -0,0 +1,84 @@
+# GitLab PyPi Repository **(PREMIUM)**
+
+> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/208747) in [GitLab Premium](https://about.gitlab.com/pricing/) 12.10.
+
+With the GitLab PyPi Repository, every project can have its own space to store PyPi packages.
+
+The GitLab PyPi Repository works with:
+
+- [pip](https://pypi.org/project/pip/)
+- [twine](https://pypi.org/project/twine/)
+
+## Setting up your development environment
+
+You will need a recent version of [pip](https://pypi.org/project/pip/) and [twine](https://pypi.org/project/twine/).
+
+## Enabling the PyPi Repository
+
+NOTE: **Note:**
+This option is available only if your GitLab administrator has
+[enabled support for the Package Registry](../../../administration/packages/index.md). **(PREMIUM ONLY)**
+
+After the PyPi Repository is enabled, it will be available for all new projects
+by default. To enable it for existing projects, or if you want to disable it:
+
+1. Navigate to your project's **Settings > General > Permissions**.
+1. Find the Packages feature and enable or disable it.
+1. Click on **Save changes** for the changes to take effect.
+
+You should then be able to see the **Packages** section on the left sidebar.
+
+## Adding the GitLab PyPi Repository as a source
+
+You will need the following:
+
+- A personal access token. You can generate a [personal access token](../../../user/profile/personal_access_tokens.md) with the scope set to `api` for repository authentication.
+- A suitable name for your source.
+- Your project ID which can be found on the home page of your project.
+
+Edit your `~/.pypirc` file and add the following:
+
+```ini
+[gitlab]
+repository = https://gitlab.com/api/v4/projects/<project_id>/packages/pypi
+username = __token__
+password = <your personal access token>
+```
+
+## Uploading packages
+
+When uploading packages, note that:
+
+- The maximum allowed size is 50 Megabytes.
+- If you upload the same package with the same version multiple times, each consecutive upload
+ is saved as a separate file. When installing a package, GitLab will serve the most recent file.
+- When uploading packages to GitLab, they will not be displayed in the packages UI of your project
+ immediately. It can take up to 10 minutes to process a package.
+
+### Upload packages with Twine
+
+This section assumes that your project is properly built and you already [created a PyPi package with setuptools](https://packaging.python.org/tutorials/packaging-projects/).
+Upload your package using the following command:
+
+```shell
+python -m twine upload --repository <source_name> dist/<package_file>
+```
+
+Where:
+
+- `<package_file>` is your package filename, ending in `.tar.gz` or `.whl`.
+- `<source_name>` is the [source name used during setup](#adding-the-gitlab-pypi-repository-as-a-source).
+
+## Install packages
+
+Install the latest version of a package using the following command:
+
+```shell
+pip install --index-url https://__token__:<personal_access_token>@gitlab.com/api/v4/projects/<project_id>/packages/pypi/simple --no-deps <package_name>
+```
+
+Where:
+
+- `<package_name>` is the package name.
+- `<personal_access_token>` is your personal access token.
+- `<project_id>` is your project id number.