From 2b029d748b34966a109514086e7ccead2e724d0b Mon Sep 17 00:00:00 2001 From: Alfredo Deza Date: Mon, 23 May 2016 16:24:39 -0400 Subject: [PATCH] create a job to deploy mita Signed-off-by: Alfredo Deza --- mita-deploy/build/build | 10 ++++ .../config/definitions/mita-deploy.yml | 48 +++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 mita-deploy/build/build create mode 100644 mita-deploy/config/definitions/mita-deploy.yml diff --git a/mita-deploy/build/build b/mita-deploy/build/build new file mode 100644 index 00000000..5596f3c6 --- /dev/null +++ b/mita-deploy/build/build @@ -0,0 +1,10 @@ +#!/bin/bash + +set -ex + +# the following two methods exist in scripts/build_utils.sh +pkgs=( "ansible" ) +install_python_packages "pkgs[@]" + +cd "$WORKSPACE/deploy/playbooks/" +$VENV/ansible-playbook -i "jenkins.ceph.com," deploy.yml --extra-vars="branch=$BRANCH jenkins_prado_token=$JENKINS_PRADO_TOKEN prado_token=$PRADO_TOKEN" diff --git a/mita-deploy/config/definitions/mita-deploy.yml b/mita-deploy/config/definitions/mita-deploy.yml new file mode 100644 index 00000000..158b3948 --- /dev/null +++ b/mita-deploy/config/definitions/mita-deploy.yml @@ -0,0 +1,48 @@ +- scm: + name: mita + scm: + - git: + url: https://github.com/ceph/mita.git + branches: + - master + browser: auto + timeout: 20 + skip-tag: true + wipe-workspace: true + +- job: + name: mita-build + description: "This job clones mita and deploys it to its production server based on the BRANCH value" + display-name: 'mita-build' + logrotate: + daysToKeep: -1 + numToKeep: 25 + artifactDaysToKeep: -1 + artifactNumToKeep: -1 + block-downstream: false + block-upstream: false + properties: + - github: + url: https://github.com/ceph/mita + + parameters: + - string: + name: BRANCH + description: "The git branch (or tag) to build, defaults to 'master'" + default: "master" + scm: + - mita + + triggers: + - github + + builders: + - shell: + !include-raw: + - ../../../scripts/build_utils.sh + - ../../build/build + + wrappers: + - inject-passwords: + global: true + mask-password-params: true -- 2.47.3