Hello,

I have now configured a Hudson job building the Derby documentation.
It looks for changes in the repository once a week (currently late every Wednesday, can be changed :) ), and if a change has been made it will build the complete set of manuals.

Further, the output from the last successful build is published with static URL's:
http://hudson.zones.apache.org/hudson/job/Derby-docs/lastSuccessfulBuild/artifact/docs-out.tar.gz
http://hudson.zones.apache.org/hudson/job/Derby-docs/lastSuccessfulBuild/artifact/docs-out.md5

The tar contains the out directory, and the docs-out.md5 is simply the MD5 checksum of the tar. Committers can choose to set up a cron job on their people.apache.org account. I will provide a sample shell script that should do something like this: - At fixed intervals, check for a new version of the docs (for instance every Wednesday). This is done by fetching the MD5 checksum from Hudson and comparing it with the checksum for the docs already published. I think we can simply save the checksum file in /www/.../apache/docs/dev/.
- If the docs have changed, fetch the tar file from Hudson.
- Unpack the archive
- Do a few sanity checks.
- Copy the contents of out/ to /www/.../apache/docs/dev/
One must make sure write access is given to the db group here, and also that the permissions allow people to access the files over HTTP.

If people exercise a little care when deploying their cron jobs, this process should be pretty low impact, and you can have several committers ready to publish the docs.

Possible improvements:
- Build only the manuals that have actually changed.
  This makes the build date agree with the date of the last change.
- At least one more committer should apply for a Hudson login so that more people can kick off manual builds or fix problems in Hudson.
- Define the sanity checks.
  Simple ones: check archive size, make sure PDFs exist.
- Should the existing published files be deleted?
- Use local rsync instead of normal copy?


I noticed some file permission problems, but I have asked infra to correct those.
If you have questions, comments or concerns, please share them!


Regards,
--
Kristian

Reply via email to