requirements allows you to insert arbitrary links (name and URL) in the xml report. It was placed in miscellanea/submission-resources to avoid maintaining resources "the old way", with the downside that, as you observed, if the files it depends on are not present, it will barf and cause inconsistent results. This is mostly cosmetic because all the other dependencies of submission-resources will run; and that's the whole point, other than that, we don't really care about submission-resources itself.
For correctness and to avoid confusion, requirements resource should NOT exit with failure if the file it tries to read doesn't exist.
command: if [ -f $PLAINBOX_SESSION_SHARE/requirements_docs.txt ]; then cat $PLAINBOX_SESSION_SHARE/requirements_docs.txt; else true; fi
Using if/then/else/fi is needed because just adding ||true at the end of the original command will not fail if the file *exists* but is unreadable (if cat blahblah returns error).
requirements allows you to insert arbitrary links (name and URL) in the xml report. It was placed in miscellanea/ submission- resources to avoid maintaining resources "the old way", with the downside that, as you observed, if the files it depends on are not present, it will barf and cause inconsistent results. This is mostly cosmetic because all the other dependencies of submission- resources will run; and that's the whole point, other than that, we don't really care about submission- resources itself.
For correctness and to avoid confusion, requirements resource should NOT exit with failure if the file it tries to read doesn't exist.
The command for the requirements job is:
command: [ -f $PLAINBOX_ SESSION_ SHARE/requireme nts_docs. txt ] && cat $PLAINBOX_ SESSION_ SHARE/requireme nts_docs. txt
This can change to:
command: if [ -f $PLAINBOX_ SESSION_ SHARE/requireme nts_docs. txt ]; then cat $PLAINBOX_ SESSION_ SHARE/requireme nts_docs. txt; else true; fi
Using if/then/else/fi is needed because just adding ||true at the end of the original command will not fail if the file *exists* but is unreadable (if cat blahblah returns error).