首页 > 解决方案 > PodTemplate 如何从私有仓库拉取镜像

问题描述

我没有使用 podTemplate Jenkins 管道从公共存储库中提取 nodejs 版本的代码。

def label = "worker-2${UUID.randomUUID().toString()}"

podTemplate(label: label, containers: [
        containerTemplate(name: 'nodejs', image: 'node:13.3.0', ttyEnabled: true, command: 'cat'),
        containerTemplate(name: 'docker', image: 'docker:1.12.6', command: 'cat', ttyEnabled: true),
    containerTemplate(name: 'kubectl', image: 'lachlanevenson/k8s-kubectl:latest', command: 'cat', ttyEnabled: true)
],

现在的问题是,如果我在私有存储库中有 Nodejs 版本,如何在构建过程中使用上述 pod 模板获取它。

谢谢,帕拉尼

标签: jenkins

解决方案


推荐阅读