Skip to content

Scripts related to convert2rhel used by tasks on Red Hat Insights

License

Notifications You must be signed in to change notification settings

hosekadam/convert2rhel-insights-tasks

 
 

Repository files navigation

codecov

Convert2RHEL Inights Tasks

Scripts related to convert2rhel to be run via rhc-worker-script on Red Hat Insights.

Scripts themselves shouldn't have any additional requirements = they are relying on python standard library.

Structure of repository is following:

├── requirements  # DEV requirements - tests & lint
│   └── ...
├── schemas # All expected json outputs in the scripts stdouts
|   |   ...
│   └── preconversion_assessment_schema_1.1.json
├── convert2rhel_insights_tasks # All available scripts
│   └── main.py
└── tests
    |   ...

Schemas

Currently there is given format of the scripts stdout that is expected to be parsed by the Red Hat Insights Task UI. This stdout is JSON structure wrapped between agreed on separators. Schemas of the JSONs for each script can be found in schemas folder.

  • separators (common to all scripts):
    • ### JSON START ###
    • ### JSON END ###

Scripts

Pre-conversion assessment

Script itself and tests are written for python 2.7. Goal of script is to print to stdout in specified format, the script itself is executed by rhc-worker-script as part of pre-conversion task, stdout is collected and send back to Insights Tasks UI.

Local Development & Contributing

Requirements

  • virtualenv - to run tests locally
  • pre-commit - to run checks before each commit, see hook in .pre-commit-config.yml
  • make - to use handy commands

Run tests and lint

make install # install pre-commit hooks and python virtualenv
make tests # run pytest

About

Scripts related to convert2rhel used by tasks on Red Hat Insights

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 98.4%
  • Makefile 1.6%