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

DockerBuilderPublisher build arguments

XMLWordPrintable

      Allow to build pass build arguments to DockerBuilderPublisher from pipeline like you will normally do this with: --build-arg 

      Use case:

      Pipeline:

      steps {
          step([$class                     : 'DockerBuilderPublisher',
                cleanImages                : true,
                cleanupWithJenkinsJobDelete: true,
                cloud                      : 'docker-cloud',
                dockerFileDirectory        : 'Dockerfile',
                pushOnSuccess              : true,
                tagsString                 : jenkins-slave:14:04])
            }
      

      Dockerfile:

      ARG VER=latest
      
      FROM ubuntu:${VER}
      
      ARG DEBIAN_FRONTEND=noninteractive
      
      RUN apt-get update && \
          apt-get -y install sudo ssh openjdk-8-jre && \
          apt-get clean

            csanchez Carlos Sanchez
            grzzie Grzegorz Zieba
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: