Skip to content
Snippets Groups Projects

Edit deploy token tasks to adhere to CTRT convention

Merged Russell Dickenson requested to merge russell/ctrt-deploy-tokens-part2 into master
All threads resolved!
@@ -55,6 +55,10 @@ Deploy tokens expire at midnight UTC on the date you define.
@@ -55,6 +55,10 @@ Deploy tokens expire at midnight UTC on the date you define.
Revoke a token when it's no longer required.
Revoke a token when it's no longer required.
 
Prerequisites:
 
 
- You must have at least the Maintainer role for the project or group.
 
To revoke a deploy token:
To revoke a deploy token:
1. On the top bar, select **Main menu**, and:
1. On the top bar, select **Main menu**, and:
@@ -113,6 +117,7 @@ To pull an image from your container registry:
@@ -113,6 +117,7 @@ To pull an image from your container registry:
```shell
```shell
docker login -u <username> -p <deploy_token> registry.example.com
docker login -u <username> -p <deploy_token> registry.example.com
 
docker pull $CONTAINER_TEST_IMAGE
```
```
## Push images to container registry
## Push images to container registry
@@ -128,13 +133,14 @@ To push an image to your container registry:
@@ -128,13 +133,14 @@ To push an image to your container registry:
```shell
```shell
docker login -u <username> -p <deploy_token> registry.example.com
docker login -u <username> -p <deploy_token> registry.example.com
 
docker push $CONTAINER_TEST_IMAGE
```
```
## Pull packages
## Pull packages
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/213566) in GitLab 13.0.
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/213566) in GitLab 13.0.
You can use a deploy token to pull packages from your GitLab package registry; for example, as part
You can use a deploy token to pull packages from your GitLab package registry. For example, as part
of a CI/CD pipeline.
of a CI/CD pipeline.
Prerequisites:
Prerequisites:
@@ -148,7 +154,7 @@ instructions for deploy tokens.
@@ -148,7 +154,7 @@ instructions for deploy tokens.
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/213566) in GitLab 13.0.
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/213566) in GitLab 13.0.
You can use a deploy token to push packages to your GitLab package registry; for example, as part of
You can use a deploy token to push packages to your GitLab package registry. For example, as part of
a CI/CD pipeline.
a CI/CD pipeline.
Prerequisites:
Prerequisites:
@@ -161,7 +167,7 @@ instructions for deploy tokens.
@@ -161,7 +167,7 @@ instructions for deploy tokens.
Example request publishing a NuGet package using a deploy token:
Example request publishing a NuGet package using a deploy token:
```shell
```shell
nuget source Add -Name GitLab -Source "https://gitlab.example.com/api/v4/projects/10/packages/nuget/index.json" -UserName deploy-token-username -Password 12345678asdf
nuget source Add -Name GitLab -Source "https://gitlab.example.com/api/v4/projects/10/packages/nuget/index.json" -UserName <username> -Password <deploy_token>
nuget push mypkg.nupkg -Source GitLab
nuget push mypkg.nupkg -Source GitLab
```
```
@@ -191,8 +197,8 @@ apply consistently when cloning the repository of related projects.
@@ -191,8 +197,8 @@ apply consistently when cloning the repository of related projects.
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/280586) in GitLab 14.2.
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/280586) in GitLab 14.2.
You can use a deploy token to pull images from the dependency proxy. For example, as part of a CI/CD pipeline.
You can use a deploy token to pull images from the dependency proxy. For example, as part of a CI/CD
CI/CD pipeline.
pipeline.
Prerequisites:
Prerequisites:
Loading