/test-ops

Test for operations

Primary LanguageRuby

Gorgeous Code Assessment Test Operations

This repo is ment to be as permanent work in progress. The code in this repo should be dockerizable and been run on top of kubernetes.

**What we use for operations development: **

Minikube to represent the kubernetes we use

Helm Package Manager to package the kubernetes manifests

Charts for public available components someone may need in addition on kubernetes.

What to achieve with this repo is to replace at least this readme in a pr with your thoughts how to handle the deployment of the app in this repo. In addition a Dockerfile and a helm chart for basic usage are fine too. Please do not invest much time in a perfect solution. Unless you like it as a good practice. The result is very useful too, even it is only short brainstorming of the thoughts.

Regarding this code....

Most relevant entities overview:

Models

  • Project: has the git information about each project
  • Report: represents a full report with RBP analysis and Model Diagram analysis. Stores the commit hash, branch and the gc_config for each report.
  • Rails BestPractices Analysis: belongs to one report and has the score and nbp_report for the analysis.
  • Model Diagram Analysis: has the json_data attribute for the analysed project, representing the model diagram.

Services

  • Create Project: Creates new project and deals with github hooks.
  • Start Report: Creates new report and associated ModelDiagram and RBP analyses.

Jobs

  • Create Report Job: Just to pass the HooksController to the StartReport service.
  • Perform Analyses

Modules/lib:

  • VM Connection: Acts as an abstraction, for what could be in fact a Virtual Machine or Docker container where a GitHub project would be downloaded and analyzed. At the moment is just creating folders and playing with RVM and Gemsets to achieve this abstraction. Establishes new VM connection, prepares repository and gemsets, runs commands, generates DOT and JSON files. All around badass.

Installation and other notes