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>2021-04-10 00:09:22 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-04-10 00:09:22 +0300
commit017841e3c03105efd0b94e730652c5774f2c136f (patch)
treeb2931e81db33138d3c32e058879a78635c0e2614 /doc/user/packages
parentb19efd72743e22fd3b340b3c2906ba113e1390de (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/user/packages')
-rw-r--r--doc/user/packages/composer_repository/index.md7
-rw-r--r--doc/user/packages/index.md2
-rw-r--r--doc/user/packages/maven_repository/index.md8
-rw-r--r--doc/user/packages/npm_registry/index.md17
-rw-r--r--doc/user/packages/nuget_repository/index.md10
-rw-r--r--doc/user/packages/pypi_repository/index.md7
-rw-r--r--doc/user/packages/rubygems_registry/index.md137
7 files changed, 186 insertions, 2 deletions
diff --git a/doc/user/packages/composer_repository/index.md b/doc/user/packages/composer_repository/index.md
index 6a976fca382..bc1e59e4ac2 100644
--- a/doc/user/packages/composer_repository/index.md
+++ b/doc/user/packages/composer_repository/index.md
@@ -295,3 +295,10 @@ Never commit the `auth.json` file to your repository. To install packages from a
consider using the [`composer config`](https://getcomposer.org/doc/articles/handling-private-packages.md#satis) tool with your personal access token
stored in a [GitLab CI/CD variable](../../../ci/variables/README.md) or in
[HashiCorp Vault](../../../ci/secrets/index.md).
+
+## Supported CLI commands
+
+The GitLab Composer repository supports the following Composer CLI commands:
+
+- `composer install`: Install Composer dependencies.
+- `composer update`: Install the latest version of Composer dependencies.
diff --git a/doc/user/packages/index.md b/doc/user/packages/index.md
index b35015d0b67..591bdca9353 100644
--- a/doc/user/packages/index.md
+++ b/doc/user/packages/index.md
@@ -24,6 +24,7 @@ The Package Registry supports the following formats:
<tr><td><a href="https://docs.gitlab.com/ee/user/packages/nuget_repository/index.html">NuGet</a></td><td>12.8+</td></tr>
<tr><td><a href="https://docs.gitlab.com/ee/user/packages/pypi_repository/index.html">PyPI</a></td><td>12.10+</td></tr>
<tr><td><a href="https://docs.gitlab.com/ee/user/packages/generic_packages/index.html">Generic packages</a></td><td>13.5+</td></tr>
+<tr><td><a href="https://docs.gitlab.com/ee/user/packages/rubygems_registry/index.html">RubyGems</a></td><td>13.10+</td></tr>
</table>
</div>
</div>
@@ -49,7 +50,6 @@ guides you through the process.
| P2 | [#36895](https://gitlab.com/gitlab-org/gitlab/-/issues/36895) |
| Puppet | [#36897](https://gitlab.com/gitlab-org/gitlab/-/issues/36897) |
| RPM | [#5932](https://gitlab.com/gitlab-org/gitlab/-/issues/5932) |
-| RubyGems | [#803](https://gitlab.com/gitlab-org/gitlab/-/issues/803) |
| SBT | [#36898](https://gitlab.com/gitlab-org/gitlab/-/issues/36898) |
| Terraform | [Draft: Merge Request](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/18834) |
| Vagrant | [#36899](https://gitlab.com/gitlab-org/gitlab/-/issues/36899) |
diff --git a/doc/user/packages/maven_repository/index.md b/doc/user/packages/maven_repository/index.md
index 7104f4a02ed..d4dc9f0ae78 100644
--- a/doc/user/packages/maven_repository/index.md
+++ b/doc/user/packages/maven_repository/index.md
@@ -871,3 +871,11 @@ package:
- 'mvn help:system'
- 'mvn package'
```
+
+## Supported CLI commands
+
+The GitLab Maven repository supports the following Maven CLI commands:
+
+- `mvn deploy`: Publish your package to the Package Registry.
+- `mvn install`: Install packages specified in your Maven project.
+- `mvn dependency:get`: Install a specific package.
diff --git a/doc/user/packages/npm_registry/index.md b/doc/user/packages/npm_registry/index.md
index a997f2fbb08..b6312002184 100644
--- a/doc/user/packages/npm_registry/index.md
+++ b/doc/user/packages/npm_registry/index.md
@@ -515,4 +515,19 @@ This is usually a permissions issue with either:
- The remote bucket if [object storage](../../../administration/packages/#using-object-storage)
is used.
-In the latter case, ensure the bucket exists and the GitLab has write access to it.
+In the latter case, ensure the bucket exists and GitLab has write access to it.
+
+## Supported CLI commands
+
+The GitLab npm repository supports the following commands for the npm CLI (`npm`) and yarn CLI
+(`yarn`):
+
+- `npm install`: Install npm packages.
+- `npm publish`: Publish an npm package to the registry.
+- `npm dist-tag add`: Add a dist-tag to an npm package.
+- `npm dist-tag ls`: List dist-tags for a package.
+- `npm dist-tag rm`: Delete a dist-tag.
+- `npm ci`: Install npm packages directly from your `package-lock.json` file.
+- `npm view`: Show package metadata.
+- `yarn add`: Install an npm package.
+- `yarn update`: Update your dependencies.
diff --git a/doc/user/packages/nuget_repository/index.md b/doc/user/packages/nuget_repository/index.md
index 128b1daf9cb..7e59b19076a 100644
--- a/doc/user/packages/nuget_repository/index.md
+++ b/doc/user/packages/nuget_repository/index.md
@@ -393,3 +393,13 @@ dotnet add package <package_id> \
- `<package_id>` is the package ID.
- `<package_version>` is the package version. Optional.
+
+## Supported CLI commands
+
+The GitLab NuGet repository supports the following commands for the NuGet CLI (`nuget`) and the .NET
+CLI (`dotnet`):
+
+- `nuget push`: Upload a package to the registry.
+- `dotnet nuget push`: Upload a package to the registry.
+- `nuget install`: Install a package from the registry.
+- `dotnet add`: Install a package from the registry.
diff --git a/doc/user/packages/pypi_repository/index.md b/doc/user/packages/pypi_repository/index.md
index a08b7b65145..17b51e313fa 100644
--- a/doc/user/packages/pypi_repository/index.md
+++ b/doc/user/packages/pypi_repository/index.md
@@ -359,3 +359,10 @@ characters are removed.
A `pip install` request for `my.package` looks for packages that match any of
the three characters, such as `my-package`, `my_package`, and `my....package`.
+
+## Supported CLI commands
+
+The GitLab PyPI repository supports the following CLI commands:
+
+- `twine upload`: Upload a package to the registry.
+- `pip install`: Install a PyPI package from the registry.
diff --git a/doc/user/packages/rubygems_registry/index.md b/doc/user/packages/rubygems_registry/index.md
new file mode 100644
index 00000000000..2a94d2a3ccf
--- /dev/null
+++ b/doc/user/packages/rubygems_registry/index.md
@@ -0,0 +1,137 @@
+---
+stage: Package
+group: Package
+info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
+---
+
+# Ruby gems in the Package Registry
+
+> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/803) in [GitLab Free](https://about.gitlab.com/pricing/) 13.10.
+
+WARNING:
+The Ruby gems registry for GitLab is under development and isn't ready for production use due to
+limited functionality.
+
+You can publish Ruby gems in your project's Package Registry, then install the packages when you
+need to use them as a dependency. Although you can push gems to the registry, you cannot install
+them from the registry. However, you can download `gem` files directly from the Package Registry's
+UI, or by using the [API](../../../api/packages/rubygems.md#download-a-gem-file).
+
+For documentation of the specific API endpoints that the Ruby gems and Bundler package manager
+clients use, see the [Ruby gems API documentation](../../../api/packages/rubygems.md).
+
+## Enable the Ruby gems registry
+
+The Ruby gems registry for GitLab is behind a feature flag that is disabled by default. GitLab
+administrators with access to the GitLab Rails console can enable this registry for your instance.
+
+To enable it:
+
+```ruby
+Feature.enable(:rubygem_packages)
+```
+
+To disable it:
+
+```ruby
+Feature.disable(:rubygem_packages)
+```
+
+To enable or disable it for specific projects:
+
+```ruby
+Feature.enable(:rubygem_packages, Project.find(1))
+Feature.disable(:rubygem_packages, Project.find(2))
+```
+
+## Create a Ruby Gem
+
+If you need help creating a Ruby gem, see the [RubyGems documentation](https://guides.rubygems.org/make-your-own-gem/).
+
+## Authenticate to the Package Registry
+
+Before you can push to the Package Registry, you must authenticate.
+
+To do this, you can use:
+
+- A [personal access token](../../../user/profile/personal_access_tokens.md)
+ with the scope set to `api`.
+- A [deploy token](../../project/deploy_tokens/index.md) with the scope set to
+ `read_package_registry`, `write_package_registry`, or both.
+- A [CI job token](#authenticate-with-a-ci-job-token).
+
+### Authenticate with a personal access token or deploy token
+
+To authenticate with a personal access token, create or edit the `~/.gem/credentials` file and add:
+
+```ini
+---
+https://gitlab.example.com/api/v4/projects/<project_id>/packages/rubygems: '<your token>'
+```
+
+- `<your token>` must be the token value of either your personal access token or deploy token.
+- Your project ID is on your project's home page.
+
+### Authenticate with a CI job token
+
+To work with RubyGems commands within [GitLab CI/CD](../../../ci/README.md),
+you can use `CI_JOB_TOKEN` instead of a personal access token or deploy token.
+
+For example:
+
+```yaml
+image: ruby:latest
+
+run:
+ script:
+```
+
+You can also use `CI_JOB_TOKEN` in a `~/.gem/credentials` file that you check in to
+GitLab:
+
+```ini
+---
+https://gitlab.example.com/api/v4/projects/${env.CI_PROJECT_ID}/packages/rubygems: '${env.CI_JOB_TOKEN}'
+```
+
+## Push a Ruby gem
+
+Prerequisites:
+
+- You must [authenticate to the Package Registry](#authenticate-to-the-package-registry).
+- The maximum allowed gem size is 3 GB.
+
+To push your gem, run a command like this one:
+
+```shell
+gem push my_gem-0.0.1.gem --host <host>
+```
+
+Note that `<host>` is the URL you used when setting up authentication. For example:
+
+```shell
+gem push my_gem-0.0.1.gem --host https://gitlab.example.com/api/v4/projects/1/packages/rubygems
+```
+
+This message indicates that the gem uploaded successfully:
+
+```plaintext
+Pushing gem to https://gitlab.example.com/api/v4/projects/1/packages/rubygems...
+{"message":"201 Created"}
+```
+
+To view the published gem, go to your project's **Packages & Registries** page. Gems pushed to
+GitLab aren't displayed in your project's Packages UI immediately. It can take up to 10 minutes to
+process a gem.
+
+### Pushing gems with the same name or version
+
+You can push a gem if a package of the same name and version already exists.
+Both are visible and accessible in the UI. However, only the most recently
+pushed gem is used for installs.
+
+## Install a Ruby gem
+
+The Ruby gems registry for GitLab is under development, and isn't ready for production use. You
+cannot install Gems from the registry. However, you can download `.gem` files directly from the UI
+or by using the [API](../../../api/packages/rubygems.md#download-a-gem-file).