Skip to content

Easily sync your scripts and EA's from a git repo with the JSS

License

Notifications You must be signed in to change notification settings

paulmacseven/git2jss

This branch is 5 commits ahead of, 11 commits behind badstreff/git2jss:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Sep 11, 2019
6fac6c0 · Sep 11, 2019

History

99 Commits
Nov 11, 2018
Sep 11, 2019
Jul 26, 2018
Mar 1, 2019
Nov 11, 2018
Feb 15, 2019
Oct 12, 2017
Nov 11, 2018
Nov 11, 2018
Dec 12, 2017
Feb 15, 2019
May 30, 2018
Jan 22, 2019

Repository files navigation

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!

About

Easily sync your scripts and EA's from a git repo with the JSS

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 91.7%
  • Shell 8.3%