aboutsummaryrefslogtreecommitdiffstats
path: root/version-manifest/src
diff options
context:
space:
mode:
authorHelen Chen <helen.chen@huawei.com>2018-05-09 22:15:21 +0000
committerGerrit Code Review <gerrit@onap.org>2018-05-09 22:15:21 +0000
commit25411be2640bd9d76fd8c2ea1dcad15fbbc7aeb3 (patch)
tree636c962e3d8ee4ba01ff67bb0bc9b34804527a8b /version-manifest/src
parent5da781e6b4ec9f4afe489bc92a61831c4536dcd6 (diff)
parent64c540bd168c463f1bb1ba08b7c1a803eee24fcb (diff)
Merge "Add script to sync heat template from manifest"
Diffstat (limited to 'version-manifest/src')
-rwxr-xr-xversion-manifest/src/main/scripts/add-images-from-oom.sh (renamed from version-manifest/src/main/scripts/merge-oom-images.sh)4
-rwxr-xr-xversion-manifest/src/main/scripts/check-sorted.sh7
-rwxr-xr-xversion-manifest/src/main/scripts/update-heat-image-versions.sh20
-rwxr-xr-xversion-manifest/src/main/scripts/update-oom-image-versions.sh8
4 files changed, 30 insertions, 9 deletions
diff --git a/version-manifest/src/main/scripts/merge-oom-images.sh b/version-manifest/src/main/scripts/add-images-from-oom.sh
index 248bc331c..f7207701f 100755
--- a/version-manifest/src/main/scripts/merge-oom-images.sh
+++ b/version-manifest/src/main/scripts/add-images-from-oom.sh
@@ -1,8 +1,8 @@
#!/bin/bash
if [ "$#" -ne 2 ]; then
- echo This script adds docker images that exist in OOM helm charts into docker-manifest.csv
- echo "$0 <docker-manifest.csv> <oom directory>"
+ echo This script adds new docker images from OOM helm charts into docker-manifest.csv
+ echo "$0 <docker-manifest.csv> <oom repo directory>"
exit 1
fi
diff --git a/version-manifest/src/main/scripts/check-sorted.sh b/version-manifest/src/main/scripts/check-sorted.sh
index fa120f399..70ca5ac04 100755
--- a/version-manifest/src/main/scripts/check-sorted.sh
+++ b/version-manifest/src/main/scripts/check-sorted.sh
@@ -1,4 +1,11 @@
#!/bin/bash
+
+if [ "$#" -ne 1 ]; then
+ echo This script checks the input file to verify that it is sorted
+ echo "$0 <manifest.csv>"
+ exit 1
+fi
+
LC_ALL=C sort -c $1
retval=$?
if [ $retval -ne 0 ]; then
diff --git a/version-manifest/src/main/scripts/update-heat-image-versions.sh b/version-manifest/src/main/scripts/update-heat-image-versions.sh
new file mode 100755
index 000000000..19415bb12
--- /dev/null
+++ b/version-manifest/src/main/scripts/update-heat-image-versions.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+if [ "$#" -ne 2 ]; then
+ echo This script updates HEAT docker versions to use versions in docker-manifest.csv
+ echo "$0 <docker-manifest.csv> <demo repo directory>"
+ exit 1
+fi
+
+# expected parameters
+MANIFEST=$(realpath $1)
+DEMO_DIR=$(realpath $2)
+
+if [ -z "$WORKSPACE" ]; then
+ export WORKSPACE=`git rev-parse --show-toplevel`
+fi
+
+cd $DEMO_DIR/heat/ONAP
+
+source <(./manifest-to-env.sh < $MANIFEST)
+envsubst < onap_openstack_template.env > onap_openstack.env
diff --git a/version-manifest/src/main/scripts/update-oom-image-versions.sh b/version-manifest/src/main/scripts/update-oom-image-versions.sh
index eba847841..1a82b490d 100755
--- a/version-manifest/src/main/scripts/update-oom-image-versions.sh
+++ b/version-manifest/src/main/scripts/update-oom-image-versions.sh
@@ -2,7 +2,7 @@
if [ "$#" -ne 2 ]; then
echo This script updates OOM helm charts to use versions in docker-manifest.csv
- echo "$0 <docker-manifest.csv> <oom directory>"
+ echo "$0 <docker-manifest.csv> <oom repo directory>"
exit 1
fi
@@ -14,12 +14,6 @@ if [ -z "$WORKSPACE" ]; then
export WORKSPACE=`git rev-parse --show-toplevel`
fi
-DIR=$(dirname $(readlink -f "$0"))
-TARGET_DIR=$DIR/target
-rm -rf $TARGET_DIR
-mkdir -p $TARGET_DIR
-cd $TARGET_DIR
-
cd $OOM_DIR/kubernetes
for line in $(tail -n +2 $MANIFEST); do