Commit Graph

38 Commits

Author SHA1 Message Date
Quentin Schulz
7ed0c8a92f scripts: run-docs-build: factor out all bitbake branches building
master and master-next only differ from other branches by their output
directory name. Let's put everything in common and only have a check on
whether the branch is master or master-next and modify the output dir in
those cases.

Cc: Quentin Schulz <foss+yocto@0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-18 17:02:09 +00:00
Quentin Schulz
8273124feb Revert "scripts: run-docs-build: do not turn sphinx warnings into errors"
The patch was meant as a quick temporary work-around to have the docs
built and published.

Now that releases where -W flag is set (turning warnings into errors)
are appropriately patched to make those warnings disappear (on Sphinx
v3.2.1 which is the one used on the builder), this patch can be reverted
so that next time a warning appears the doc building will fail but will
not destroy the doc website (because of commit
6a4e6ef18d "scripts: run-docs-build: make
the script fail hard ASAP when there's an error", since rsync will not
be run if any error happens before).

This reverts commit 931d409b25.

Cc: Quentin Schulz <foss+yocto@0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-15 22:03:37 +00:00
Quentin Schulz
62e38ffaab scripts: run-docs-build: simplify patching logic
There's no need to keep a list of tags requiring to be patched since the
tag is part of the path where patches are stored.

Therefore, let's only check if there's a patch directory for a given tag
and if so, apply all patches in there.

Cc: Quentin Schulz <foss+yocto@0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-15 22:03:37 +00:00
Michael Halstead
ca8e95276d scripts: run-docs-build: patch releases with incorrect current version
Add patch for version 3.3.5 and move patches into a dedicated
subdirectrory to keep the scripts directory tidy.

Signed-off-by: Michael Halstead <mhalstead@linuxfoundation.org>
2022-03-02 22:39:04 -08:00
Richard Purdie
1ae547a4c8 config.json/run-docs-build: Update to new /srv path
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-24 11:13:19 +00:00
Michael Halstead
c84864eda9 scripts: run-docs-build: patch releases with incorrect current version
When current_version and all_versions are not updated before the release
build the tag will not build working docs. Make docs builds pull in
needed updates after the fact.

Signed-off-by: Michael Halstead <mhalstead@linuxfoundation.org>
2022-02-23 17:15:09 -08:00
Quentin Schulz
931d409b25 scripts: run-docs-build: do not turn sphinx warnings into errors
Default flags for sphinx-build contain -W which turns warnings into
errors. This is really helpful during debugging and could be used for
continuous integration though we do not have such a thing separate from
the continuous delivery in place currently. Nowadays, the docs files
served at docs.yoctoproject.com are actually removed before being
updated from the newly built docs. If the `html` target, a dependency of
`publish` target is failing, the docs aren't copied over to the `final`
temporary directory. Therefore it'll be missing in the rsync upload to
docs.yoctoproject.org.

Instead, let's disable the turning of warnings into errors so that the
`html` make target can finish successfully and the `publish` make target
to finish successfully too.

Cc: Quentin Schulz <foss+yocto@0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-23 16:23:35 +00:00
Quentin Schulz
6a4e6ef18d scripts: run-docs-build: make the script fail hard ASAP when there's an error
There are some intermittent issues with the script not publishing all
versions. So let's go extreme and fail the script if any error happens:
 - a command returns a non-zero code, even if piped,
 - a variable is used uninitialized,

This also makes the script print each and every command being run so we
have a better idea where the script struggles.

Cc: Quentin Schulz <foss+yocto@0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-23 16:23:35 +00:00
Richard Purdie
4fe90b7ae0 scripts/run-docs-build: Add comments so we can tell where warnings are from
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-22 22:31:00 +00:00
Michael Opdenacker
ce75f076e8 run-docs-build: fix checkout of releases.rst from master
A wrong path was given given the working directory.

Also revert the changes with "git reset --hard" to
have a clean state before further branch switches.

Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-01-25 16:54:39 +00:00
Michael Opdenacker
86d7ed6fe9 scripts/run-docs-build: make all versions list releases known to master
This allows all versions of Bitbake and Yocto Project manuals
to see the manuals for the latest versions.

This also simplifies the release process, not having to update the
releases.rst file for all releases every time a new release is made.

Note that such synchronization is already done for the
switchers.js file (but in a different way). This way, advertised
releases are in sync with switchers.js.

Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-12-08 22:00:05 +00:00
Michael Opdenacker
13457b72f4 scripts/run-docs-build: add comments
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-11-24 21:14:21 +00:00
Quentin Schulz
2b05713022 scripts: run-docs-build: patch yocto-3.3 and 3.4 releases
Both releases are missing an important patch that changes the displayed
version from dev to the appropriate release number.

This is confusing to the user and probably breaks some assumptions in
some scripts.

Ideally, the tags should have been moved with those patches applied to
their respective branch but that is not a git best practice so we're
stuck with this "hack" instead.

3.3.x releases aren't impacted as they got the patch applied.

Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-10-28 23:48:08 +01:00
Quentin Schulz
ed331e7405 scripts: run-docs-build: build latest BB and YP releases
honister and 1.52 Bitbake branch were recently released, so let's build
those too.

Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-10-28 23:48:08 +01:00
Nicolas Dechesne
a731359179 scripts/run-docs-build: add 'current' link when deploying docs
Make sure that https://docs.yoctoproject.org/current will always link
to the most recent release documentation.

Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-05-25 17:23:04 +01:00
Michael Halstead
89fd213eb4 run-docs-build: build from tags dynamically instead of static list
Build Sphinx docs for all versions newer than yocto-3.1.5 inclusive.
Integrate suggestions from Quentin Schulz and Nicolas Dechesne.

Signed-off-by: Michael Halstead <mhalstead@linuxfoundation.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-04-13 15:13:42 +01:00
Michael Halstead
8b8528f565 run-docs-build: add 3.2.3 release to docs build
Signed-off-by: Michael Halstead <mhalstead@linuxfoundation.org>
Reviewed-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
2021-04-06 11:30:20 -07:00
Nicolas Dechesne
35fcb5fa67 scripts/run-docs-build: build hardknott docs
The branches exist now, let's publish the corresponding docs.

Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-04-06 09:24:56 +01:00
Nicolas Dechesne
f2816b929f scripts/run-docs-build: publish docs for 3.1.6 and 3.2.2
Fixes: #14308

Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-03-25 21:28:08 +00:00
Nicolas Dechesne
1c44c0e0fd scripts/run-docs-build: add for loop when publishing tags/branches
Use for loop to avoid repeating the same pattern over and over.

Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-03-25 21:28:08 +00:00
Richard Purdie
241ae71c18 scripts/run-docs-build: Generate 3.2 docs as well
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-22 22:31:55 +00:00
Richard Purdie
9a34cc8120 scripts/run-docs-build: Generate 3.1.5 and 3.2.1 docs (at least for now)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-22 22:24:00 +00:00
Nicolas Dechesne
698743bdd6 run-docs-build: delete files on the server when publishing
run-docs-build rebuilds the entire doc website, so when we rsync the
output, we need to delete files no longer needed, this is especially
important when we move/rename pages, to avoid stale content.

Using rsync with "wildcards" was a problem in case a file/folder is
removed in the output dir, it won't be deleted.

Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-22 22:09:26 +00:00
Richard Purdie
56db25b673 run-docs-build: Enable sphinx docs for dunfell
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-04 10:57:59 +00:00
Richard Purdie
354b43fece scripts/run-docs-build: Further improve docs rsync flags
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-11-09 17:18:35 +00:00
Richard Purdie
b8c8ddac4a scripts/run-docs-build: Drop time rsync flag as we don't need that
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-11-09 16:55:42 +00:00
Richard Purdie
7958928739 scripts/run-docs-build: Improve docs rsync flags
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-11-09 16:26:14 +00:00
Richard Purdie
078d72fe0e scripts/run-docs-build: Fix typo in previous commit
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-11-09 16:03:12 +00:00
Richard Purdie
14d98490e9 scripts/run-docs-build: make target change needs different artefact copying
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-11-09 15:03:42 +00:00
Richard Purdie
c5860c6ef2 scripts/run-docs-build: Enable docs builds, remove dry run option to rsync
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-11-09 10:51:48 +00:00
Richard Purdie
2f423c5a07 scripts/run-docs-build: Use an archive copy of the docbook archives for efficiency
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-11-09 10:51:02 +00:00
Richard Purdie
761c27ad68 scripts/run-docs-build: Use make publissh target instead of html
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-11-09 10:48:01 +00:00
Richard Purdie
19b288977b scripts/run-docs-build: Ensure potentially stale _build is cleaned before build
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-11-06 15:05:26 +00:00
Richard Purdie
fba3c36389 scripts/run-docs-build: Publish gatesgarth to the correct location
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-11-06 15:04:23 +00:00
Richard Purdie
5d64a5d569 scripts/run-docs-build: Ensure switchers update affects gatesgarth too
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-11-06 15:04:03 +00:00
Richard Purdie
8288b27ac2 scripts/run-docs-build: Fix rsync paths and drop continue mode for wget
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-11-06 14:28:56 +00:00
Richard Purdie
f4a7a7a644 scripts/run-docs-build: First pass at building the various documentation branches
The script is suboptimal in many ways but is a start and gives us something to test
and improve upon.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-11-06 14:08:08 +00:00
Richard Purdie
590b045b34 scripts: Add run-docs-build as a wrapper around documentation building
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-11-05 12:59:27 +00:00