escaping xmllint on a jenkins slave

23 views
Skip to first unread message

sandorh...@gmail.com

unread,
Mar 22, 2016, 9:51:02 AM3/22/16
to Jenkins Users
The following code works fine from a bash script ( ./test.sh ):

export test=$(xmllint --xpath 'string(//*[local-name()="widget"]/@androidversionCode)' config.xml)

echo $test


How do I put it into Jenkins "execute shell" command? There is either some syntax problem or it returns an empty string.  I would like to get the 209, just like in the command line.


The config.xml looks something like:

<?xml version='1.0' encoding='utf-8'?>

<widget id="com.example.application" version="1.2.8" androidversionCode="209" iosCFBundleVersion="209" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">

    <name>Application name</name>

    <description>Application description</description>

</widget>

Reply all
Reply to author
Forward
0 new messages