Modify CI process in some way to pull and check the DNS repository with the snippets present.
Description
Details
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | • crusnov | T228387 Bare metal cloud: management interfaces | |||
Resolved | Volans | T233183 Automate generation of Management DNS records from Netbox | |||
Resolved | • crusnov | T243362 Integrate automated DNS snippets into CI |
Event Timeline
The pulling the git looks straight forward (adding to the Dockerfile), as for actually testing against the pull I suspect we'll have to use the template mechanics that builds the DNS repository to pass a path to the path those snippets are checked out to so that any place we $INCLUDE a snippet, we use a template variable (such as {{INCLUDEPATH}} or somesuch) - correct me if I'm wrong @BBlack but looking at the docs for gdnsd it doesn't appear that there is a way to set the search path for $INCLUDES otherwise.
Change 568546 had a related patch set uploaded (by CRusnov; owner: CRusnov):
[integration/config@master] operations-dnslint: Add support for generated DNS as part of linting process
Change 569340 had a related patch set uploaded (by CRusnov; owner: CRusnov):
[operations/dns@master] tox: Support DNS_INCLUDE_DIR and generated DNS
Change 568683 had a related patch set uploaded (by CRusnov; owner: CRusnov):
[operations/dns@master] gen-zones.py: Add variable insertion
Summary of status:
We have decided that modifying the CI image itself is unnecessary in light of incidental changes to deploy-check.py in https://gerrit.wikimedia.org/r/c/operations/dns/+/569340 - which automatically pulls a copy of the repository as needed to test the current state of the zone files.
The changes in that patch either use an existing checkout or pull, and copy the repository into the output tree for inclusion. This simplifies changes to gen-zones.py (well, obviates them) and lets us use a simple $INCLUDE in the zone files themselves. It facilitates local testing and CI, as well as pre-flight testing on target machines. I have tested local and CI testing.
Change 568546 abandoned by CRusnov:
operations-dnslint: Add support for generated DNS as part of linting process
Reason:
This has been superceded by a clever change downstream.
Change 568683 abandoned by CRusnov:
gen-zones.py: Add variable insertion
Reason:
This is no longer needed, although a neat feature.
Change 569340 merged by CRusnov:
[operations/dns@master] tox: Support DNS_INCLUDE_DIR and generated DNS