mirror of
https://github.com/oskar456/dzonegit.git
synced 2024-05-11 05:55:41 +00:00
Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8f952086aa | ||
|
|
83a4049821 | ||
|
|
15cdae67ee | ||
|
|
12fb932711 | ||
|
|
cb543514ac | ||
|
|
f9c6a52357 | ||
|
|
24d992d999 | ||
|
|
7cb7c42d76 | ||
|
|
3dd346294a | ||
|
|
03fde74ede | ||
|
|
3769dd22fb | ||
|
|
8d15bb531c |
13
.travis.yml
13
.travis.yml
@@ -2,15 +2,16 @@ before_install:
|
||||
- sudo apt-get install -y bind9utils
|
||||
language: python
|
||||
python:
|
||||
- "3.5"
|
||||
- "3.6"
|
||||
- "nightly"
|
||||
- "3.5"
|
||||
- "3.6"
|
||||
- "3.7"
|
||||
- "nightly"
|
||||
matrix:
|
||||
allow_failures:
|
||||
- python: "nightly"
|
||||
install:
|
||||
- pip install -e .
|
||||
- pip install pytest
|
||||
- pip install -e .
|
||||
- pip install pytest
|
||||
script:
|
||||
- pytest
|
||||
- pytest
|
||||
sudo: false
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
.. image:: https://travis-ci.org/oskar456/dzonegit.svg?branch=master
|
||||
:target: https://travis-ci.org/oskar456/dzonegit
|
||||
|
||||
Git hooks to manage a repository of DNS zones
|
||||
=============================================
|
||||
|
||||
@@ -180,6 +183,9 @@ In the template strings, these placeholders are supported:
|
||||
``$zonefile``
|
||||
Full path to the zone file
|
||||
|
||||
``$zonerelfile``
|
||||
Path to the zone file, relative to checkout path (useful for chroot environments)
|
||||
|
||||
``$zonevar``
|
||||
Per-zone specific variable, see above
|
||||
|
||||
|
||||
@@ -119,7 +119,7 @@ def compile_zone(zonename, zonedata, unixtime=None, missing_dot=False):
|
||||
"CompileResults", "success, serial, zonehash, stderr",
|
||||
)
|
||||
r = subprocess.run(
|
||||
["/usr/sbin/named-compilezone", "-o", "-", zonename, "/dev/stdin"],
|
||||
["/usr/bin/env", "named-compilezone", "-o", "-", zonename, "/dev/stdin"],
|
||||
input=unixtime_directive(zonedata, unixtime),
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE,
|
||||
@@ -395,7 +395,7 @@ def template_config(checkoutpath, template, blacklist=set(), whitelist=set()):
|
||||
zonevar = defaultvar
|
||||
out.append(itemtpl.substitute(
|
||||
mapping, zonename=zonename,
|
||||
zonefile=str(f), zonevar=zonevar,
|
||||
zonefile=str(f), zonerelfile=str(f.relative_to(checkoutpath)), zonevar=zonevar,
|
||||
))
|
||||
if footertpl.template:
|
||||
out.append(footertpl.substitute(mapping))
|
||||
|
||||
2
setup.py
2
setup.py
@@ -5,7 +5,7 @@ readme = Path(__file__).with_name("README.rst").read_text()
|
||||
|
||||
setup(
|
||||
name="dzonegit",
|
||||
version="0.11",
|
||||
version="0.14",
|
||||
description="Git hooks to manage a repository of DNS zones",
|
||||
long_description=readme,
|
||||
long_description_content_type="text/x-rst",
|
||||
|
||||
@@ -15,6 +15,8 @@ def git_dir(tmpdir_factory):
|
||||
d = tmpdir_factory.getbasetemp()
|
||||
d.chdir()
|
||||
subprocess.call(["git", "init"])
|
||||
subprocess.call(["git", "config", "user.name", "dzonegit pytest"])
|
||||
subprocess.call(["git", "config", "user.email", "nonexistent@example.com"])
|
||||
return d
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user