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?

  • Concourse CI Pipeline giving error :- Get https://registry-1.docker.io/v2: net/http: request canceled while waiting for connection
  • How to run .Net project as part of jenkins job in Docker
  • Docker continuous deployment workflow
  • deploy docker to heroku without using heroku docker plugin
  • How to avoid redundancy and time loss when re-building images during development?
  • Is there a way to use Windows with GUI capability on Dockers
  • Docker container for SQL Server Linux keeps exiting
  • GitLab CE Docker SMTP
  • Docker API start container returns 404
  • Using Consul, how can I assign domain names to containers?
  • How to configure docker and postgres to use pact broker
  • Configuring Django with Nginx, uWSGI and Postgres on Docker
  • 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.

    https://pip.readthedocs.io/en/1.1/requirements.html

    MyApp
    Framework==0.9.4
    Library>=0.2
    

    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.