Using Jenkins – Build Enviroment

I have a Jenkins server that is responsible for building and deploying all of my microservices. However, each of these microservices needs a different version of a library for build and deployment. What is the best approach to separate this kind of build environment within Jenkins? Is it to use slaves? Is there a solution that involves Docker?

  • How to cache node_modules on Docker build?
  • Azure App Service + Docker Autodeploy?
  • GitLab CI: How to pull specific docker container for deployment
  • Self hosted Drone CI doesn't synchronize my commits with Github
  • Continuous integration from a git lab repository to an amazon server
  • NPM install always fails to fetch NPM registry in Docker container at random times
  • Docker can't connect containers
  • Beanstalk app CPU spikes
  • How to find docker.socket file after change of docker root folder ?
  • Undefined http response from requests between containers with docker compose
  • installing cPickle with python 3.5
  • Docker service registering into Consul but health check is failing
  • 2 Solutions collect form web for “Using Jenkins – Build Enviroment”

    Not sure the libraries are python, ruby or others. Use python as sample.

    Build seperate requirements.txt for each applications, in requirements.txt, you can define the version for each library or packages.


    In Jenkins, install plugin named shiningpanda, define the job in virtualenv builder with its own build environment.

    pip install -r requirements.txt
    # run your application here. 

    You should be fine to find similar plugin for your applications, if they are ruby, java, or others.

    each microservice should be its own build job. Jenkins keeps the workspace of each job separate, so they shouldn’t overwrite each other. ideally, each microservice is in its own source code repository or subfolder. in Jenkins’ job definition, you can point to each specific microservice repo. HTH.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.