I am new to Ansible and was wondering about the capabilities of Ansible. Can Ansible alone be a complete CI-CD tool?
Scenario that needs to be implemented:
As soon as a developer perform a
git commit, the build should be generated and placed some central server or maybe Amazon S3. This is a
JAR file assuming a Java application. One can then download the build and deploy that build to the testing environment and after deployment invoke the automated test cases. Upon successful implementation of the test cases,one should be able to deploy this build onto the production environment in a rolling fashion. Note that one must not deploy this build every time, but it should be a discretionary power. I.e. even if during a day let us say, 5 builds were created and 3 of them passed the test cases, It should not go and deploy the builds on production. I should decide when to deploy the build, this could be a flag that I set to "Go" and then the deployment to production should take place.
Points that I am apprehensive about Ansible's capability are:
Will ansible be able to detect the
git commitevent. Is there a way my playbook to constantly poll the GIT server on a regular basis to detect any commits?
Is it possible to create Build using just Ansible. (Can I use command module to just execute the build creation process(assuming there is some command to create the build and I was thinking of firing those command using the command module, maybe
Kindly forgive me for my ignorance if there is no such thing. I have never done development and hence am complete beginner.
How can I invoke automated test cases on the testing environment where the build was deployed (I am assuming a successful deploy on the stage environment).
Can I capture the success or failure result? (It maybe be a suite of test cases and won't be an objective o/p as pass or fail.)
Is there a way to achieve the discretion based deployment to production systems using Ansible?
Note that I don't want to use Jenkins or any such tools for creation of builds or deployment to test environments .
This may sound like a beginner question on DevOps, but I just wanted to assess the scope of Ansible as a CI tool. Is Jenkins (or any other variant) inevitable for achieving this? Or can people do away without using Jenkins.
Also if someone can comment on what is the recommended way to achieve this pipeline.