Support testing of gerrit changes to manifest 91/55291/4
authorGary Wu <gary.i.wu@huawei.com>
Fri, 22 Jun 2018 20:48:50 +0000 (13:48 -0700)
committerGary Wu <gary.i.wu@huawei.com>
Mon, 25 Jun 2018 17:46:10 +0000 (10:46 -0700)
Change-Id: I4a928c562cb56847f500d2b44eb8284caf3df550
Issue-ID: INT-532
Signed-off-by: Gary Wu <gary.i.wu@huawei.com>
deployment/heat/onap-oom/onap-oom.yaml
deployment/heat/onap-oom/rancher_vm_entrypoint.sh
test/ete/scripts/teardown-onap.sh

index 1a217c2..8cd8169 100644 (file)
@@ -35,6 +35,18 @@ parameters:
     type: string
     description: Content for integration_override.yaml
 
+  gerrit_branch:
+    type: string
+    default: "master"
+
+  gerrit_refspec:
+    type: string
+    default: "refs/heads/master"
+
+  docker_manifest:
+    type: string
+    default: "docker-manifest.csv"
+
 resources:
   random-str:
     type: OS::Heat::RandomString
@@ -136,6 +148,9 @@ resources:
             __apt_proxy__: { get_param: apt_proxy }
             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
             __integration_override_yaml__: { get_param: integration_override_yaml }
+            __gerrit_branch__: { get_param: gerrit_branch }
+            __gerrit_refspec__: { get_param: gerrit_refspec }
+            __docker_manifest__: { get_param: docker_manifest }
             __oam_network_id__: { get_resource: oam_network }
             __oam_subnet_id__: { get_resource: oam_subnet }
             __k8s_1_vm_ip__: { get_attr: [k8s_1_floating_ip, floating_ip_address] }
index 0490b6a..578cb51 100644 (file)
@@ -16,6 +16,9 @@ echo "__rancher_ip_addr__" > /opt/config/rancher_ip_addr.txt
 echo "__k8s_vm_ips__" > /opt/config/k8s_vm_ips.txt
 echo "__oam_network_id__" > /opt/config/oam_network_id.txt
 echo "__oam_subnet_id__" > /opt/config/oam_subnet_id.txt
+echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
+echo "__gerrit_refspec__" > /opt/config/gerrit_refspec.txt
+echo "__docker_manifest__" > /opt/config/docker_manifest.txt
 
 cat <<EOF > /opt/config/integration-override.yaml
 __integration_override_yaml__
@@ -189,12 +192,26 @@ git config --global log.decorate auto
 
 # Clone OOM:
 cd ~
-git clone -b master http://gerrit.onap.org/r/oom
+git clone -b master https://gerrit.onap.org/r/oom
 cd oom
 git log -1
 git tag -a "deploy0" -m "initial deployment"
 git checkout -b workarounds
 
+# Clone integration
+cd ~
+git clone -b __gerrit_branch__ https://gerrit.onap.org/r/integration
+cd integration
+git fetch https://gerrit.onap.org/r/integration __gerrit_refspec__
+git checkout FETCH_HEAD
+
+cd version-manifest/src/main/scripts
+./update-oom-image-versions.sh ../resources/__docker_manifest__ ~/oom/
+
+cd ~/oom
+git diff
+
+
 # Run ONAP:
 cd ~/oom/kubernetes/
 helm init --client-only
index 3a40cfa..9080e20 100755 (executable)
@@ -6,20 +6,6 @@ fi
 
 source $WORKSPACE/test/ete/scripts/install_openstack_cli.sh
 
-# skip use of multi-vim APIs for now
-# delete all Proxy Designate DNS records; do this first since we rely on multi-vim for this
-# $WORKSPACE/test/ete/scripts/dns-zones/delete-dns-zones.sh $OS_PROJECT_NAME
-# sleep 1
-
-# delete all Desigate DNS zones belonging to this project
-ZONES=$(openstack zone list -c "id" -f value)
-for ZONE in ${ZONES}; do
-    ZONE_PROJECT_ID=$(openstack zone show $ZONE -f json | jq -r '.project_id')
-    if [ "$OS_PROJECT_ID" == "$ZONE_PROJECT_ID" ]; then
-        openstack zone delete $ZONE
-    fi
-done
-
 # delete all instances
 openstack server delete $(openstack server list -c ID -f value)
 sleep 1