Skip to content

Commit

Permalink
Added CHANGELOG.rst file and changed to fragments based change log
Browse files Browse the repository at this point in the history
Signed-off-by: Andreas Maier <maiera@de.ibm.com>
  • Loading branch information
andy-maier committed Jul 3, 2024
1 parent f4bd4a0 commit 9c8d418
Show file tree
Hide file tree
Showing 11 changed files with 1,091 additions and 1,276 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,12 @@ jobs:
echo 'Error: Module .rst files are not up to date in this PR. Run make docslocal to update.';
exit 1;
fi"
- name: Run check_frag
env:
PACKAGE_LEVEL: ${{ matrix.package_level }}
RUN_TYPE: ${{ steps.set-run-type.outputs.result }}
run: |
make check_frag
- name: Run check
env:
PACKAGE_LEVEL: ${{ matrix.package_level }}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ tmp_*
/tests/output/
/AUTHORS
/ChangeLog
/changelogs/.plugin-cache.yaml
/build/
/gh-pages/
/docs_local
467 changes: 466 additions & 1 deletion CHANGELOG.rst

Large diffs are not rendered by default.

23 changes: 18 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,13 @@ safety_all_policy_file := .safety-policy-all.yml
# Packages whose dependencies are checked using pip-missing-reqs
# ansible_test and pylint are checked only on officially supported Python versions
ifeq ($(python_m_n_version),3.8)
check_reqs_packages := ansible pip_check_reqs pytest coverage coveralls flake8 sphinx ansible_doc_extractor
check_reqs_packages := ansible pip_check_reqs pytest coverage coveralls flake8 sphinx ansible_doc_extractor antsibull_changelog
else ifeq ($(python_m_n_version),3.9)
check_reqs_packages := ansible pip_check_reqs pytest coverage coveralls flake8 sphinx ansible_doc_extractor ansible_test pylint
check_reqs_packages := ansible pip_check_reqs pytest coverage coveralls flake8 sphinx ansible_doc_extractor antsibull_changelog ansible_test pylint
else ifeq ($(python_m_n_version),3.10)
check_reqs_packages := ansible pip_check_reqs pytest coverage coveralls flake8 sphinx ansible_doc_extractor ansible_test ansiblelint pylint
check_reqs_packages := ansible pip_check_reqs pytest coverage coveralls flake8 sphinx ansible_doc_extractor antsibull_changelog ansible_test ansiblelint pylint
else ifeq ($(python_m_n_version),3.11)
check_reqs_packages := ansible pip_check_reqs pytest coverage coveralls flake8 sphinx ansible_doc_extractor ansible_test ansiblelint pylint
check_reqs_packages := ansible pip_check_reqs pytest coverage coveralls flake8 sphinx ansible_doc_extractor antsibull_changelog ansible_test ansiblelint pylint
else
# sphinx is excluded because pip-missing-reqs 2.5 reports missing sphinx-versions package (rightfully)
check_reqs_packages := ansible pip_check_reqs pytest coverage coveralls flake8 ansible_doc_extractor ansible_test ansiblelint pylint
Expand Down Expand Up @@ -204,6 +204,7 @@ help:
@echo ' safety - Run safety for install and all'
@echo ' bandit - Run bandit checker'
@echo ' check_reqs - Perform missing dependency checks'
@echo ' check_frag - Run antsibull-changelog lint on change log fragments'
@echo ' docs - Build the documentation for all enabled (docs/source/conf.py) versions in: $(doc_build_dir) using remote repo'
@echo ' docslocal - Build the documentation from local repo contents in: $(doc_build_local_dir)'
@echo ' linkcheck - Check links in documentation'
Expand Down Expand Up @@ -237,7 +238,7 @@ help:
@echo ' ansible-playbook playbooks/....'

.PHONY: all
all: install develop dist safety bandit check sanity ansible_lint check_reqs docs docslocal linkcheck test end2end_mocked
all: install develop dist safety bandit check check_frag sanity ansible_lint check_reqs docs docslocal linkcheck test end2end_mocked
@echo '$@ done.'

.PHONY: install
Expand Down Expand Up @@ -350,6 +351,16 @@ endif
endif
@echo "Makefile: $@ done."

.PHONY: check_frag
check_frag: _check_version develop_$(pymn).done
ifneq ($(doc_build),true)
@echo "Makefile: Warning: Skipping the checking of changelog fragments on Python $(python_m_n_version)"
else
@echo "Makefile: Checking changelog fragments"
antsibull-changelog lint -vv
endif
@echo "Makefile: $@ done."

.PHONY: end2end
end2end: _check_version $(done_dir)/develop_$(pymn)_$(PACKAGE_LEVEL).done
bash -c 'PYTHONWARNINGS=default ANSIBLE_LIBRARY=$(module_py_dir) PYTHONPATH=. TESTEND2END_LOAD=true pytest -v $(pytest_cov_opts) $(pytest_opts) $(test_dir)/end2end'
Expand Down Expand Up @@ -481,11 +492,13 @@ $(module_rst_dir)/%.rst: $(module_py_dir)/%.py $(module_rst_dir) $(doc_templates

# .nojekyll file disables GitHub pages jekyll pre-processing
$(doc_build_dir)/index.html: $(doc_rst_files) $(doc_source_dir)/conf.py
antsibull-changelog generate --reload-plugins -vv
sphinx-versioning -l $(doc_source_dir)/conf.py build $(doc_source_dir) $(doc_build_dir) -- $(sphinx_opts)
touch $(doc_build_dir)/.nojekyll

.PHONY: docslocal
docslocal: _check_version $(done_dir)/develop_$(pymn)_$(PACKAGE_LEVEL).done $(doc_rst_files) $(doc_source_dir)/conf.py
rm -rf $(doc_build_local_dir)
antsibull-changelog generate --reload-plugins -vv
sphinx-build -b html $(sphinx_opts) $(doc_source_dir) $(doc_build_local_dir)
# open $(doc_build_local_dir)/index.html
Loading

0 comments on commit 9c8d418

Please sign in to comment.