]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
rename build to setup script
authorAlfredo Deza <adeza@redhat.com>
Wed, 24 Jun 2015 16:20:35 +0000 (12:20 -0400)
committerAlfredo Deza <adeza@redhat.com>
Wed, 24 Jun 2015 16:57:51 +0000 (12:57 -0400)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
ceph-deploy-pull-requests/build/build [deleted file]
ceph-deploy-pull-requests/build/setup [new file with mode: 0644]

diff --git a/ceph-deploy-pull-requests/build/build b/ceph-deploy-pull-requests/build/build
deleted file mode 100644 (file)
index dd345e4..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/bash
-
-set -ex
-
-# Create the virtualenv
-virtualenv venv
-. venv/bin/activate
-
-# Define and ensure the PIP cache
-PIP_SDIST_INDEX="$HOME/.cache/pip"
-mkdir -p $PIP_SDIST_INDEX
-
-# Define and ensure a GIT Ansible cache
-REPO_CACHE="$HOME/.cache/git/ceph-build"
-mkdir -p $REPO_CACHE
-
-# Clone the ceph-build repo or pull if it exists
-if [ -d "$REPO_CACHE/.git" ]; then
-    cd "$REPO_CACHE" && git pull
-    cd -
-else
-    git clone https://github.com/ceph/ceph-build.git "$REPO_CACHE"
-fi
-
-# Install the package by trying with the cache first, otherwise doing a download only, and then
-# trying to install from the cache again.
-if ! venv/bin/pip install --find-links="file://$PIP_SDIST_INDEX" --no-index ansible; then
-    venv/bin/pip install --download-directory="$PIP_SDIST_INDEX" ansible
-    venv/bin/pip install --find-links="file://$PIP_SDIST_INDEX" --no-index ansible
-fi
-
-# run ansible to get this current host to meet our requirements, specifying
-# a local connection and 'localhost' as the host where to execute
-cd "$REPO_CACHE/ceph-deploy-pull-requests/setup/playbooks"
-ansible-playbook -i "localhost," -c local setup.yml
diff --git a/ceph-deploy-pull-requests/build/setup b/ceph-deploy-pull-requests/build/setup
new file mode 100644 (file)
index 0000000..dd345e4
--- /dev/null
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+set -ex
+
+# Create the virtualenv
+virtualenv venv
+. venv/bin/activate
+
+# Define and ensure the PIP cache
+PIP_SDIST_INDEX="$HOME/.cache/pip"
+mkdir -p $PIP_SDIST_INDEX
+
+# Define and ensure a GIT Ansible cache
+REPO_CACHE="$HOME/.cache/git/ceph-build"
+mkdir -p $REPO_CACHE
+
+# Clone the ceph-build repo or pull if it exists
+if [ -d "$REPO_CACHE/.git" ]; then
+    cd "$REPO_CACHE" && git pull
+    cd -
+else
+    git clone https://github.com/ceph/ceph-build.git "$REPO_CACHE"
+fi
+
+# Install the package by trying with the cache first, otherwise doing a download only, and then
+# trying to install from the cache again.
+if ! venv/bin/pip install --find-links="file://$PIP_SDIST_INDEX" --no-index ansible; then
+    venv/bin/pip install --download-directory="$PIP_SDIST_INDEX" ansible
+    venv/bin/pip install --find-links="file://$PIP_SDIST_INDEX" --no-index ansible
+fi
+
+# run ansible to get this current host to meet our requirements, specifying
+# a local connection and 'localhost' as the host where to execute
+cd "$REPO_CACHE/ceph-deploy-pull-requests/setup/playbooks"
+ansible-playbook -i "localhost," -c local setup.yml