From: Alfredo Deza Date: Mon, 30 Nov 2015 19:11:30 +0000 (-0500) Subject: create a ceph-deploy-tag job X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f4784836ed73e67ef57a98708f0dfddc67744008;p=ceph-build.git create a ceph-deploy-tag job Signed-off-by: Alfredo Deza --- diff --git a/ceph-deploy-tag/build/build b/ceph-deploy-tag/build/build new file mode 100644 index 00000000..a8350371 --- /dev/null +++ b/ceph-deploy-tag/build/build @@ -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 index 00000000..05aaf262 --- /dev/null +++ b/ceph-deploy-tag/config/definitions/ceph-tag.yml @@ -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