{
"info": {
"author": "Seoester",
"author_email": "seoester@googlemail.com",
"bugtrack_url": null,
"classifiers": [
"Development Status :: 4 - Beta",
"License :: OSI Approved :: MIT License",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.2",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4",
"Topic :: Software Development :: Version Control"
],
"description": "Git Deployment Handler\r\n======================\r\n\r\nThe Git Deployment Handler is a tool for automatic deployment of git\r\ncommits from local or remote repositories into (local) directories.\r\n\r\nSome advanced features require a database; SQlite, MongoDb and MySQL are\r\nthe supported database backends. The Git Deployment Handler uses\r\npost-receive hooks and cron jobs (services in future) to automatically\r\ndeploy commits.\r\n\r\nRequirements\r\n------------\r\n\r\n- python3\r\n- git (command line tool)\r\n- **For some features either**\r\n\r\n - *sqlite3*\r\n - mysql and PyMySQL\r\n - mongodb and pymongo\r\n\r\nInstallation\r\n------------\r\n\r\nThe easiest way to install\r\n`gitdh `__ is to use the `Python\r\nPackage Index `__:\r\n\r\n::\r\n\r\n # # It is necessary to use python3, so instead of pip, pip3 or pip-3.2, ... might have to be used\r\n # pip install gitdh\r\n\r\nOr manually install from source:\r\n\r\n::\r\n\r\n # python3 setup.py install\r\n\r\nGetting Started\r\n---------------\r\n\r\nIn this example the ``master`` branch of a local repository (hosted\r\nusing gitolite) is deployed to a webserver directory using a\r\npost-receive hook.\r\n\r\ngitdh requires a configuration using INI syntax file for every\r\nrepository whose branches are to be deployed. The path to the repository\r\nhas to be in the ``RepositoryPath`` option of the ``Git`` section. The\r\nbranch to be deployed must have its own section in the configuration\r\nfile with a ``Path`` option being the directory the branch is to be\r\ndeployed to.\r\n\r\nSo to deploy the ``/var/lib/gitolite/repositories/website.git``\r\nrepository to ``/home/www/website``, the following is put into\r\n``/var/lib/gitolite/gitdh-website.conf``:\r\n\r\n::\r\n\r\n [Git]\r\n RepositoryPath = /var/lib/gitolite/repositories/website.git\r\n\r\n [master]\r\n Path = /home/www/website\r\n\r\nThe post-receive hooks is installed using the following command, it is\r\nalso necessary to give the ``gitolite`` user write access to the\r\ndeployment directory.\r\n\r\n::\r\n\r\n # mkdir -p /home/www/website\r\n # chown gitolite:www-data /home/www/website\r\n # chmod g+rx /home/www/website\r\n # git-dh install postreceive /var/lib/gitolite/gitdh-website.conf\r\n\r\nFrom now on gitdh will deploy all new commits pushed to the ``website``\r\nrepository to the ``/home/www/website`` directory.\r\n\r\nAlso check the ``docs/``\r\n(`Github `__)\r\ndirectory for sample configuration files.\r\n\r\nConfiguration\r\n-------------\r\n\r\ngitdh is configured using a config file in INI syntax.\r\n\r\nIt can either be stored somewhere on the file system or in a file named\r\n``gitdh.conf`` in a ``gitdh`` branch of a git repository. This file or\r\nsuch a git repository is referred to as **target** within gitdh. Some\r\nsample config files can be found in the ``docs/`` directory.\r\n\r\nThe ``Git`` section of the file contains all file-wide settings; The\r\nmost important one is the ``RepositoryPath`` of the git repository to be\r\ndeployed. This setting can be omitted when the config file is placed in\r\na git repository (named ``gitdh.conf`` in a ``gitdh`` branch).\r\n\r\n::\r\n\r\n [Git]\r\n RepositoryPath = /var/lib/gitolite/repositories/webapp.git\r\n\r\nAdditional Options:\r\n\r\n- ``External`` - ``True`` or ``False``, whether the Source is an\r\n external (i.e. remote) repository; (requires a database); default\r\n ``False``\r\n- ``IdentityFile`` - May contain the path of an IdentityFile (as in\r\n .ssh/config) when External is used and Source is a SSH URL; default\r\n ``None``\r\n\r\nBranches\r\n~~~~~~~~\r\n\r\nFor every branch which should be deployed, a section named like the\r\nbranch has to be created. The ``Path`` setting specifies the path to be\r\ndeployed to:\r\n\r\n::\r\n\r\n [master]\r\n Path = /srv/www/webapp.com/\r\n\r\nAdditional Options:\r\n\r\n- ``RmGitIntFiles`` - ``True`` or ``False``, whether internal git files\r\n should be deleted (``.git/``, ``.gitignore``, ``.gitmodules``);\r\n default ``True``\r\n- ``Recursive`` - ``True`` or ``False``, whether a clone should be\r\n ``recursive``, i.e. submodules should be cloned out as well; default\r\n ``True``\r\n- ``DatabaseLog`` - ``True`` or ``False``, whether every commit should\r\n be logged to the database; (requires a database); default ``False``\r\n- ``CronDeployment`` - ``True`` or ``False``, whether every commit\r\n should be inserted into the database and deployed by cron job instead\r\n of being deploying directly; (requires a database); default ``False``\r\n- ``Approval`` - ``True`` or ``False``, whether every commit has to be\r\n first approved in the database and is then deployed by cron job;\r\n (requires a database); default ``False``\r\n- ``Preprocessing`` - space separated list of commands to be performed\r\n before deploying any commits; default \\`\\` (empty)\r\n- ``Postprocessing`` - space separated list of commands to be performed\r\n after deploying all commits; default \\`\\` (empty)\r\n\r\nDatabase\r\n~~~~~~~~\r\n\r\nTo be able to utilise a database, a ``Database`` section is required.\r\nThe ``Engine`` setting in the ``Database`` section specified the\r\ndatabase backend (must be ``sqlite``, ``mongodb`` or ``mysql``). Each\r\ndatabase backend has its own further options:\r\n\r\n::\r\n\r\n # MySQL\r\n # Database and table have to be setup, see docs/commits.sql\r\n [Database]\r\n Engine = mysql\r\n Host = localhost\r\n Port = 3306\r\n User = gitdh\r\n Password = ###randompassword###\r\n Database = gitdh\r\n Table = commits\r\n\r\n # MongoDb\r\n # Database and collection are created when needed\r\n [Database]\r\n Engine = mongodb\r\n Host = localhost\r\n Port = 27017\r\n Database = gitdh\r\n Collection = commits\r\n\r\n # SQLite\r\n # Is created when needed; DatabaseFile must be writable\r\n [Database]\r\n Engine = sqlite\r\n DatabaseFile = /var/lib/gitolite/data.sqlite\r\n Table = commits\r\n\r\nCommands\r\n~~~~~~~~\r\n\r\nCommands used for ``Preprocessing`` and ``Postprocessing`` are stored in\r\nadditional sections in the config file. The section name is the name of\r\nthe command with trailing ``-command``.\r\n\r\n::\r\n\r\n [crunch-command]\r\n Mode = file\r\n RegExp = \\.php$\r\n Command = eff_php_crunch ${f}\r\n\r\n [customscript-command]\r\n Mode = once\r\n Command = ${f}/custom.sh\r\n\r\n``Mode`` can either be ``file`` or ``once``. The ``Command`` defines the\r\ncommand which is executed. In the ``Command`` string ``${f}`` is\r\nsubstituted with a file path:\r\n\r\n- If ``Mode`` equals ``file``, the command is performed once for every\r\n file in the repository matching the regular expression in the\r\n optional ``RegExp`` option. The file path is the path of the\r\n individual file in this case.\r\n- If ``Mode`` equals ``once``, the command is performed once for the\r\n deployed repository, the file path in this case is the path of the\r\n deployed repository.\r\n\r\nAdditional Options:\r\n\r\n- ``Shell`` - ``True`` or ``False``, whether a shell should be used to\r\n execute the command; default ``False``\r\n- ``SuppressOutput`` - ``True`` or ``False``, whether output from the\r\n command should be surpressed, whether ; default ``True``\r\n\r\nSetup\r\n-----\r\n\r\nIn order to deploy commits automatically, gitdh has to be installed as a\r\ngit post-receive hook and / or a cron job. Post-receive hooks require a\r\nlocal \"git server\" (e.g. `gitolite `__) commits\r\nare pushed to. Cron Jobs have to be created to use advanced features,\r\ne.g. deploy commits from ``External`` repositories or the ``Approval``\r\nor ``CronDeployment`` features.\r\n\r\nThe ``git-dh install`` command helps creating these files.\r\n\r\n``postreceive`` Setup\r\n~~~~~~~~~~~~~~~~~~~~~\r\n\r\nThe ``git-dh install postreceive`` command will assist on creating git\r\npost-receive hooks.\r\n\r\nThe following command will attempt to create a post-receive hook for\r\nevery ``target`` (being a config file or a repository):\r\n\r\n::\r\n\r\n # git-dh install postreceive [ [ ...]]\r\n\r\nThe command will try to fetch all required information from the\r\n``target``. It will also attempt to recognise and use the current\r\nvirtualenv. The command by default doesn't overwrite any files, aborts\r\non error and prints all files written to.\r\n\r\nAdditional arguments:\r\n\r\n- ``--printOnly`` - Only print the file content, don't write any files\r\n- ``--force`` - Overwrite existing files\r\n- ``--quiet`` - Only print errors\r\n- ``--mode`` - The mode of the created file; default 755\r\n\r\nFor more information see ``git-dh install postreceive --help``.\r\n\r\nA sample post-receive file can be found in ``docs/post-receive.sample``\r\n\r\n``cron`` Setup\r\n~~~~~~~~~~~~~~\r\n\r\nThe ``git-dh install cron`` command will assist on creating cron job\r\nfiles in ``/etc/cron.d/``.\r\n\r\nThe following command will attempt to create a cron job ``name`` in\r\n``/etc/cron.d/`` containing commands to query every ``target`` (being a\r\nconfig file or a repository):\r\n\r\n::\r\n\r\n # git-dh install cron [ [ ...]]\r\n\r\nThe command will try to fetch all required information from the\r\n``target``. It will also attempt to recognise and use the current\r\nvirtualenv. The command by default doesn't overwrite any files, aborts\r\non error and prints all files written to.\r\n\r\nAdditional arguments:\r\n\r\n- ``--user`` - The user to execute gitdh under in the cron job;\r\n default: the current user\r\n- ``--interval`` - The interval with which the cron job is to be\r\n executed; default ``*/5 * * * *``\r\n- ``--unixPath`` - The ``PATH`` to be written to the cron job file;\r\n default: the current path\r\n- ``--mailto`` - The ``MAILTO`` to be written to the cron job file;\r\n default root\r\n- ``--printOnly`` - Only print the file content, don't write any files\r\n- ``--force`` - Overwrite existing files\r\n- ``--quiet`` - Only print errors\r\n- ``--mode`` - The mode of the created cron job file; default 644\r\n\r\nFor more information see ``git-dh install cron --help``.\r\n\r\nA sample cron job file can be found in ``docs/cronjob.sample``\r\n\r\nIssues / Contributing\r\n---------------------\r\n\r\nPlease use the `Git-Deployment-Handler Github\r\nRepository `__ to\r\nsubmit issues or contribute.",
"description_content_type": null,
"docs_url": null,
"download_url": "UNKNOWN",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "https://github.com/seoester/Git-Deployment-Handler",
"keywords": "git deploy deployment commit database remote approval cron post-receive hook",
"license": "MIT",
"maintainer": "",
"maintainer_email": "",
"name": "gitdh",
"package_url": "https://pypi.org/project/gitdh/",
"platform": "UNKNOWN",
"project_url": "https://pypi.org/project/gitdh/",
"project_urls": {
"Download": "UNKNOWN",
"Homepage": "https://github.com/seoester/Git-Deployment-Handler"
},
"release_url": "https://pypi.org/project/gitdh/0.7.4/",
"requires_dist": null,
"requires_python": null,
"summary": "Tool to automatically deploy git commits using post-receive hooks and cron jobs",
"version": "0.7.4"
},
"last_serial": 1711199,
"releases": {
"0.6": [],
"0.7": [
{
"comment_text": "",
"digests": {
"md5": "9bf4bbcfeec9426a6bd9fb77b8951830",
"sha256": "ca928baf54a685d0178509049d8a676af5207c8308e1b96cbf3a9951e96ed2f5"
},
"downloads": -1,
"filename": "gitdh-0.7.tar.gz",
"has_sig": false,
"md5_digest": "9bf4bbcfeec9426a6bd9fb77b8951830",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 16457,
"upload_time": "2014-12-26T16:13:08",
"url": "https://files.pythonhosted.org/packages/fd/a3/b3c94fbb961c2d6feabea044cd3dcc28fc7fd3bc18ffc89d8a5cb9314a96/gitdh-0.7.tar.gz"
}
],
"0.7.1": [
{
"comment_text": "",
"digests": {
"md5": "7164335d709f099bea079ea1079cb5bc",
"sha256": "5f270f8047477c0e6c5d50fd080d494cd9d12979420d24536d83c5a7b324d23b"
},
"downloads": -1,
"filename": "gitdh-0.7.1.tar.gz",
"has_sig": false,
"md5_digest": "7164335d709f099bea079ea1079cb5bc",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 16521,
"upload_time": "2014-12-26T16:25:05",
"url": "https://files.pythonhosted.org/packages/b8/c7/b60940c4e507312cc2b6924c22980e569c315e5709f874bed4f9e3ad557e/gitdh-0.7.1.tar.gz"
}
],
"0.7.2": [
{
"comment_text": "",
"digests": {
"md5": "8ab58f9fa61d6f00d151da7de3a01941",
"sha256": "d8f83876fa3f2e12a852bd1f2a2a7f772607803d9693eae1b8302c09b1c1ad69"
},
"downloads": -1,
"filename": "gitdh-0.7.2.tar.gz",
"has_sig": false,
"md5_digest": "8ab58f9fa61d6f00d151da7de3a01941",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 17613,
"upload_time": "2014-12-28T21:24:52",
"url": "https://files.pythonhosted.org/packages/08/40/986ae3ea4cdc3e8c44db3f8e3c8703e9e5ec5e9cab6dc1869598e5239be5/gitdh-0.7.2.tar.gz"
}
],
"0.7.3": [
{
"comment_text": "",
"digests": {
"md5": "c192611c99dd5715af3dc7a2147cac45",
"sha256": "8508ee7ebc74caa9a73581e7683c358fe56605ac45d555ec5f7e865a1a0909ec"
},
"downloads": -1,
"filename": "gitdh-0.7.3.tar.gz",
"has_sig": false,
"md5_digest": "c192611c99dd5715af3dc7a2147cac45",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 17617,
"upload_time": "2014-12-29T12:20:29",
"url": "https://files.pythonhosted.org/packages/d6/fa/af7f971eef778682c53e1c1765f006531086e6a9f6f1e1ec32583480a722/gitdh-0.7.3.tar.gz"
}
],
"0.7.4": [
{
"comment_text": "",
"digests": {
"md5": "bbb39da00c21241c753031e7bc79a91d",
"sha256": "f3a18292eed31fb2bc178832e65374dd123cf7dbe7930593cca52c4f95c6dfea"
},
"downloads": -1,
"filename": "gitdh-0.7.4.tar.gz",
"has_sig": false,
"md5_digest": "bbb39da00c21241c753031e7bc79a91d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 17674,
"upload_time": "2015-09-06T15:55:27",
"url": "https://files.pythonhosted.org/packages/26/3a/4daa7066779478f65ec01d082174159c202bbdb3144ac18fec7766ae9cda/gitdh-0.7.4.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "bbb39da00c21241c753031e7bc79a91d",
"sha256": "f3a18292eed31fb2bc178832e65374dd123cf7dbe7930593cca52c4f95c6dfea"
},
"downloads": -1,
"filename": "gitdh-0.7.4.tar.gz",
"has_sig": false,
"md5_digest": "bbb39da00c21241c753031e7bc79a91d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 17674,
"upload_time": "2015-09-06T15:55:27",
"url": "https://files.pythonhosted.org/packages/26/3a/4daa7066779478f65ec01d082174159c202bbdb3144ac18fec7766ae9cda/gitdh-0.7.4.tar.gz"
}
]
}