Code Monkey home page Code Monkey logo

Comments (1)

schnatterer avatar schnatterer commented on August 28, 2024 1

The problem was related to this mount triggered by MavenInDocker (realized by Docker.Image.mountJenkinsUser):

 -v /var/jenkins_home/workspace/ature_3_continuous_delivery-6HRXLXYING3RPQ2T3ATY6DOVMNEXY7ZFTGPCHQBMB7KHPI2V5JBQ/.jenkins/etc/passwd:/etc/passwd:ro

The problem on this specific Jenkins instance was, that the build executor of the Jenkins instance was a docker container that mounted the docker socket so Jenkins Pipelines can start Docker containers on the same docker host as the build executor (i.e. sibling containers).

However, the path /var/lib/jenkins_home on the host was mounted into /var/jenkins_home on the build executor (see jenkinsci/docker/Dockerfile).

So, when the Pipeline (on the build executor) mounted files from the workspace to its sibling container, the docker host could not mount /var/jenkins_home because it did not exist on the host (as the files were positioned under /var/lib/jenkins_home there).

So we learned:
When build executors are Docker containers that allow pipelines to access their docker host,
the JENKINS_HOME in the build executor's container should have the same absolute path as the JENKINS_HOME on the docker host.

Otherwise in Pipelines mounting files from the workspace into docker containers created within the Pipeline will fail.

There are two solutions:

  • Change the JENKINS_HOME on the docker host
  • Change the JENKINS_HOME in the build executor container.

from ces-build-lib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.