One of our eventual website tasks is to set up an automatically updated "generate the doxygen docs" process that runs the "make dox" target whenever the tree is updated.
Right now the doxygen output only get sporadic attention, but there's actually been a fair bit of work put into it over the years.
i could have tried to help with website stuff but i can only do website stuff in python
it's long since been on our to-do for someone to get doxygen output set up on the website. getting it set up is rarely ever a problem. keeping it updated has been a challenge. would be nice if jenkins did it for us.
should i try?
making a doxygen generated online documentation?
you're certainly welcome to, it would be quite helpful.
the way I would think best to set it up is as a Jenkins job at ci.brlcad.org
I believe you already have an account
i would want to keep the generated output somewhere. so is there a way in jenkins to do that?
yeah, I think it's all in how the job is set up - there's always an active workspace
I think the job can have file copy or random shell script phases too
i will try to do that. if i get any problems i will tell you.
looks like this is a tutorial: http://dnaeon.github.io/building-projects-documentation-with-jenkins-and-doxygen/
that uses a doxygen plugin and a web publshing plugin
yea
looks like this plugin would be an alternative possibility, or perhaps useful for the other doc/ products: https://plugins.jenkins.io/doclinks/
we can also set up a job on the server that copies files into the web root if needed, but looks like jenkins might be able to handle it
i should "install without a restart" i think
as i can see a job running
should i?
install what? plugins?
you can interrupt it all you need to
yea
kill jobs, whatever
it's fine
ok
the main build job is presently failing about 50% of the time right now anyways when it gets to our unit tests because of some obscure semaphore/threading issue on freebsd that we haven't solved yet
so don't be discouraged if you see that the build failed.
if you check the log, you'll see it is usually during testing and it'll say Aborted, Failed, or something similar in the middle of "make regress"
(deleted)
how are you triggering the builds?
"make dox"
The builds are triggered automatically on commit. Jenkins watches the repository.
which option to use for that?
Oh, you mean Jenkins - sorry. Yeah, it monitors the repo automatically if you provide it with the URL
you can trigger a build manually in jenkins too
ah, I see -- you created a new project
starseeker said:
Oh, you mean Jenkins - sorry. Yeah, it monitors the repo automatically if you provide it with the URL
i dont have to choose anything from this area? image.png
yeah, select "Build after other projects are built"
and select the BRL-CAD project
trigger even if the build fails?
we should probably break up that main BRL-CAD project into a source checkout project, a compile-it project, and a test it project
doxygen can probably be set to run with/without the build actually succeeding or tests passing
ok then
i am choosing that option
only thing it'll be missing is libbu's mime types... which we can think about later
hmm
does this look ok? image.png
don't know.
depends what your current working directory is (could add a pwd or ls -la in there and then check the log)
learn something new every day. actually didn't know about -B ! that can be used to reduce our onboarding docs by one step...
i learnt that option while trying to configure cmake within atom
I don't think it existed when we got started...
might be new then
should have added ls -la :face_palm:
it is probably cloning directly into the workspace
should i make a directory to checkout the repo?
should i use -j4 while using cmake --build?
i mean is it safe or will it cause problem for other builds?
I don't think we want multiple checkouts just because that's a lot of filesystem strain and delay, and it adds no value
ok then
so i just need to make the target dox
for this job?
that's why that " run this when the other project completes" option is good - when it completes, the sources should be in that project's workspace.
i can use that build's resources if i want
i would run cmake again in your own workspace just for good measure, but yeah -- then run "make dox"
it seems like it is going to checkout the svn repo everytime it is built
is there an option to not checkout the repo if it is already present
well yeah, you turned on Subversion
set that to "None"
it's getting it's sources from the BRL-CAD project
will configure after this build
Sean said:
it's getting it's sources from the BRL-CAD project
what?
there are two projects: "online-docgen" and another named "BRL-CAD"
you are saying i can use the sources from the "BRL-CAD" project
the "BRL-CAD" one is already checking out from Subversion, so you can configure the "online-docgen" one to use "BRL-CAD" project's files instead of also checking it out
that's what that "Build after other projects are built" implies
it's just probably in a workspace path next to where "online-docgen" has its workspace
so should i copy the sources from the "BRL-CAD" workspace to the "online-docgen"
(so it'd be something like mkdir build && cmake -B build -S ../BRL-CAD/workspace/... or something
Sean said:
(so it'd be something like mkdir build && cmake -B build -S ../BRL-CAD/workspace/... or something
let me configure it then
I wouldn't bother copying them
take a look at the "BRL-CAD" project, look at the "Build" section
might help you figure out what you need in yours
and a bit more readable ;)
i am making a conditional step to see if there is a build directory. if there is a build directory, then it will not trigger mkdir build
you have any other ideas?
that sounds great
it made the previous build fail
that's akin to what I was suggesting that we should break up the "BRL-CAD" project into one that doesn't do testing, just checks out sources. another one can run testing. I think there's a way to do this all within one project too using pipelines, but I'm not that familiar with Jenkins yet.
At least for doxygen 1.8.17, r77031 seems to clear the warnings.
waiting for the brlcad project build to end
@Sean i built the dox target but it seems a bit off
the index.html seems a bit off
How so?
Screenshot-from-2020-09-02-01-51-33.png
this is from jenkins build
Screenshot-from-2020-09-02-01-52-29.png
this is from my build
check for yourself
https://ci.brlcad.org/status/job/online-docgen/ws/build/doc/doxygen_output/html/index.html
yeah, clearly some feature of doxygen isn't getting enabled, perhaps due to relative paths or current working directory. can you check the log?
it clearly did work, as can be seen in other paths: https://ci.brlcad.org/status/job/online-docgen/ws/build/doc/doxygen_output/html/annotated.html
yea
Sean said:
yeah, clearly some feature of doxygen isn't getting enabled, perhaps due to relative paths or current working directory. can you check the log?
which one?
I saw that happen once with my local build too, actually - chromium displayed it, but firefox didn't want to. Not sure why.
looking at the page source gives clues
Screen-Shot-2020-09-01-at-4.29.36-PM.png
looks like the menu is dynamically generated
check stackoverflow for that error. has to be common.
yep, looks like it's this: https://stackoverflow.com/questions/34315723/jenkins-error-blocked-script-execution-in-url-because-the-documents-frame
see if you can do anything about that
i cant understand the solution
what it tells to follow
but i understand what has happened
jenkins apparently has a security setting that prevents javascript and css from loading
yea
so either we disable it, or (better) ignore it and deploy it outside of jenkins
the intent isn't to view from within jenkins
where can we deploy it?
anywhere on brlcad.org
I think best might be something like brlcad.org/api or brlcad.org/docs/api
which one sounds better?
heh, looks like we were previously using brlcad.org/docs/doxygen-r######
yea
i used it once
there's a couple doxygens there now, a bit out of date
but the revision number was out of date
yeah, it's about 5000 commits out of date
its best for brlcad.org/api or brlcad.org/docs/api
lets go with the latter to keep docs grouped
yea
so how to deploy it there?
I created the dir, so just have to figure out how to safely deploy
what are the possible ways to deploy?
option 1) almost certainly can just have a build rule that copies the files from the workspace to the web directory;
can be a post-build action
option 2) use a plugin that has a deploy/copy rule (and presumably with smarts on how to copy more safely/smartly)
right, post-build action would be option 1
custom script or the same rule that runs make dox even
those are all opt1
option 3) use a job on the server that pulls from jenkins periodically
3 is the old way and isn't obvious so lets try to avoid that one
for option2 will this work? -> https://plugins.jenkins.io/publish-over-ssh/
overkill -- jenkins is on the same host
doesn't need to ssh
i didnt know about that so i suggested it
looks like there's a copy artifacts step
in post build action?
https://plugins.jenkins.io/copyartifact/
it seems like it can be used to copy artifacts from one project to another
will it work for the deployment?
I don't see why not
it can either be added to this project to deploy or we can have another "deploy api" project that does the copy from this one
I don't see why it can't be added to an existing though
that said, might be nice to separate deployment into its own project
lets keep this project only for generating docs
agreed
that way a deployment project can focus on just deployment like deploying the docs that got built during "make docs" earlier
yea
you set up the deployment project
I'm currently working on the github permissions
then what to do for the deployment
like what are the steps?
the docgen job is set up
enable the plugin, create a deployment project just like you did for the online-docgen project, then tell it to copy to [path_i'll_send_in_pm]
the copy artifact plugin you mean?
yeah
should i keep it to "trigger if build is stable"?
I guess, I don't know what stable means
can you check up on the error?
what error?
ERROR: Failed to copy artifacts from online-docgen with filter: build/doc/doxygen_output/html/*
i might have to go to sleep after this last attempt
so if you can please check up on the error if you can
I did, that link looks like the fix
either didn't specify workspace or need to archive in the online-docgen project
what time is it for you?
2 38 am
nice!
please see up on the error
i have to go to sleep now
have a last exam tomorrow
okay, I'll see if I can once I get done with github here
this is excellent work
actual doxygen progress!
and thank you for your work on this, it's great
no problem
I think I'll break out the testing from the compilation afterwards too
just doing this so that future contributors can find at least some api reference online and not build it locally
and checkout from compile
Its giving errors from the copy artifact plugin
Something about accesdenied
ah, right
the web root is owned by the webserver and a different user
hmmmmmmm
let me try this
try again
made jenkins the group
upgrading all plugins
So what is left to do?
(deleted)
@Sean The API documentation is live on brlcad.org/docs/api
It will be automatically deployed after every revision from now
@Sumagna Das It seems like some of the links aren't working?
https://brlcad.org/docs/api/dd/d89/group__vmath.html
I think I messed up the directory structure
Its all in one directory
Don't know how to fix it
brlcad.org/docs/api/group__vmath.html
See
Any ideas how to fix this?
working on it @Sumagna Das ... you got it super close
the problem is the "Files to archive" option that saves the doxygen output in online-docgen is stashing archive/build/doc/doxygen_output/html ... i.e., the whole path specified, not the matching pattern
that gets copied in the deployment phase, so it' installing into the web root as doc/api/build/doc/doxygen_output/html ...
what a pain in the culo...
the artifact archiving system sucks. it appears to only copy the whole tree, no matter how I specify it. and if I flatten, it will only flatten the whole hierarchy.
there doesn't seem to be a general copy mechanism -- it assumes/wants single files or to copy trees exactly as they are in a workspace.
so I modified the test to result in exactly the dir it needs to install into brlcad.org/docs (i.e., api) and now it's working
Its working now
Its not in brlcad.org/docs but in brlcad.org/docs/api
It installs "api" into brlcad.org/docs, thus brlcad.org/docs/api :)
Good luck on your exam @Sumagna Das !
and thanks again. awesome to see doxygen up and running again in what will hopefully be a more sustainable way now
Sean said:
It installs "api" into brlcad.org/docs, thus brlcad.org/docs/api :smile:
ooh
Last updated: Jan 09 2025 at 00:46 UTC