}
parse_yaml() {
-python - <<PYP
-#!/usr/bin/python
-from __future__ import print_function
+python3 - <<PYP
+#!/usr/bin/python3
import yaml
import sys
with open("${1}", 'r') as f:
values = yaml.load(f, Loader=yaml.SafeLoader)
-
enabled = filter(lambda x: values[x].get('enabled', False) == True, values)
print(' '.join(enabled))
PYP
else
>&2 echo -e \n" !!! ${1} sybsystem does not exist !!!"\n
fi
- helm template "${SUBSYS_DIR}" | grep 'image:\ \|tag_version:\ \|h._image' |
+ helm template --set global.masterPassword=TemplatePassword -f ${PROJECT_DIR}/values.yaml "${SUBSYS_DIR}" | grep 'image:\ \|tag_version:\ \|h._image' |
sed -e 's/^.*\"h._image\"\ :\ //; s/^.*\"\(.*\)\".*$/\1/' \
-e 's/\x27\|,//g; s/^.*\(image\|tag_version\):\ //' | tr -d '\r'
}
elif [ -z "${LIST}" ]; then
mkdir -p ${LISTS_DIR}
LIST="${LISTS_DIR}/${PROJECT}_docker_images.list"
+else
+ # $2 is not empty - ensure LIST path exists
+ LIST_DIR="$(dirname ${LIST})"
+ mkdir -p "${LIST_DIR}"
+ MSG="${LIST_DIR} didn't exist, created\n"
fi
if [ -e "${LIST}" ]; then
fi
# Setup helm
-if pgrep -x "helm" > /dev/null; then
+if ps -eaf | grep -v "grep" | grep "helm" > /dev/null; then
echo "helm is already running"
else
helm init -c > /dev/null
helm serve &
+ helm repo remove stable 2>/dev/null || true
fi
# Create helm repository
if ! helm repo list 2>&1 | awk '{ print $1, $2 }' | grep -q "$HELM_REPO" > /dev/null; then
- helm repo add "$HELM_REPO"
+ helm repo add $HELM_REPO
fi
# Make all
pushd "${PROJECT_DIR}/.."
echo "Building project..."
+export SKIP_LINT=TRUE
make all > /dev/null; make ${PROJECT} > /dev/null
popd
echo "Creating the list..."
if [ "${PROJECT}" == "onap" ]; then
COMMENT="OOM commit $(git --git-dir="${PROJECT_DIR}/../../.git" rev-parse HEAD)"
- for subsystem in `parse_yaml "${PROJECT_DIR}/values.yaml"`; do
+ for subsystem in `parse_yaml "${PROJECT_DIR}/resources/overrides/onap-all.yaml"`; do
create_list ${subsystem}
done | sort -u > ${LIST}
else