projects
/
osm
/
devops.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added try catch for pipeline script
[osm/devops.git]
/
descriptor-packages
/
tools
/
generate_descriptor_pkg.sh
diff --git
a/descriptor-packages/tools/generate_descriptor_pkg.sh
b/descriptor-packages/tools/generate_descriptor_pkg.sh
index
336cd8f
..
704f77f
100755
(executable)
--- a/
descriptor-packages/tools/generate_descriptor_pkg.sh
+++ b/
descriptor-packages/tools/generate_descriptor_pkg.sh
@@
-43,7
+43,7
@@
VNFD_FOLDERS=(images scripts icons charms cloud_init)
# Supported folders for NSD
# OSM document specifies (ns|vnf)-config folder, while Rel 4.3
# is using (ns|vnf)_config.
# Supported folders for NSD
# OSM document specifies (ns|vnf)-config folder, while Rel 4.3
# is using (ns|vnf)_config.
-NSD_FOLDERS=(scripts icons ns_config vnf_config)
+NSD_FOLDERS=(scripts
charms
icons ns_config vnf_config)
# Other files allowed in the descriptor base directory
ALLOWED_FILES=(README)
# Other files allowed in the descriptor base directory
ALLOWED_FILES=(README)
@@
-256,7
+256,6
@@
EOF
eth=$(($i))
cat >>$desc_file <<EOF
- name: vnf-cp${eth}
eth=$(($i))
cat >>$desc_file <<EOF
- name: vnf-cp${eth}
- type: ${CP_TYPE}
EOF
done
EOF
done
@@
-791,6
+790,14
@@
if [ $CREATE == false ]; then
fi
cd $BASE_DIR
fi
cd $BASE_DIR
+ # Mrityunjay Yadav: Validate descriptor
+ GEN_BASEDIR=$(dirname "$0")
+ python $GEN_BASEDIR/validate_descriptor.py $DEST_DIR/$PKG/$descriptor
+ if [ $? -ne 0 ]; then
+ rc=$?
+ echo "ERROR: validating descriptor for $PKG ($rc)" >&2
+ exit $rc
+ fi
if [ $DRY_RUN == false ]; then
if [ $VERBOSE == true ]; then
tar zcvf "$DEST_DIR/$PKG.tar.gz" "${PKG}" ${RM}
if [ $DRY_RUN == false ]; then
if [ $VERBOSE == true ]; then
tar zcvf "$DEST_DIR/$PKG.tar.gz" "${PKG}" ${RM}