Code Monkey home page Code Monkey logo

munkipromoter's Introduction

Munki Promoter Codacy BadgeCodacy BadgeBuild Status Code style

Munki Promoter is a tool which manages the lifecycle of your software packages within a Munki repository automatically. For example you receive new versions of your packages every couple of days and it goes into a development or testing state where you can evaluate the new package. After a predefined period of days and if no complaints or errors were reported these new versions should now be promoted to the production state. Additionally you may want to offer a certain degree of transparency, therefore the current state of your software repository is mirrored by a Jira Board, where each issue represents a package.But not only is the Jira Board a visual representation it also acts as a familiar user interface to change certain packages options which will be considered by the Munki Promoter.

This is the main use case for the Munki Promoter. It loads packages from a existing Munki Repository, creates or updates the corresponding Jira issues and then checks whether a software package can or should be promoted to another catalog. In this general case we decided to go with a three catalog approach.

  • Development
  • Testing
  • Production

Installation and usage

Munki Promoter currently requires Python version 3.7+ and Munki tools to be installed on the machine running the application code

Its dependencies can be installed by running pip install -r requirements.txt. Once the prerequisites are satisfied we can begin to add all necessary configuration values.The configuration is loaded and managed by the config.py module. It tries to load all values from the local environment or configuration file. This offers the advantage to simply deploy and manage a machine with a configuration management tool such as Ansible.

For more information and how to set up your version of Munki Promoter please refer to our documentation.

Development & Testing

Bug fixes, documentation improvements or feature requests are always welcome. Please note that we have certain measures in place to ease development, ensure code quality and readability. Some of them are explained below.

Black

To ensure consistency in our code we utilise Black as a code formatter.

Flake8

Our continuous integration will automatically run Flake8 and check whether our code complies with our style guide which is almost vanilla PEP8. You can run flake8 locally to test your code changes.

Tox

Tox aims to automate and standardize testing in Python. It is part of a larger vision of easing the packaging, testing and release process of Python software.

To test future compatibility a basic tox configuration is also included in this repo. By simply running tox in the main directory the test can be started.

As the code currently uses certain features from from __future__ import annotations the code is only compatible with Python version 3.7 and above.

Testing & Coverage reports

As a test runner we utilised pytest and already created tests which aim to cover most of the critical application modules.

To view the test coverage just run

coverage run -m pytest tests/* --cov=. --cov-report=html

The results will then be stored in a new folder called htmlcov. and published on Codacy.

munkipromoter's People

Contributors

aschwanb avatar tcinbis avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.