--- /dev/null
+#!/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"
--- /dev/null
+- 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