Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-51353

In declarative pipeline, volumes and imagepullsecrets needed

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Not A Defect
    • Icon: Major Major
    • kubernetes-plugin
    • None

      Hello.

       

      I can use scripted pipeline with imagepullsecrets and volumes like below,

      but in declaritive pipeline, I can't use it.

       

      podTemplate(
        label: 'mypod',
        imagePullSecrets: [ 'regcred' ],
        containers: [
          containerTemplate(name: 'test', image: '1.2.3.4/ubuntu_14.04_w_c', ttyEnabled: true, command: 'cat')
        ],
        volumes: [
        hostPathVolume(mountPath: '/var/run/docker.sock', hostPath: '/var/run/docker.sock')
        ]
      ) {
      }

            csanchez Carlos Sanchez
            horangs Hokwang Lee
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: