0

I have to setup CI/CD for my organisation.

My requirement is that ci-sever (whether hosted or on-premise ) should mimic the prod environment like operating system , /var/log directories , nginx , php-fpm configuration so on. It gives us more confidence when running integration test cases.

As we setup jenkins on-premise server so we can easily replicate the prod environment on jenkinsserver.

How can I do that with any ci hosting service like travis-ci , 'codeship' , 'circle-ci' etc ??

voila
  • 1,594
  • 2
  • 19
  • 38

1 Answers1

0
  1. Operating system If you use ubuntu 12.04/14.04 then most commercial offering (travis, cicrcle ci, I think codeship also) are already using it so you're ok there. If not then I believe you'll need to use docker to setup a container with the expected operating system

2.software packages and other configuration

All commercial offering support specifying the system packages you need and installing on build (Usually with cached, so quicker then usual install). Of course if you are using a docker container you can pre bake it with all the packages you need.

Same go for /var/log just run a script in "pre" step of the build and setup whatever you need and expect

  1. Bonus points The best way to handle production infrastructure is automation so if you automate your infrastructure setup with configuration management tool (ansible is my favorite, other popular options are salt, chef, puppet, engineCf) and then use the same script to prepare the environment in your build jobs..
alonisser
  • 11,542
  • 21
  • 85
  • 139