From 780feef22416f2d9a99f3ab694083abac29c2fc4 Mon Sep 17 00:00:00 2001 From: Sorin Sbarnea Date: Fri, 23 Jun 2023 16:18:06 +0100 Subject: [PATCH] Fix documentation links (#3940) Fixes: #3933 --- .config/requirements-docs.txt | 1 + .config/requirements.txt | 2 ++ .github/ISSUE_TEMPLATE/bug_report.md | 4 ++-- README.md | 2 +- docs/ci.md | 8 ++++---- docs/contributing.md | 9 ++++----- docs/faq.md | 4 ++-- docs/getting-started.md | 12 ++++++------ docs/usage.md | 2 +- linkcheckerrc | 9 +++++++++ mkdocs.yml | 7 +------ tox.ini | 1 + 12 files changed, 34 insertions(+), 27 deletions(-) create mode 100644 linkcheckerrc diff --git a/.config/requirements-docs.txt b/.config/requirements-docs.txt index 72fea1f8f..5f4bbb5aa 100644 --- a/.config/requirements-docs.txt +++ b/.config/requirements-docs.txt @@ -1,2 +1,3 @@ mkdocs-ansible[lock]>=0.1.4 pipdeptree>=2.4.0 +linkchecker diff --git a/.config/requirements.txt b/.config/requirements.txt index 969631fc4..b24007686 100644 --- a/.config/requirements.txt +++ b/.config/requirements.txt @@ -30,6 +30,7 @@ cryptography==40.0.2 csscompressor==0.9.5 cssselect2==0.7.0 defusedxml==0.7.1 +dnspython==2.3.0 enrich==1.2.7 exceptiongroup==1.1.1 execnet==1.9.0 @@ -44,6 +45,7 @@ jinja2==3.1.2 jinja2-time==0.2.0 jsmin==3.0.1 jsonschema==4.17.3 +linkchecker==10.2.1 markdown==3.3.7 markdown-exec==1.4.0 markdown-include==0.8.1 diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index b92d3651f..e3c5307dd 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -6,8 +6,8 @@ labels: bug - - + + # Issue Type diff --git a/README.md b/README.md index 99a02d2dd..68eff9981 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # About Ansible Molecule [![PyPI Package](https://img.shields.io/pypi/v/molecule)](https://pypi.org/project/molecule/) -[![Documentation Status](https://readthedocs.org/projects/molecule/badge/?version=latest)](https://molecule.readthedocs.io/en/latest/) +[![Documentation Status](https://readthedocs.org/projects/molecule/badge/?version=latest)](https://ansible.readthedocs.io/projects/molecule) [![image](https://github.com/ansible-community/molecule/workflows/tox/badge.svg)](https://github.com/ansible-community/molecule/actions) [![Python Black Code Style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/python/black) [![Ansible Code of Conduct](https://img.shields.io/badge/Code%20of%20Conduct-silver.svg)](https://docs.ansible.com/ansible/latest/community/code_of_conduct.html) diff --git a/docs/ci.md b/docs/ci.md index 7fb815ef3..b9bcd31ce 100644 --- a/docs/ci.md +++ b/docs/ci.md @@ -340,11 +340,11 @@ pipeline { ## Tox -[Tox](https://tox.readthedocs.io/en/latest) is a generic virtualenv +[Tox](https://tox.wiki/en/latest/) is a generic virtualenv management, and test command line tool. -[Tox](https://tox.readthedocs.io/en/latest) can be used in conjunction +[Tox](https://tox.wiki/en/latest/) can be used in conjunction with -[Factors](http://tox.readthedocs.io/en/latest/config.html#factors-and-factor-conditional-settings) +[Factors](https://tox.wiki/en/latest/config.html#factors-and-factor-conditional-settings) and Molecule, to perform scenario tests. To test the role against multiple versions of Ansible. @@ -369,7 +369,7 @@ commands = To view the factor generated tox environments run `tox -l`. If using the [\--parallel -functionality](https://tox.readthedocs.io/en/latest/config.html#cmdoption-tox-p) +functionality](https://tox.wiki/en/latest/config.html#cmdoption-tox-p) of Tox (version 3.7 onwards), Molecule must be made aware of the parallel testing by setting a `MOLECULE_EPHEMERAL_DIRECTORY` environment variable per environment. In addition, we export a `TOX_ENVNAME` diff --git a/docs/contributing.md b/docs/contributing.md index b88b69325..7a8a8f281 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -6,9 +6,8 @@ group](https://github.com/ansible/community/wiki/molecule) if you would like to influence the direction of the project. - Join us in `#ansible-devtools` on - [libera.chat](https://web.libera.chat/?channel=#ansible-molecule) irc, - or [molecule-users - Forum](https://groups.google.com/forum/#!forum/molecule-users). + [libera.chat](https://web.libera.chat/?channel=#ansible-molecule) matrix/irc, + or [molecule discussions](https://github.com/ansible-community/molecule/discussions). - The full list of Ansible email lists and IRC channels can be found in the [communication page](https://docs.ansible.com/ansible/latest/community/communication.html). @@ -50,7 +49,7 @@ document. ## Testing Molecule has an extensive set of unit and functional tests. Molecule -uses [Tox](https://tox.readthedocs.io/en/latest/) factors to generate a +uses [Tox](https://tox.wiki/en/latest/) factors to generate a matrix of python x Ansible x unit/functional tests. Manual setup required as of this time. @@ -58,7 +57,7 @@ required as of this time. Tests will be skipped when the driver's binary is not present. -Install the test framework [Tox](https://tox.readthedocs.io/en/latest/). +Install the test framework [Tox](https://tox.wiki/en/latest/). ```bash $ python3 -m pip install tox diff --git a/docs/faq.md b/docs/faq.md index 396ddb26a..69e881511 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -57,7 +57,7 @@ the scenario's molecule.yml. ## Can I run Molecule processes in parallel? -Please see [parallel-usage-example](/examples.md/#docker-with-non-privileged-user) for +Please see [parallel-usage-example](examples.md#docker-with-non-privileged-user) for usage. ## Can I specify random instance IDs in my molecule.yml? @@ -97,7 +97,7 @@ Yes, roles contained in a [monorepo](https://en.wikipedia.org/wiki/Monorepo) with other roles are automatically picked up and `ANSIBLE_ROLES_PATH` is set accordingly. See [this -page](https://molecule.readthedocs.io/en/latest/examples/#monolith-repo) +page](examples.md#monolith-repo) for more information. ## How can I add development/testing-only dependencies? diff --git a/docs/getting-started.md b/docs/getting-started.md index 30c726f40..acfc73313 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -65,7 +65,7 @@ INSTALL.rst molecule.yml converge.yml verify.yml role. Molecule will invoke this playbook with `ansible-playbook` and run it against an instance created by the driver. - `verify.yml` is the Ansible file used for testing as Ansible is the - default [verifier](/configuration/#verifier). This allows you to + default [verifier](configuration.md#verifier). This allows you to write specific tests against the state of the container after your role has finished executing. Other verifier tools are available Note that [testinfra](https://testinfra.readthedocs.io/en/latest/) was the default verifier prior to molecule version 3. @@ -98,24 +98,24 @@ The `molecule.yml` is for configuring Molecule. It is a [YAML](https://yaml.org/) file whose keys represent the high level components that Molecule provides. These are: -- The [dependency](/configuration/#dependency) manager. Molecule +- The [dependency](configuration.md#dependency) manager. Molecule uses [galaxy development guide] by default to resolve your role dependencies. -- The [driver](/configuration/#driver) provider. Molecule uses +- The [driver](configuration.md#driver) provider. Molecule uses [Docker](https://docs.docker.com/) by default. Molecule uses the driver to delegate the task of creating instances. -- The [platforms](/configuration/#platforms) definitions. Molecule +- The [platforms](configuration.md#platforms) definitions. Molecule relies on this to know which instances to create, name and to which group each instance belongs. If you need to test your role against multiple popular distributions (CentOS, Fedora, Debian), you can specify that in this section. -- The [provisioner](/configuration/#provisioner). Molecule only +- The [provisioner](configuration.md#provisioner). Molecule only provides an Ansible provisioner. Ansible manages the life cycle of the instance based on this configuration. - The [scenario][] definition. Molecule relies on this configuration to control the scenario sequence order. -- The [verifier](/configuration/#verifier) framework. Molecule +- The [verifier](configuration.md#verifier) framework. Molecule uses Ansible by default to provide a way to write specific state checking tests (such as deployment smoke tests) on the target instance. diff --git a/docs/usage.md b/docs/usage.md index 454247cde..f3ff0bfa1 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -67,5 +67,5 @@ molecule list Matrix will display the subcommand's ordered list of actions, which can be changed in -[scenario](https://molecule.readthedocs.io/en/latest/configuration.html#scenario) +[scenario](configuration.md#scenario) configuration. diff --git a/linkcheckerrc b/linkcheckerrc new file mode 100644 index 000000000..1b0144110 --- /dev/null +++ b/linkcheckerrc @@ -0,0 +1,9 @@ +[filtering] +checkextern=1 +ignore= + xml.gz$ + 404.html + +[checking] +robotstxt=0 +localwebroot=./ diff --git a/mkdocs.yml b/mkdocs.yml index bd351767e..86ab5320d 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,6 +1,6 @@ --- site_name: Ansible Molecule -site_url: https://molecule.readthedocs.io/ +site_url: https://ansible.readthedocs.io/projects/molecule/ repo_url: https://github.com/ansible-community/molecule edit_uri: blob/main/docs/ copyright: Copyright © 2023 Red Hat, Inc. @@ -83,13 +83,8 @@ plugins: import: - url: https://docs.ansible.com/ansible/latest/objects.inv domains: [py, std, "std:doc", "std:label"] - # - https://virtualenv.pypa.io/en/latest/objects.inv - # - https://yamllint.readthedocs.io/en/latest/objects.inv - # - https://jinja.palletsprojects.com/objects.inv - url: https://pip.pypa.io/en/latest/objects.inv domains: [py, std] - # - https://docs.python.org/3/objects.inv - # - https://testinfra.readthedocs.io/en/latest/objects.inv markdown_extensions: - admonition diff --git a/tox.ini b/tox.ini index f795c55a3..f9187a361 100644 --- a/tox.ini +++ b/tox.ini @@ -106,6 +106,7 @@ passenv = * usedevelop = true commands = mkdocs build --strict + linkchecker -f linkcheckerrc site extras = docs