listing a Jenkins CI folder recursively

First I wrote this as a Shell script …

  • calling XMLStarlet resp. SaxonHE (for XPath)
  • and curl (for retrieving the Jenkins details as XML files).
$ …/jenkins_find_jobs.sh https://integration.wikimedia.org/ci
folder           …
freeStyleProject …
matrixProject    …

The listing is quite helpful for documentational purposes.

I was really proud on my little achievement then.

At one stage I wanted to exercise XQuery with SaxonHE a little, so I replaced the XMLStarlet command line with SaxonHE XQuery command lines. And it works quite fine.

Utopia:

Once I know how to retrieve URLs from within XQuery, the Shell script will get replaced with a true XQuery script – as opposed to single, simple XPath expressions (a rather basic form of XQuery). Then the XQuery approach will outperform the Shell+XMLStarlet approach.


Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.