Page History
YAML Schema
| Code Block | ||
|---|---|---|
|
||
resources: - name: |
Tags
name
Analphanumericstring (underscores are permitted) that identifies the resource.
type
Must beImagefor this resource type.
configuration
Specifies all configuration selections for the resource.
Tag |
Description |
Required/Optional | ||||||
|---|---|---|---|---|---|---|---|---|
registry |
The name of aDocker Registry Integration | Required | ||||||
sourceRepository |
The name of the repository in Artifactory to which the images will be published | Required if registry is in JFrog Artifactory | ||||||
region |
An
|
Required if registry is on AWS | ||||||
imageName |
The file path of the Docker image, of the form imageRepo/imageName
|
Required | ||||||
imageTag |
The version tag of the initial version of the Docker image | Required | ||||||
autoPull |
Whentrue, the image is automatically pulled to the machine running the step. Defaults to假。 |
Optional |
Environment Variables
WheneverImageis used in a step, a set of environment variables is automatically made available that you can use in your step.
Environment Variable |
Description |
|---|---|
res_ |
Name of the resource |
res_ |
The name of the repository in Artifactory |
| res_ |
The AWS region identifier |
| res_ |
The file path of the Docker image |
| res_ |
The version tag of the initial version of the Docker image |
| res_ |
Value of the autopull flag |
Examples
The Pipelines DSL for this example is available inthis repositoryin theJFrogGitHub account.
Example 1
| Code Block | ||
|---|---|---|
|
||
resources: - name: Image_1 type: Image configuration: registry: PSSG_DockerRegistry 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 } |
Example 2
| Code Block | ||
|---|---|---|
|
||
resources: - name: Image_2 type: Image configuration: registry: s_artifactory sourceRepository: docker-local imageName: ubuntu imageTag: latest pipelines: - name: pipelines_IMAGE_2 steps: - name: step_IMAGE_2 type: PowerShell configuration: nodePool: win_2019 inputResources: - name: Image_2 execution: onExecute: - write-output "executing step..." |
