summaryrefslogtreecommitdiffstats
path: root/test/sanity
diff options
context:
space:
mode:
authorFelix Fontein <felix@fontein.de>2020-06-11 20:21:21 +0200
committerGitHub <noreply@github.com>2020-06-11 20:21:21 +0200
commita114da80ee65c66d05d818d63903aae2903d998c (patch)
treed664cebf8a3786122f333adf5cce709534f196d7 /test/sanity
parentclarifies that vars can begin with _, with a warning (#69749) (diff)
downloadansible-a114da80ee65c66d05d818d63903aae2903d998c.tar.xz
ansible-a114da80ee65c66d05d818d63903aae2903d998c.zip
Use antsibull-changelog instead of packaged changelog generator (#69313)
Replace the ansible-base changelog linting and generation tool with antsibull-changelog and make it available for linting collections. Previously changelog linting was limited to ansible-base.
Diffstat (limited to 'test/sanity')
-rw-r--r--test/sanity/code-smell/changelog.json7
-rwxr-xr-xtest/sanity/code-smell/changelog.py26
-rw-r--r--test/sanity/code-smell/changelog.requirements.txt5
-rwxr-xr-xtest/sanity/code-smell/package-data.py2
-rw-r--r--test/sanity/code-smell/package-data.requirements.txt3
5 files changed, 4 insertions, 39 deletions
diff --git a/test/sanity/code-smell/changelog.json b/test/sanity/code-smell/changelog.json
deleted file mode 100644
index 46028fb046..0000000000
--- a/test/sanity/code-smell/changelog.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "intercept": true,
- "prefixes": [
- "changelogs/fragments/"
- ],
- "output": "path-line-column-message"
-}
diff --git a/test/sanity/code-smell/changelog.py b/test/sanity/code-smell/changelog.py
deleted file mode 100755
index 31123e5b29..0000000000
--- a/test/sanity/code-smell/changelog.py
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/usr/bin/env python
-from __future__ import (absolute_import, division, print_function)
-__metaclass__ = type
-
-import os
-import sys
-import subprocess
-
-
-def main():
- paths = sys.argv[1:] or sys.stdin.read().splitlines()
-
- allowed_extensions = ('.yml', '.yaml')
-
- for path in paths:
- ext = os.path.splitext(path)[1]
-
- if ext not in allowed_extensions:
- print('%s:%d:%d: extension must be one of: %s' % (path, 0, 0, ', '.join(allowed_extensions)))
-
- cmd = ['packaging/release/changelogs/changelog.py', 'lint'] + paths
- subprocess.check_call(cmd)
-
-
-if __name__ == '__main__':
- main()
diff --git a/test/sanity/code-smell/changelog.requirements.txt b/test/sanity/code-smell/changelog.requirements.txt
deleted file mode 100644
index 4900d674c0..0000000000
--- a/test/sanity/code-smell/changelog.requirements.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-docutils
-jinja2 # ansible-base requirement
-packaging
-pyyaml
-rstcheck
diff --git a/test/sanity/code-smell/package-data.py b/test/sanity/code-smell/package-data.py
index da02de95ee..4ef0be3c97 100755
--- a/test/sanity/code-smell/package-data.py
+++ b/test/sanity/code-smell/package-data.py
@@ -37,7 +37,7 @@ def assemble_files_to_ship(complete_file_list):
ignore_files = frozenset((
# Developer-only tools
'changelogs/config.yaml',
- 'changelogs/.changes.yaml',
+ 'changelogs/changelog.yaml',
'hacking/README.md',
'hacking/ansible-profile',
'hacking/cgroup_perf_recap_graph.py',
diff --git a/test/sanity/code-smell/package-data.requirements.txt b/test/sanity/code-smell/package-data.requirements.txt
index 476ea50e79..5d74c7152e 100644
--- a/test/sanity/code-smell/package-data.requirements.txt
+++ b/test/sanity/code-smell/package-data.requirements.txt
@@ -5,3 +5,6 @@ pyyaml # ansible-base requirement
rstcheck
setuptools > 39.2
straight.plugin
+
+# changelog build requires python 3.6+
+antsibull-changelog ; python_version >= '3.6'