CI and CD implementation issues

I am looking for implementation of CI/CD in to my current project here is what i think will work.

Environment consists of
– Jenkins
– git
– gradle
– Linux servers
– Sonar
– Ansible.

  • Will Containerization (Docker) replace Continuous Integration?
  • docker swarm 1.12 auto stop service
  • Docker compose in production?
  • Ansible cannot import docker-py even though it is installed (Ansible
  • Deploying with Docker into production: Zero downtime
  • How to push docker images through reverse proxy to artifactory
  • Each tool will be used as following.

    • Git:- Developers will push there code to this CVS.
    • Jenkins:- On detecting Check-in Jenkins will trigger a build and will deploy to one of the server.
    • Sonar:- will be used for code coverage and will check the code before building the same through Jenkins.
    • ansible:- ansible will be used to quickly prepare added nodes so that code can be deployed to them.
    • Docker in case if we need fresh test environments every time we can use docker+ ansible combo for doing the things.

      Flow of work will be

    • User run unit test cases on his machine and commits the code to the server.

    • Jenkins will pull the code from git and will run sonar on the same and will generate reports.
    • jenkins will create build and will deploy the same on dev server.
    • A jenkins job will run and will perform the integration testing on the dev server
    • Any other automated tests can be run.
    • Finally builds pushed to next server using Jenkins.
    • I will use shell commands inside Jenkins to push compiled code from one server to another.

      In my this scenario can some one answer me following.

    • Where will sonar get fit and how to use the same?

    • I see there are CD tools, cant i push compiled code to the servers using shell scripts written inside the Jenkins jobs to automatically deploy the things? What extra benefits a CD tool provides
    • Is is wise to create fresh test environment or we can keep using the old one again and again?
    • Will this complete CI/CD?

      can someone share there implementation

  • Magento2 Docker Devbox Exception
  • Query port number used by process in a docker container
  • Deploy Spring Cloud App into docker cluster using swarm
  • Choosing docker project structure
  • How to use docker inside docker container in a save way
  • Including node_modules in a nodejs Docker image, faster builds
  • One Solution collect form web for “CI and CD implementation issues”

    You say you plan to use Git. I’ll outline a scenario using Git on GitHub

    1. Developers push code changes here as pull requests
    2. The SonarQube GitHub Plugin kicks off an initial analysis of only the code changed in the PR looking for the introduction of new issues (note that coverage and duplications are not included in this check)
    3. Once the PR is merged, Jenkins (in one job or several, depending on your needs)
      • builds
      • fires integration tests & any other automated tests
      • runs SonarQube Scan. Note that this comes last to include integration test results.
      • pushes build to next server

    Note that the ability to break the build when the project doesn’t pass the SonarQube Quality Gate you’ve set up may be desirable in your situation. Unfortunately, it’s not available in the current server version: 5.2. It is available in 5.1, and is should return soon.

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