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
docker
– gradle
– Linux servers
– Sonar
– Ansible.

  • How to run .Net project as part of jenkins job in Docker
  • How to use Docker link in Ansible when link var defined
  • Install Gitlab with disabled sign up
  • Why do node_modules keep disappearing from docker after build?
  • Docker Continuous Integration with AWS
  • OpenShift Cloud Computing: Advanced installation
  • 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

  • How to do --rm and --restart in dockerfile?
  • pip install doesn't work correctly in docker
  • Dockerfile with entrypoint for executing bash script
  • Docker MGT Development Environment and Mailbag
  • can a dockerised app execute script on the host?
  • How copy files from current docker container to another container
  • 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.