Giter Site home page Giter Site logo

git2jss's Introduction

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:

  • --password for CI/CD (Will prompt for password if not set)
  • --do_not_verify_ssl to skip ssl verification
  • --overwrite to overwrite all scripts and extension attributes

Optional flags for sync.py:

  • --password for CI/CD (Will prompt for password if not set)
  • --do_not_verify_ssl to skip ssl verification
  • --overwrite to overwrite all scripts and extension attributes
  • --limit to limit max connections (default=25)
  • --timeout to limit max connections (default=60)
  • --verbose to add additional logging
  • --update_all to upload all resources in ./extension_attributes and ./scripts
  • --jenkins to write a Jenkins file:jenkins.properties with $scripts and $eas and compare $GIT_PREVIOUS_COMMIT with $GIT_COMMIT

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!

git2jss's People

Contributors

badstreff avatar bradschm avatar homebysix avatar rderewianko avatar tsparr avatar lashomb 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.