The Docker Registry Integration is used to connect the JFrog Pipelines platform to Docker Hub, Docker Trusted Registry, or a Docker registry in Artifactory so that you can pull and push Docker images.
Creating a Docker Registry Integration
You can add this integration by following steps on the Managing Pipelines Integrations page.
Here is the information you need to create this integration:
Name -- choose a friendly name for the integration
url -- an optional field that defaults to Docker Hub if left empty. To use with Docker Trusted Registry or Docker Private Registry, enter the location of your private registry. Format
https://foo.com
User Name -- username of your Docker Registry Account
Password -- password of your Docker Registry Account
Usage
The Docker Registry integration can be used in the Image resource.
The Docker Registry integration can also be added directly to a step in the integrations
section. This automatically configures the Docker CLI with access to the registry.
Default Environment Variables
When you create a resource with this integration, and create a step that uses it, a set of environment variables is automatically made available.
Environment variable | Description |
---|---|
| URL supplied in the integration |
| Username supplied in the integration |
| Password supplied in the integration |
When you add this integration directly to a step, a set of environment variables is automatically made available.
Environment variable | Description |
---|---|
| URL supplied in the integration |
| Username supplied in the integration |
| Password supplied in the integration |
Example
This example uses a Docker Registry integration named
myDocker
, which is used in theImage_1
resource.The Pipelines DSL for this example is available in this repository in the JFrog GitHub account.
resources: - name: Image_1 type: Image configuration: registry: myDocker imageName: docker/jfreq_win imageTag: latest autoPull: true pipelines: - name: pipelines_Image_1 steps: - name: step_Image_1 type: PowerShell configuration: nodePool: win_2019 inputResources: - name: Image_1 execution: onExecute: - write_output "executing step..." - if($Image_1_isTrigger -ne "true"){ Write-Error "Stop" -ErrorAction Stop }