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

withDockerContainer build failure while there is no error

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Major Major
    • docker
    • None

      Hi, 

      I want to use a Docker image to build a sbt project. However, while the build is successful, the job is marked as failure while there is no error/warning at all in the build log.

       

      Here the Dockerfile of the image I used:

       

      FROM debian:stable
      
      RUN http_proxy="http://10.240.1.254:3128" apt-key adv --keyserver keyserver.ubuntu.com --recv xxx && \
      http_proxy="http://10.240.1.254:3128" apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2EE0EA64E40A89B84B2DF73499E82A75642AC823 && \
      (echo "deb http://dl.bintray.com/sbt/debian /" > /etc/apt/sources.list.d/sbt.list) && \
      (echo 'Acquire::http::Proxy "http://10.240.1.254:3128";' > /etc/apt/apt.conf.d/00proxy) && \
      (echo 'deb http://dl.xxxx.com/deb stable main' > /etc/apt/sources.list.d/xxx.list) && \
      apt-get update && \
      apt-get install -y dpkg-dev oracle-java8-jdk sbt strace
      

      And the part of jenkinsfile:

      withDockerContainer(args: '-v /srv/jenkins/.sbt:/.sbt:ro', image:'debian-build:latest') {
      stage('Build and archive') {
      sh 'sbt debian:packageBin'
      sh 'find . -name "*.deb"'
      }
      }
      

       
      And the end of the build.log:

      [success] Total time: 280 s, completed Mar 31, 2017 12:27:58 PM
      [Pipeline] sh
      [xxx-Y74YIJG7OYWEKYECCRG46FA56CWRJCSNEAMOH3QHT6HOA2R2VQKQ] Running shell script
      + find . -name *.deb
      ./target/mypackage_1.0.2_all.deb
      [Pipeline] }
      [Pipeline] // stage
      [Pipeline] }
      $ docker stop --time=1 3908d2f7707135436ec802cafcc8eb0c920ea8eecaeeef65110c0fdc1e022b48
      $ docker rm -f 3908d2f7707135436ec802cafcc8eb0c920ea8eecaeeef65110c0fdc1e022b48
      [Pipeline] // withDockerContainer
      [Pipeline] }
      [Pipeline] // wrap
      [Pipeline] }
      [Pipeline] // node
      [Pipeline] End of Pipeline
      
      GitHub has been notified of this commit's build result
      
      Finished: FAILURE
      

       

            ndeloof Nicolas De Loof
            asyd asyd
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: