From 8dafc3b65aeb8f50fdfc38fb98d96c3db9e2f607 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Tue, 7 Jan 2020 18:07:34 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- .../img/group_dependency_proxy.png | Bin 40162 -> 219661 bytes doc/user/packages/dependency_proxy/index.md | 4 +-- doc/user/packages/npm_registry/index.md | 28 +++++++++++++++++++-- 3 files changed, 28 insertions(+), 4 deletions(-) (limited to 'doc/user/packages') diff --git a/doc/user/packages/dependency_proxy/img/group_dependency_proxy.png b/doc/user/packages/dependency_proxy/img/group_dependency_proxy.png index 035aff0b6c4..42b412911f0 100644 Binary files a/doc/user/packages/dependency_proxy/img/group_dependency_proxy.png and b/doc/user/packages/dependency_proxy/img/group_dependency_proxy.png differ diff --git a/doc/user/packages/dependency_proxy/index.md b/doc/user/packages/dependency_proxy/index.md index 60f4dbc0abb..05934212a12 100644 --- a/doc/user/packages/dependency_proxy/index.md +++ b/doc/user/packages/dependency_proxy/index.md @@ -12,7 +12,7 @@ receiving a request and returning the upstream image from a registry, acting as a pull-through cache. The dependency proxy is available in the group level. To access it, navigate to -a group's **Overview > Dependency Proxy**. +a group's **Packages > Dependency Proxy**. ![Dependency Proxy group page](img/group_dependency_proxy.png) @@ -33,7 +33,7 @@ The following dependency proxies are supported. With the Docker dependency proxy, you can use GitLab as a source for a Docker image. To get a Docker image into the dependency proxy: -1. Find the proxy URL on your group's page under **Overview > Dependency Proxy**, +1. Find the proxy URL on your group's page under **Packages > Dependency Proxy**, for example `gitlab.com/groupname/dependency_proxy/containers`. 1. Trigger GitLab to pull the Docker image you want (e.g., `alpine:latest` or `linuxserver/nextcloud:latest`) and store it in the proxy storage by using diff --git a/doc/user/packages/npm_registry/index.md b/doc/user/packages/npm_registry/index.md index 7d5db5a60ef..1ac1dcc1897 100644 --- a/doc/user/packages/npm_registry/index.md +++ b/doc/user/packages/npm_registry/index.md @@ -134,8 +134,8 @@ Add a corresponding section to your `.npmrc` file: ```ini @foo:registry=https://gitlab.com/api/v4/packages/npm/ -//gitlab.com/api/v4/packages/npm/:_authToken=${env.CI_JOB_TOKEN} -//gitlab.com/api/v4/projects/{env.CI_PROJECT_ID>/packages/npm/:_authToken=${env.CI_JOB_TOKEN} +//gitlab.com/api/v4/packages/npm/:_authToken=${CI_JOB_TOKEN} +//gitlab.com/api/v4/projects/${CI_PROJECT_ID}/packages/npm/:_authToken=${CI_JOB_TOKEN} ``` ## Uploading packages @@ -242,3 +242,27 @@ Starting from GitLab 12.6, new packages published to the GitLab NPM Registry exp - bundleDependencies - peerDependencies - deprecated + +## NPM distribution tags + +> [Introduced](https://gitlab.com/gitlab-org/gitlab/issues/9425) in GitLab Premium 12.7. + +Dist Tags for newly published packages are supported, and they follow NPM's convention where they are optional, and each tag can only be assigned to 1 package at +You can add [distribution tags](https://docs.npmjs.com/cli/dist-tag) for newly +published packages. They follow NPM's convention where they are optional, and +each tag can only be assigned to one package at a time. The latest tag is added +by default when a package is published without a tag. The same goes to installing +a package without specifying the tag or version. + +Examples of the supported `dist-tag` commands and using tags in general: + +```sh +npm publish @scope/package --tag # Publish new package with new tag +npm dist-tag add @scope/package@version my-tag # Add a tag to an existing package +npm dist-tag ls @scope/package # List all tags under the package +npm dist-tag rm @scope/package@version my-tag # Delete a tag from the package +npm install @scope/package@my-tag # Install a specific tag +``` + +CAUTION: **Warning:** +Due to a bug in NPM 6.9.0, deleting dist tags fails. Make sure your NPM version is greater than 6.9.1. -- cgit v1.2.1