add devops deb packaging 67/5867/2
authorMike Marchetti <mmarchetti@sandvine.com>
Wed, 28 Feb 2018 18:50:20 +0000 (13:50 -0500)
committermarchettim <mmarchetti@sandvine.com>
Thu, 22 Mar 2018 17:56:39 +0000 (18:56 +0100)
Signed-off-by: Mike Marchetti <mmarchetti@sandvine.com>
debian/control [new file with mode: 0644]
devops-stages/stage-archive.sh [new file with mode: 0755]
devops-stages/stage-build.sh [new file with mode: 0755]
devops-stages/stage-test.sh [new file with mode: 0755]

diff --git a/debian/control b/debian/control
new file mode 100644 (file)
index 0000000..892d8c5
--- /dev/null
@@ -0,0 +1,12 @@
+Source: osm-devops
+Section: devel
+Priority: optional
+Maintainer: Michael Marchetti <mmarchetti@sandvine.com>
+Build-Depends: debhelper (>=9)
+Standards-Version: 3.9.6
+Homepage: http://osm.etsi.org
+
+Package: osm-devops
+Architecture: all
+Depends: ${misc:Depends}
+Description: Open Source MANO Devops utilities
diff --git a/devops-stages/stage-archive.sh b/devops-stages/stage-archive.sh
new file mode 100755 (executable)
index 0000000..e87b36f
--- /dev/null
@@ -0,0 +1,52 @@
+#!/bin/sh
+# Copyright 2018 Sandvine
+# All Rights Reserved.
+#
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+PKG_DIRECTORIES="jenkins installers systest juju-charms descriptor-packages tools"
+MDG_NAME=osm-devops
+DEB_INSTALL=debian/$MDG_NAME.install
+export DEBEMAIL="mmarchetti@sandvine.com"
+export DEBFULLNAME="Michael Marchetti"
+
+PKG_VERSION=$(git describe --tags --abbrev=0)
+PKG_VERSION_PREFIX=$(echo $PKG_VERSION | sed -e 's/v//g')
+PKG_VERSION_POST=$(git rev-list $PKG_VERSION..HEAD | wc -l)
+if [ "$PKG_VERSION_POST" -eq 0 ]; then
+    PKG_DIR="${MDG_NAME}-${PKG_VERSION_PREFIX}"
+else
+    PKG_DIR="${MDG_NAME}-$PKG_VERSION_PREFIX.post${PKG_VERSION_POST}"
+fi
+
+rm -rf $PKG_DIR
+rm -f *.orig.tar.xz
+rm -f *.deb
+rm $DEB_INSTALL
+mkdir -p $PKG_DIR
+
+for dir in $PKG_DIRECTORIES; do
+    ln -s $PWD/$dir $PKG_DIR/.
+    echo "$dir/* usr/share/$MDG_NAME/$dir" >> $DEB_INSTALL
+done
+cp -R debian $PKG_DIR/.
+
+cd $PKG_DIR
+dh_make -y --indep --createorig --a -c apache
+dpkg-buildpackage -uc -us -tc -rfakeroot 
+cd -
+
+rm -rf pool
+rm -rf dists
+mkdir -p pool/$MDG_NAME
+mv *.deb pool/$MDG_NAME/
diff --git a/devops-stages/stage-build.sh b/devops-stages/stage-build.sh
new file mode 100755 (executable)
index 0000000..1a24852
--- /dev/null
@@ -0,0 +1 @@
+#!/bin/sh
diff --git a/devops-stages/stage-test.sh b/devops-stages/stage-test.sh
new file mode 100755 (executable)
index 0000000..1a24852
--- /dev/null
@@ -0,0 +1 @@
+#!/bin/sh