]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-build.git/commitdiff
create a ceph-deploy-tag job
authorAlfredo Deza <adeza@redhat.com>
Mon, 30 Nov 2015 19:11:30 +0000 (14:11 -0500)
committerAlfredo Deza <adeza@redhat.com>
Mon, 30 Nov 2015 19:11:30 +0000 (14:11 -0500)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
ceph-deploy-tag/build/build [new file with mode: 0644]
ceph-deploy-tag/config/definitions/ceph-tag.yml [new file with mode: 0644]

diff --git a/ceph-deploy-tag/build/build b/ceph-deploy-tag/build/build
new file mode 100644 (file)
index 0000000..a835037
--- /dev/null
@@ -0,0 +1,31 @@
+#!/bin/bash
+
+set -ex
+
+if [ "$TAG" = false ] ; then
+    echo "Assuming tagging process has succeeded before because TAG was set to false"
+    exit 0
+fi
+
+# 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
+
+# The setup for this job ensures that a copy of ceph-build will be available
+# for this script
+
+# 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 --exists-action=i --download-directory="$PIP_SDIST_INDEX" ansible
+    venv/bin/pip install --find-links="file://$PIP_SDIST_INDEX" --no-index ansible
+fi
+
+# run ansible to do all the tagging and release specifying
+# a local connection and 'localhost' as the host where to execute
+cd "$WORKSPACE/ceph-build/ansible/"
+ansible-playbook -i "localhost," -c local release.yml --extra-vars="version=$VERSION branch=$BRANCH release=stable clean=true project=ceph-deploy"
diff --git a/ceph-deploy-tag/config/definitions/ceph-tag.yml b/ceph-deploy-tag/config/definitions/ceph-tag.yml
new file mode 100644 (file)
index 0000000..05aaf26
--- /dev/null
@@ -0,0 +1,52 @@
+- scm:
+    name: ceph-build
+    scm:
+      - git:
+          url: https://github.com/ceph/ceph-build.git
+          browser: auto
+          timeout: 20
+          skip-tag: true
+          wipe-workspace: true
+          basedir: "ceph-build"
+
+- job:
+    name: ceph-deploy-tag
+    description: "This job clones ceph-deploy and sets the right version from the tag, pushing back to ceph-deploy.git"
+    display-name: 'ceph-deploy-tag'
+    logrotate:
+      daysToKeep: -1
+      numToKeep: 25
+      artifactDaysToKeep: -1
+      artifactNumToKeep: -1
+    block-downstream: false
+    block-upstream: false
+    properties:
+      - github:
+          url: https://github.com/ceph/ceph-deploy
+
+    parameters:
+      - string:
+          name: BRANCH
+          description: "The git branch (or tag) to build"
+          default: "master"
+      - string:
+          name: VERSION
+          description: "The version for release, e.g. 1.5.30"
+    scm:
+      - ceph-build
+
+    wrappers:
+      - ssh-agent-credentials:
+          users:
+            # "jenkins-build" SSH key, needed so we can push to
+            # ceph-deploy.git
+            - '39fa150b-b2a1-416e-b334-29a9a2c0b32d'
+
+    builders:
+      - shell:
+          !include-raw ../../build/build
+
+    wrappers:
+      - inject-passwords:
+          global: true
+          mask-password-params: true