Bug#255: SOL006 Jenkins build is broken

The current run of Jenkins is broken as described in bug#255. The run always returns success, even though it is clear that the run did not complete successfully. While this merge request addresses the data that is used in the run, the script needs tweaking for it to return error when the run fails.

Edited by jethanandani

Merge request reports

Loading
+3 −2
Changes for example-data/nfv-nsd.xml: 3 added lines, 2 removed lines.
Original line number Diff line number Diff line
<nsd xmlns="urn:etsi:nfv:yang:etsi-nfv-nsd">
<?xml version="1.0" encoding="UTF-8"?>
<nfv xmlns="urn:etsi:nfv:yang:etsi-nfv-descriptors">
  <vnfd>
    <id>ASA</id>
    <provider>My Company</provider>
@@ -133,4 +134,4 @@
      </ns-instantiation-level>
    </df>
  </nsd>
</config>
</nfv>
+5 −3
Changes for .jenkins.sh: 5 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -16,16 +16,18 @@ CMT=$(git rev-parse --short HEAD)
docker build --tag "$IMG" .
docker run "$IMG"

verdict=$?

echo "Building HTML tree"
docker run -v"$(pwd)/src/yang/:/yang/" mjethanandani/pyang \
	"/bin/sh" -c "cd /yang/ && pyang -f jstree -p /yang/ \
	/yang/etsi-nfv.yang > etsi-nfv.html"
	/yang/etsi-nfv-descriptors.yang > etsi-nfv.html"

sed -r -i 's|<a href=\"http://www.tail-f.com">|<a href="http://etsi.org">|g' src/yang/etsi-nfv.html
sed -r -i 's|data\:image/gif\;base64,R0lGODlhS.*RCAA7|https://www.etsi.org/images/ETSILogoTwitter.png\" height=\"100|g' src/yang/etsi-nfv.html

sed -r -i "s|<div class=\"app\">|<p>Commit: <a href=\"https://forge.etsi.org/gitlab/nfv/SOL006/commit/${CMT}\">$CMT</a>, Build:<a href=\"$BUILD_URL\">$BUILD_NUMBER</a></p><div class=\"app\">|g" src/yang/etsi-nfv.html
sed -r -i "s|<div class=\"app\">|<p>Commit: <a href=\"https://forge.etsi.org/rep/nfv/SOL006/commit/${CMT}\">$CMT</a>, Build:<a href=\"$BUILD_URL\">$BUILD_NUMBER</a></p><div class=\"app\">|g" src/yang/etsi-nfv.html


exit $?
exit $verdict
−15

File deleted.

+23
Changes for LICENSE: 23 added lines, 0 removed lines.
Original line number Diff line number Diff line
Copyright 2019 ETSI

Redistribution and use in source and binary forms, with or without 
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, 
   this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, 
   this list of conditions and the following disclaimer in the documentation 
   and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors 
   may be used to endorse or promote products derived from this software without 
   specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 
OF THE POSSIBILITY OF SUCH DAMAGE.
 No newline at end of file
Loading