Noticed via:
| *** Skipping pep8 checks as tool pep8 isn't present ***
| mkdir -p reports/source/functions ; /usr/bin/jdg-tap-checkbashism source/functions/host-summary > reports/source/functions/host-summary_checkbashism.tap ; /usr/bin/jdg-tap-perlcritic source/functions/host-summary > reports/source/functions/host-summary_perlcritic.tap ; /usr/bin/jdg-tap-shellcheck source/functions/host-summary > reports/source/functions/host-summary_shellcheck.tap ;
| File source/functions/host-summary doesn't look like perl [Bourne-Again shell script, Unicode text, UTF-8 text executable]. Ignoring.
| Error: file {} could not be read.
| *** Getting rid of empty files ***
We're invoking jdg-tap-tool-dispatcher with the -f ... option,
to pass a certain list of files that should be checked.
Our generated execution script from jdg-tap-tool-dispatcher
looks like this:
sed 's#^#source/#g' < /code/git.change | parallel -v -- \
mkdir -p reports'/'{//} ';' \
/usr/bin/jdg-tap-checkbashism '{}' '>' reports'/{}_checkbashism.tap' ';' \
/usr/bin/jdg-tap-perlcritic '{}' '>' reports'/{}_perlcritic.tap' ';' \
/usr/bin/jdg-tap-shellcheck '{}' '>' reports'/{}_shellcheck.tap' ';'
/usr/bin/jdg-tap-merge-conflict '{}' '>' reports'/{}_mergecheck.tap' ';'
So we try to invoke /usr/bin/jdg-tap-merge-conflict outside of the
actual parallel run, as the trailing '\' in the shellcheck command line
is missing.
So /usr/bin/jdg-tap-merge-conflict is invoked with literally '{}', and
therefore complaining with:
Error: file {} could not be read.
To avoid such a failure we need to end all jdp-* command lines with a
"\" to mark them for continuation in next line. Also let's add a
noop line to the end of the script to get valid code syntax. New
execution script now looks like this then:
sed 's#^#source/#g' < /code/git.change | parallel -v -- \
mkdir -p reports'/'{//} ';' \
/usr/bin/jdg-tap-checkbashism '{}' '>' reports'/{}_checkbashism.tap' ';' \
/usr/bin/jdg-tap-perlcritic '{}' '>' reports'/{}_perlcritic.tap' ';' \
/usr/bin/jdg-tap-shellcheck '{}' '>' reports'/{}_shellcheck.tap' ';' \
/usr/bin/jdg-tap-merge-conflict '{}' '>' reports'/{}_mergecheck.tap' ';' \
# EOF
While at it, fix comment regarding generated script (we execute the
generated script, not generate the executed script :)), and also fix
a shellcheck issue reported for tap/jdg-tap-tool-dispatcher:
| In tap/jdg-tap-tool-dispatcher line 12:
| if [ $? -ne 0 ]; then
| ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?.
Change-Id: I3c8a557712c1dad78c2404ea83e44ff281e077ac
Continuous Integration for Debian and Ubuntu made easy.
jenkins-debian-glue allows you to build Debian and Ubuntu packages
directly from the Jenkins Continuous Integration system.