]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
nfs-ganesha: add validate scripts for each distro 637/head
authorAli Maredia <amaredia@redhat.com>
Tue, 21 Feb 2017 19:35:13 +0000 (14:35 -0500)
committerAli Maredia <amaredia@redhat.com>
Tue, 21 Feb 2017 19:35:13 +0000 (14:35 -0500)
Signed-off-by: Ali Maredia <amaredia@redhat.com>
nfs-ganesha/build/setup [new file with mode: 0644]
nfs-ganesha/build/setup_deb [deleted file]
nfs-ganesha/build/setup_rpm [deleted file]
nfs-ganesha/build/validate_deb [new file with mode: 0644]
nfs-ganesha/build/validate_rpm [new file with mode: 0644]
nfs-ganesha/config/definitions/nfs-ganesha.yml

diff --git a/nfs-ganesha/build/setup b/nfs-ganesha/build/setup
new file mode 100644 (file)
index 0000000..78c61c2
--- /dev/null
@@ -0,0 +1,53 @@
+#! /usr/bin/bash
+#
+# Ceph distributed storage system
+#
+# Copyright (C) 2016 Red Hat <contact@redhat.com>
+#
+# Author: Boris Ranto <branto@redhat.com>
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License, or (at your option) any later version.
+#
+
+set -ex
+
+# Make sure we execute at the top level directory before we do anything
+cd $WORKSPACE
+
+# This will set the DISTRO and MOCK_TARGET variables
+get_distro_and_target
+
+# Perform a clean-up
+cd $WORKSPACE/nfs-ganesha
+git clean -fxd
+
+cd $WORKSPACE/nfs-ganesha-debian
+git clean -fxd
+
+# Make sure the dist directory is clean
+cd $WORKSPACE
+rm -rf dist
+mkdir -p dist
+
+# Print some basic system info
+HOST=$(hostname --short)
+echo "Building on $(hostname) with the following env"
+echo "*****"
+env
+echo "*****"
+
+export LC_ALL=C # the following is vulnerable to i18n
+
+pkgs=( "chacractl>=0.0.4" )
+install_python_packages "pkgs[@]"
+
+NFS_GANESHA_BRANCH=`branch_slash_filter $NFS_GANESHA_BRANCH`
+CEPH_BRANCH=`branch_slash_filter $CEPH_BRANCH`
+
+# ask shaman which chacra instance to use
+chacra_url=`curl -f -u $SHAMAN_API_USER:$SHAMAN_API_KEY https://shaman.ceph.com/api/nodes/next/`
+# create the .chacractl config file using global variables
+make_chacractl_config $chacra_url
diff --git a/nfs-ganesha/build/setup_deb b/nfs-ganesha/build/setup_deb
deleted file mode 100644 (file)
index 160c8a3..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-#! /usr/bin/bash
-#
-# Ceph distributed storage system
-#
-# Copyright (C) 2016 Red Hat <contact@redhat.com>
-#
-# Author: Boris Ranto <branto@redhat.com>
-#
-#  This library is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU Lesser General Public
-#  License as published by the Free Software Foundation; either
-#  version 2.1 of the License, or (at your option) any later version.
-#
-
-set -ex
-
-# Only do actual work when we are a DEB distro
-if test "$DISTRO" != "debian" -a "$DISTRO" != "ubuntu"; then
-    exit 0
-fi
-
-# Make sure we execute at the top level directory before we do anything
-cd $WORKSPACE
-
-# This will set the DISTRO and MOCK_TARGET variables
-get_distro_and_target
-
-# Perform a clean-up
-cd $WORKSPACE/nfs-ganesha
-git clean -fxd
-
-cd $WORKSPACE/nfs-ganesha-debian
-git clean -fxd
-
-# Make sure the dist directory is clean
-cd $WORKSPACE
-rm -rf dist
-mkdir -p dist
-
-# Print some basic system info
-HOST=$(hostname --short)
-echo "Building on $(hostname) with the following env"
-echo "*****"
-env
-echo "*****"
-
-export LC_ALL=C # the following is vulnerable to i18n
-
-pkgs=( "chacractl>=0.0.4" )
-install_python_packages "pkgs[@]"
-
-NFS_GANESHA_BRANCH=`branch_slash_filter $NFS_GANESHA_BRANCH`
-CEPH_BRANCH=`branch_slash_filter $CEPH_BRANCH`
-
-# ask shaman which chacra instance to use
-chacra_url=`curl -f -u $SHAMAN_API_USER:$SHAMAN_API_KEY https://shaman.ceph.com/api/nodes/next/`
-# create the .chacractl config file using global variables
-make_chacractl_config $chacra_url
diff --git a/nfs-ganesha/build/setup_rpm b/nfs-ganesha/build/setup_rpm
deleted file mode 100644 (file)
index ef217fa..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-#! /usr/bin/bash
-#
-# Ceph distributed storage system
-#
-# Copyright (C) 2016 Red Hat <contact@redhat.com>
-#
-# Author: Boris Ranto <branto@redhat.com>
-#
-#  This library is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU Lesser General Public
-#  License as published by the Free Software Foundation; either
-#  version 2.1 of the License, or (at your option) any later version.
-#
-
-set -ex
-
-# Only do actual work when we are an RPM distro
-if test "$DISTRO" != "fedora" -a "$DISTRO" != "centos" -a "$DISTRO" != "rhel"; then
-    exit 0
-fi
-
-# Make sure we execute at the top level directory before we do anything
-cd $WORKSPACE
-
-# This will set the DISTRO and MOCK_TARGET variables
-get_distro_and_target
-
-# Perform a clean-up
-cd $WORKSPACE/nfs-ganesha
-git clean -fxd
-
-cd $WORKSPACE/nfs-ganesha-debian
-git clean -fxd
-
-# Make sure the dist directory is clean
-cd $WORKSPACE
-rm -rf dist
-mkdir -p dist
-
-# Print some basic system info
-HOST=$(hostname --short)
-echo "Building on $(hostname) with the following env"
-echo "*****"
-env
-echo "*****"
-
-export LC_ALL=C # the following is vulnerable to i18n
-
-pkgs=( "chacractl>=0.0.4" )
-install_python_packages "pkgs[@]"
-
-NFS_GANESHA_BRANCH=`branch_slash_filter $NFS_GANESHA_BRANCH`
-CEPH_BRANCH=`branch_slash_filter $CEPH_BRANCH`
-
-# ask shaman which chacra instance to use
-chacra_url=`curl -f -u $SHAMAN_API_USER:$SHAMAN_API_KEY https://shaman.ceph.com/api/nodes/next/`
-# create the .chacractl config file using global variables
-make_chacractl_config $chacra_url
diff --git a/nfs-ganesha/build/validate_deb b/nfs-ganesha/build/validate_deb
new file mode 100644 (file)
index 0000000..0322b47
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/bash
+set -ex
+
+# Only do actual work when we are a DEB distro
+if test -f /etc/redhat-release ; then
+    exit 0
+fi
diff --git a/nfs-ganesha/build/validate_rpm b/nfs-ganesha/build/validate_rpm
new file mode 100644 (file)
index 0000000..17b4148
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/bash
+set -ex
+
+# only do work if we are a RPM distro
+if [[ ! -f /etc/redhat-release && ! -f /usr/bin/zypper ]] ; then
+    exit 0
+fi
index d7de8e4978577d62467e925e546cf632fe1f607c..9aba05c519731ca8350bf96444df0be579a3f95b 100644 (file)
@@ -119,14 +119,16 @@ If this is checked, then the binaries will be built and pushed to chacra even if
       # debian build scripts
       - shell:
           !include-raw:
+            - ../../build/validate_deb
             - ../../../scripts/build_utils.sh
-            - ../../build/setup_deb
+            - ../../build/setup
             - ../../build/build_deb
       # rpm build scripts
       - shell:
           !include-raw:
+            - ../../build/validate_rpm
             - ../../../scripts/build_utils.sh
-            - ../../build/setup_rpm
+            - ../../build/setup
             - ../../build/build_rpm
 
     publishers: