From 373f45f84402a6ad33347d03409dadb0d1e27411 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Mon, 6 Aug 2012 12:28:19 -0700 Subject: [PATCH] Add jobs to publish gerritbot tarballs/to pypi. Gerritbot should be installable via pip. To make this possible add jobs to publish gerritbot tarballs and push gerritbot to pypi when tags are added to gerritbot. Change-Id: I5de346cd96a096809c9fe44d2117ebdb45a180c4 Reviewed-on: https://review.openstack.org/10910 Approved: James E. Blair Reviewed-by: James E. Blair Tested-by: Jenkins --- .../files/projects/openstack/gerritbot.yml | 70 +++++++++++++++++++ .../openstack_project/files/zuul/layout.yaml | 4 ++ 2 files changed, 74 insertions(+) diff --git a/modules/jenkins_jobs/files/projects/openstack/gerritbot.yml b/modules/jenkins_jobs/files/projects/openstack/gerritbot.yml index 48b2469824..802eca6c56 100644 --- a/modules/jenkins_jobs/files/projects/openstack/gerritbot.yml +++ b/modules/jenkins_jobs/files/projects/openstack/gerritbot.yml @@ -89,3 +89,73 @@ scm: assignednode: node: 'precise' + +--- +# tarball +main: + name: 'gerritbot-tarball' + review_site: 'review.openstack.org' + github_org: 'openstack-ci' + project: 'gerritbot' + concurrent: 'true' + timeout: 20 + timeout_fail: true + +logrotate: + daysToKeep: 28 + numToKeep: -1 + artifactDaysToKeep: -1 + artifactNumToKeep: -1 + +triggers: + - zuul_post + +builders: + - gerrit_git_prep + - shell: | + #!/bin/bash -xe + BRANCH=$GERRIT_REFNAME + BRANCH_PATH=`echo $BRANCH | tr / -` + + tox -v -evenv python setup.py sdist upload + cp dist/* dist/gerritbot-$BRANCH_PATH.tar.gz + +post_build_actions: + - tarball: + site: 'ci.openstack.org' + project: 'gerritbot' + +scm: + scm: 'false' + +assignednode: + node: 'precise' + +--- +# pypi-upload +main: + name: 'gerritbot-pypi' + review_site: 'review.openstack.org' + github_org: 'openstack-ci' + project: 'gerritbot' + concurrent: 'true' + timeout: 20 + timeout_fail: true + +triggers: + - zuul_post + +builders: + - gerrit_git_prep + - shell: tox -v -evenv python setup.py sdist upload + +post_build_actions: + - tarball: + site: 'ci.openstack.org' + project: 'gerritbot' + +scm: + scm: 'false' + +assignednode: + node: 'pypi' diff --git a/modules/openstack_project/files/zuul/layout.yaml b/modules/openstack_project/files/zuul/layout.yaml index 56ee321852..b9f986c381 100644 --- a/modules/openstack_project/files/zuul/layout.yaml +++ b/modules/openstack_project/files/zuul/layout.yaml @@ -106,6 +106,10 @@ projects: - gate-gerritbot-merge: - gate-gerritbot-pep8 - gate-gerritbot-pyflakes + post: + - gerritbot-tarball + publish: + - gerritbot-pypi - name: openstack-ci/gerritlib check: