Add a new odl-openstack-install macro 04/67404/2
authorThanh Ha <thanh.ha@linuxfoundation.org>
Sun, 21 Jan 2018 23:56:25 +0000 (18:56 -0500)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Mon, 22 Jan 2018 00:53:26 +0000 (19:53 -0500)
Creates a reusable macro for getting openstack cli installed.

Change-Id: I9ebcd9a9d6e338ef5d5b3c58d70d4af42bc128ea
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
jjb/odl-openstack-install.sh [new file with mode: 0644]
jjb/releng-macros.yaml

diff --git a/jjb/odl-openstack-install.sh b/jjb/odl-openstack-install.sh
new file mode 100644 (file)
index 0000000..adf7d92
--- /dev/null
@@ -0,0 +1,20 @@
+#!/bin/bash
+# SPDX-License-Identifier: EPL-1.0
+##############################################################################
+# Copyright (c) 2017, 2018 The Linux Foundation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+##############################################################################
+# Installs the openstack cli to /tmp/v/openstack
+echo "---> Install openstack cli into /tmp/v/openstack"
+
+virtualenv "/tmp/v/openstack"
+# shellcheck source=/tmp/v/openstack/bin/activate disable=SC1091
+source "/tmp/v/openstack/bin/activate"
+pip install --upgrade pip
+pip install --upgrade python-openstackclient python-heatclient
+pip install --upgrade pipdeptree
+pipdeptree
index 1a69611b45a805154832ed23c8440ddf53a3677d..fbbb0c86aff1411a4c1120a7c641332566e91f7f 100644 (file)
           send-to:
             - recipients
 
+
+- builder:
+    # Installs the openstack cli into a virtualenv at /tmp/v/openstack
+    name: odl-openstack-install
+    builders:
+      - shell: !include-raw: odl-openstack-install.sh
+
 - builder:
     # Deploys a maven site to Nexus using lftools nexus-zip command
     name: opendaylight-infra-deploy-maven-site