到目前为止你所做的看起来是正确的,所以我们需要调试它失败的原因。
您必须查看失败的执行源(按“源”链接)。这个 json 结构是执行上下文(你可能想在浏览器中安装一个 json 格式化插件或其他东西来阅读它)。导航到trigger.artifacts 并在那里寻找工件。如果你找到它,请在此处发布结果。
我认为问题可能出在 deb 文件的名称上。它应该被命名为simplenodeappinstaller_1.0-0_amd64.deb。一个简单的解决方案是添加 jenkins 内部版本号或时间戳作为版本号。
您还可以尝试激活工件装饰器(在 igor-local.yml 中设置 artifact.decorator.enabled: true。这将导致 Igor 以更合理的方式解析 deb 和 rpm 文件,恕我直言。有关更多信息,请参见下文。
另一件事是 Jenkins 有时会将所有测试结果和其他内容放入工件列表中,我认为默认返回的最大工件数是 20。但是这可以在键 BuildArtifactFilter.maxArtifacts 下进行配置(请参阅 https://github.com/spinnaker/igor/blob/master/igor-web/src/main/java/com/netflix/spinnaker/igor/build/BuildArtifactFilter.java) .阅读代码,似乎 deb 文件应该已经优先于其他类型的工件,所以我认为这不是问题。
装饰底漆
启用工件装饰器将转换此工件:
fileName: "openmotif22-libs-2.2.4-192.1.3.x86_64.rpm"
displayPath: "openmotif22-libs-2.2.4-192.1.3.x86_64.rpm"
relativePath: "openmotif22-libs-2.2.4-192.1.3.x86_64.rpm"
进入
fileName: "openmotif22-libs-2.2.4-192.1.3.x86_64.rpm"
displayPath: "openmotif22-libs-2.2.4-192.1.3.x86_64.rpm"
relativePath: "openmotif22-libs-2.2.4-192.1.3.x86_64.rpm"
reference: "openmotif22-libs-2.2.4-192.1.3.x86_64.rpm"
name: "openmotif22-libs"
type: "rpm"
version: "2.2.4-192.1.3.x86_64"
decorated: "true"
内置装饰器支持deb和rpm,但可以使用如下配置进行扩展:
artifact:
# This is a feature toggle for decoration of artifacts.
decorator:
enabled: true
fileDecorators:
- type: docker/image
decoratorRegex: '(.+):(.+)'
identifierRegex: '(.+\/.+:.+)'