aboutsummaryrefslogtreecommitdiffstats
path: root/version-manifest/src
diff options
context:
space:
mode:
authorGary Wu <gary.i.wu@huawei.com>2018-05-09 15:04:32 -0700
committerGary Wu <gary.i.wu@huawei.com>2018-05-09 15:04:32 -0700
commit64c540bd168c463f1bb1ba08b7c1a803eee24fcb (patch)
tree9fe2896b3a436965566eb5e6028484fd6d538380 /version-manifest/src
parentb8a8ccd85b022503db1aa0691ed1047269fb0757 (diff)
Add script to sync heat template from manifest
Also clean up other helper scripts Change-Id: Icae9cac8c6e9e3cef5e52e66bf79d6c30d23d235 Issue-ID: INT-495 Signed-off-by: Gary Wu <gary.i.wu@huawei.com>
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