primalcurve / git2jss

Easily sync your scripts and EA's from a git repo with the JSS
MIT License
3 stars 3 forks source link

git2jss

Codacy Badge

A fast asynchronous python library for syncing your scripts in git with your JSS easily. This allows admins to keep their script in a version control system for easy updating rather than googling and copy-pasting from resources that they find online.

Getting Started

  1. Fork the Project
  2. Install Python version 3.6 or higher. (this is because of the async requirements)
  3. Run python3.6 -m pip install -r requirements.txt to install required modules
  4. Run ./tools/download.py --url https://your.jss.url:8443 --username api_user to download all scripts and extension attributes to the repository
  5. Run ./sync.py --url https://your.jss.url:8443 --username api_user to sync all scripts back to your JSS

Optional flags for download.py:

Optional flags for sync.py:

Prerequisites

git2jss requires Python 3.6 and the python modules listed in requirements.txt

Deployment

The project can be ran ad-hoc with the example listed above, but ideally you setup webhooks and integrate into a CI/CD pipeline so each time a push is made to the repo your scripts are re-uploaded to the JSS.

Contributing

PR's are always welcome!