浏览历史
YAML模式
| 代码块 | ||
|---|---|---|
|
||
2022世界杯阿根廷预选赛赛程resources:—name: |
标签
的名字
一个字母数字标识资源的字符串(允许使用下划线)。
类型
必须图像对于此资源类型。
配置
指定资源的所有配置选择。
标签 |
描述 |
必需的/可选 | ||||||
|---|---|---|---|---|---|---|---|---|
注册表 |
的名称Docker注册表集成 | 要求 | ||||||
sourceRepository |
Artifactory中图像将发布到的存储库的名称 | 如果注册表在JFrog Artifactory,则需要 | ||||||
地区 |
一个
|
如果注册表在AWS上,则必须 | ||||||
imageName |
Docker映像的文件路径,格式为imageRepo/imageName
|
要求 | ||||||
imageTag |
Docker映像的初始版本的版本标记 | 要求 | ||||||
autoPull |
当真正的,默认为真正的.的图像是自动拉到机器运行的步骤.Defaults来假. |
可选 |
环境变量
每当图像在步骤中使用时,将自动提供一组可在步骤中使用的环境变量。
环境变量 |
描述 |
|---|---|
res_ < resource_name > _name |
资源名称 |
res_ < resource_name > _sourceRepository |
Artifactory中存储库的名称 |
| res_ < resource_name > _region | AWS区域标识符 |
| res_ < resource_name > _imageName | Docker映像的文件路径 |
| res_ < resource_name > _imageTag | Docker映像的初始版本的版本标记 |
| res_ < resource_name > _autoPull | autopull标志的值 |
例子
本例的管线DSL可在t他的仓库在JFrogGitHub帐户。
示例1
| 代码块 | ||
|---|---|---|
|
||
2022世界杯阿根廷预选赛赛程资源:—name: Image_1 type:镜像配置:registry: PSSG_DockerRegistry imageName: docker/jfreq_win imageTag: latestautoPull:真管线:—name: pipelines_Image_1 steps:—name: step_Image_1 type: PowerShell configuration: nodePool: win_2019 inputResources:—2022世界杯阿根廷预选赛赛程name: Image_1 execution: onExecute:—write-output " execution step…"- if($Image_1_isTrigger -ne "true"){写错误"Stop" - erroraction Stop} |
示例2
| 代码块 | ||
|---|---|---|
|
||
2022世界杯阿根廷预选赛赛程resources:—name: Image_2 type:镜像配置:registry: s_artifactory sourceRepository: docker-local imageName: ubuntu imageTag:最新管线:—name: pipelines_IMAGE_2 steps:—name: step_IMAGE_2 type: PowerShell配置:nodePool: win_2019 inputResources:—name: Image_2 execution: onExecute: - write-output " execution step…" |
