mirror of
https://github.com/ovh/the-bastion.git
synced 2025-11-12 08:11:35 +08:00
Merge pull request #95 from speed47/autogenerated
chore: checks_basic: verify that autogenerated doc is up to date
This commit is contained in:
commit
d40bfc8897
9 changed files with 28 additions and 15 deletions
15
.github/workflows/tests_basic.yml
vendored
15
.github/workflows/tests_basic.yml
vendored
|
|
@ -4,12 +4,12 @@ on: [push, pull_request]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
name: perlcritic, perltidy & shellcheck
|
name: perlcritic, perltidy, shellcheck, doc
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: install prerequisites
|
- name: install prerequisites
|
||||||
run: sudo apt update && sudo apt install -y shellcheck libperl-critic-perl perltidy
|
run: sudo ./bin/admin/packages-check.sh -i -d
|
||||||
env:
|
env:
|
||||||
DEBIAN_FRONTEND: noninteractive
|
DEBIAN_FRONTEND: noninteractive
|
||||||
- name: shellcheck
|
- name: shellcheck
|
||||||
|
|
@ -18,3 +18,14 @@ jobs:
|
||||||
run: bin/dev/perl-critic.sh
|
run: bin/dev/perl-critic.sh
|
||||||
- name: perl tidy
|
- name: perl tidy
|
||||||
run: bin/dev/perl-tidy.sh test
|
run: bin/dev/perl-tidy.sh test
|
||||||
|
- name: autogenerate documentation
|
||||||
|
run: make -C doc/sphinx autogenerated
|
||||||
|
- name: verify git diff
|
||||||
|
run: |
|
||||||
|
if [ "$(git diff --numstat | wc -l)" != 0 ]; then
|
||||||
|
git diff
|
||||||
|
echo
|
||||||
|
echo "Some autogenerated documentation files are not up to date." >&2
|
||||||
|
echo "Please run 'make -C doc/sphinx autogenerated' and commit the result." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,9 @@ BUILDDIR = _build
|
||||||
VERSION_FILES = conf.py installation/basic.rst
|
VERSION_FILES = conf.py installation/basic.rst
|
||||||
VERSION := $(shell perl -e 'require "../../lib/perl/OVH/Bastion.pm"; print $$OVH::Bastion::VERSION')
|
VERSION := $(shell perl -e 'require "../../lib/perl/OVH/Bastion.pm"; print $$OVH::Bastion::VERSION')
|
||||||
|
|
||||||
all: plugins default
|
all: autogenerated default
|
||||||
|
|
||||||
|
autogenerated: plugins
|
||||||
|
|
||||||
default: Makefile
|
default: Makefile
|
||||||
@sed -i -e "s/__VERSION__/$(VERSION)/g" $(VERSION_FILES)
|
@sed -i -e "s/__VERSION__/$(VERSION)/g" $(VERSION_FILES)
|
||||||
|
|
@ -25,7 +27,7 @@ help:
|
||||||
plugins:
|
plugins:
|
||||||
@bash build-plugins-help.sh
|
@bash build-plugins-help.sh
|
||||||
|
|
||||||
.PHONY: help Makefile plugins all
|
.PHONY: help Makefile plugins all autogenerated default
|
||||||
|
|
||||||
# Catch-all target: route all unknown targets to Sphinx using the new
|
# Catch-all target: route all unknown targets to Sphinx using the new
|
||||||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@ cat >>"$pluginindex" <<EOF
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
for section in $(find doc/sphinx/plugins -mindepth 1 -maxdepth 1 -type d)
|
for section in $(find doc/sphinx/plugins -mindepth 1 -maxdepth 1 -type d | LC_ALL=C sort)
|
||||||
do
|
do
|
||||||
indexfile="$section/index.rst"
|
indexfile="$section/index.rst"
|
||||||
section=$(basename "$section")
|
section=$(basename "$section")
|
||||||
|
|
@ -78,7 +78,7 @@ do
|
||||||
.. toctree::
|
.. toctree::
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
for plugin in $(find doc/sphinx/plugins/$section -type f -name "*.rst" ! -name "index.rst" | sort)
|
for plugin in $(find doc/sphinx/plugins/$section -type f -name "*.rst" ! -name "index.rst" | LC_ALL=C sort)
|
||||||
do
|
do
|
||||||
echo " $(basename $plugin .rst)" >> "$indexfile"
|
echo " $(basename $plugin .rst)" >> "$indexfile"
|
||||||
done
|
done
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,8 @@ Bastion plugins
|
||||||
.. toctree::
|
.. toctree::
|
||||||
|
|
||||||
admin/index.rst
|
admin/index.rst
|
||||||
|
group-aclkeeper/index.rst
|
||||||
group-gatekeeper/index.rst
|
group-gatekeeper/index.rst
|
||||||
restricted/index.rst
|
|
||||||
group-owner/index.rst
|
group-owner/index.rst
|
||||||
open/index.rst
|
open/index.rst
|
||||||
group-aclkeeper/index.rst
|
restricted/index.rst
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ Launch a remote command on several machines sequentially (clush-like)
|
||||||
|
|
||||||
.. option:: --no-pause-on-failure
|
.. option:: --no-pause-on-failure
|
||||||
|
|
||||||
Don't pause if the remote command doesn't return failed (returned != 0)
|
Don't pause if the remote command failed (returned exit code != 0)
|
||||||
|
|
||||||
.. option:: --no-confirm
|
.. option:: --no-confirm
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,8 @@ open plugins
|
||||||
batch
|
batch
|
||||||
clush
|
clush
|
||||||
groupInfo
|
groupInfo
|
||||||
groupListPasswords
|
|
||||||
groupList
|
groupList
|
||||||
|
groupListPasswords
|
||||||
groupListServers
|
groupListServers
|
||||||
help
|
help
|
||||||
info
|
info
|
||||||
|
|
|
||||||
|
|
@ -6,16 +6,16 @@ restricted plugins
|
||||||
|
|
||||||
accountAddPersonalAccess
|
accountAddPersonalAccess
|
||||||
accountCreate
|
accountCreate
|
||||||
accountDelete
|
|
||||||
accountDelPersonalAccess
|
accountDelPersonalAccess
|
||||||
|
accountDelete
|
||||||
accountGeneratePassword
|
accountGeneratePassword
|
||||||
accountGrantCommand
|
accountGrantCommand
|
||||||
accountInfo
|
accountInfo
|
||||||
|
accountList
|
||||||
accountListAccesses
|
accountListAccesses
|
||||||
accountListEgressKeys
|
accountListEgressKeys
|
||||||
accountListIngressKeys
|
accountListIngressKeys
|
||||||
accountListPasswords
|
accountListPasswords
|
||||||
accountList
|
|
||||||
accountMFAResetPassword
|
accountMFAResetPassword
|
||||||
accountMFAResetTOTP
|
accountMFAResetTOTP
|
||||||
accountModify
|
accountModify
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ realmInfo
|
||||||
==========
|
==========
|
||||||
|
|
||||||
Display information about a bastion realm
|
Display information about a bastion realm
|
||||||
==========================================
|
=========================================
|
||||||
|
|
||||||
|
|
||||||
.. admonition:: usage
|
.. admonition:: usage
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,8 @@
|
||||||
selfAddPersonalAccess
|
selfAddPersonalAccess
|
||||||
======================
|
======================
|
||||||
|
|
||||||
Remove a personal server access from an account
|
Add a personal server access on your account
|
||||||
===============================================
|
============================================
|
||||||
|
|
||||||
|
|
||||||
.. admonition:: usage
|
.. admonition:: usage
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue