Updating the website after a release
Most steps are the same for all releases, although some details may vary. There are several cases:
-
A single repository release, such as
camel-kafka-connector
. -
A set of separately versioned repositories, such as
camel-k
,camel-k-runtime
, andcamel-kamelets
. -
The set of main
camel
andcamel-spring-boot
which are versioned together.
Changes in the content repositories may be done as part of release preparation, or later. Changes in the camel-website
antora-playbook.yml
can be supplied in a PR at any time but should be merged only after the release is voted on and approved.
We’ll use the notation <repo short name>:<path>
to indicate the file to be changed. For instance, camel:docs/components/antora.yml
for the docs/components/antora.yml
component descriptor in the main camel repository, in whatever branch is under discussion.
After the new release, branches are created in all affected content repositories
These will always be branches from main
. Changes to all the new branches, e.g. camel-3.13.x
, will be necessary. The changes are almost the same whether the new branch is LTS or not.
Changes to the new branches (e.g. camel-3.13.x
) in affected content repositories
-
Examine the
content:sources
key of thecamel-website:antora-playbook.yml
and locate the URLs of the repositories. -
For each URL, locate the
start_path
orstart_paths
key. -
For each start path entry, locate the
antora.yml
component descriptor at that path in the new branch in the repository. For each Antora component, exactly one of the associated component descriptors will have additional information beyond the name and version. The version will need to be updated in all associated component descriptors, and the additional information only in the one containing it. The primary component descriptor, having been duplicated frommain
, will specify versionnext
and related properties, and will look something like this:name: camel-kafka-connector title: Camel Kafka Connector version: next prerelease: true display-version: Next (Pre-release) nav: - modules/ROOT/nav.adoc asciidoc: attributes: camel-version: 3.12.x camel-k-runtime-version: 1.8.0 camel-kamelets-version: 0.3.0 prerelease: true
-
Set the version to the documentation version for the new release, e.g.
0.11.0
. -
Remove the top level
prerelease
key. -
If the new release is LTS, set the
display-version
appropriately, e.g.0.11.0 (LTS)
: otherwise remove thedisplay-version
key. -
Consider the versions listed in
asciidoc/attributes
. These represent the other camel subprojects this one depends on.-
For subprojects outside the current release set, these will not change on release.
-
For subprojects in the same release set, such as
camel
andcamel-spring-boot
, these versions will need to be updated to refer to the new version of the other subproject.
-
-
Remove
prerelease
fromasciidoc/attributes
. -
If the release is LTS, add an
lts
attribute specifying the date out of service. -
Find the
source-map.yml
file next to theantora.yml
component descriptor. It will look something like this:- require: '@djencks/antora-source-map' # log_level: trace source-map: - url: 'https://github.com/apache/camel-kamelets.git' mapped-url: './../camel-kamelets' branches: - branch: main mapped-branch: HEAD
Change the
- branch: main
to specify the branch being released, e.g.- branch: 0.6.x
. -
Build each project (e.g.
mvn clean install -Pfastinstall
) and check for generated changes that need to be committed (or undone if there are tooling problems). -
There will also be
local-build.sh
,source-map.yml
, andsource-watch.yml
files in the docs directory of the subproject. These files support local partial builds of the subproject. Insource-map.yml
, change thebranch
value frommain
to the new git branch name for the release.
Since the branches with these changes have not yet been added to the Antora playbook, they may be kept on a PR fork/branch or merged into the release branch locally or in the repository.
Playbook changes
These changes must go through a PR before being merged, and it is highly advisable to build the website locally to check for problems.
-
As in the previous section, examine the
content:sources
key of thecamel-website:antora-playbook.yml
and locate the URLs of the repositories. -
Under
branches
add the new branch directly undermain
, so the branches appear in reverse chronological order, newest first. Note that this is the git branch name, which is related to but usually not identical to the Antora component version. -
Consult these local build instructions.
-
Consult these instructions for creating a documentation PR. Note that your
camel-website
PR will definitely need to be merged after removing thesource-map
extension configuration used to preview the website changes.
Removing obsolete component versions
After each release, it may be possible to remove old versions of the documentation from subprojects. This depends on whether any current versions of other subprojects depend on the old subproject versions.
The experimental approach is to remove the old branches from the playbook and build the site. If there are errors from broken xrefs pointing to the removed version, put them back.
You can also examine the component descriptors of older versions of subprojects that depend on the current subproject, but it is not obvious how to determine which these are without looking at all of them.