22 Commits

Author SHA1 Message Date
Jenkins
753837e3bd Merge "Fetch tag refs from zuul in gerrit-git-prep" 2014-03-30 23:23:18 +00:00
Jeremy Stanley
8bc51a6007 Fetch tag refs from zuul in gerrit-git-prep
* gerrit-git-prep.sh: If the zuul ref is a tag, then fetch the tag
from zuul. Otherwise there's a risk that it may not have replicated
to the origin yet when initially setting up the workspace.

Change-Id: Iadd8385e4a0d0957fcac1cf89d0b5a1cfa848b49
2014-03-26 23:58:02 +00:00
Jeremy Stanley
2e21b966c9 Allow BRANCH instead of ZUUL_REF in ggp
* modules/jenkins/files/slave_scripts/gerrit-git-prep.sh: Allow
callers to supply BRANCH in the environment for cases where there
will be no ZUUL_REF environment variable. This is mainly to support
use in periodic jobs, so that we can transition away from the
Jenkins SCM plug-in.

Change-Id: I86c77695d8c374c94932664026ab7a541686ae74
2014-03-25 21:03:35 +00:00
Jeremy Stanley
d5436c322e Remove obsolete third argument check from ggp
This was used when transitioning to ZUUL_URL from the calling
environment, and is no longer required by any calls to the script.

Change-Id: Ie3e1740a6cc3d67bd306b5d6c258002d51eaffe8
2014-03-18 16:39:17 +00:00
James E. Blair
f36640710c Use ZUUL_URL in ggp
Makes ggp more generally useful and needed to support multiple
Zuul mergers.

Change-Id: I3c6989f6a710bc124f55aed810be0d4888c67727
2014-01-24 11:41:37 -08:00
Monty Taylor
8be4b62e4d Update submodules if they're there
Some of our things, like new upstream gerrit, may have submodules
in them. In order to make sure that they, you know, work. We should
run some submodules update commands.

Change-Id: I7c47dd71a49108e79e27b5ba69fa09da638b3764
2013-12-10 01:43:44 +01:00
James E. Blair
5e3892fbd1 Have gerrit-git-prep clone from /opt/git if it exists
Change-Id: Ifd47e1610b9f3720fdde1e9f88ea7e4aaeb485c7
2013-12-05 10:18:42 -08:00
Jeremy Stanley
a86367a84d If running git clean after reset then retry
* modules/jenkins/files/slave_scripts/gerrit-git-prep.sh
* .../openstack_project/files/jenkins_job_builder/config/macros.yaml
* .../infra-publications.yaml: If a git clean can not remove some
files, for example because a previous command has not freed its open
file handles, it will return nonzero. If this happens, wait a moment
and try again in case this is only a briefly transient problem.

Change-Id: If11320da7379c8fb8841b945067ce544188f5681
2013-11-27 01:05:17 +00:00
Jeremy Stanley
61c375a8fc Garbage collect Git repos in gerrit-git-prep
* modules/jenkins/files/slave_scripts/gerrit-git-prep.sh: Sometimes
Git repositories can be left in a dirty state, preventing subsequent
operations. If a git remote update fails, garbage collect and then
try again.

Change-Id: I8455a3193081f9a0c9372a10f5ffdbc25fc864d9
Fixes-Bug:1229352
2013-09-23 20:08:34 +00:00
James E. Blair
ad854af95b Use gerrit for the remote update in post jobs
At least until we can fetch ref-updated refs from Zuul.

Change-Id: I2f963f097e05b78205044afc8b83349d8918cf8d
2013-09-03 17:40:52 -07:00
James E. Blair
a73105191b Have gerrit-git-prep use git.o.o
It's an optional 3rd argument, so the transition should be graceful.

Change-Id: Id62101fdbc4081f8a6b295f84568d78f8c8cb6e5
2013-08-19 10:46:06 -07:00
Jeremy Stanley
edfc75e027 Clear workspace before cloning in GGP.
* modules/jenkins/files/slave_scripts/gerrit-git-prep.sh: The
git-clone subcommand fails spectacularly when its destination is set
to a non-empty directory. In the case of gerrit-git-prep this can
happen when files are left behind in a workspace with no .git tree,
and then the job is changed to run GGP later. Work around it by
forcibly removing any previous workspace contents before cloning,
but show a listing of any contents first for the benefit of
troubleshooting such situations.

Change-Id: I0662ee68ee2a0e7a66a4d85c8cc7aea8bf0c17c0
2013-07-15 22:54:32 +00:00
Clark Boylan
733fd110e4 Revert "Add git fetch --tags to gerrit-git-prep.sh."
This reverts commit dbe5f35a5a595a982316cfffa978b572c17ada5e.

Git fetch operations are time consuming on our Centos6 slaves. The
additional fetch for the tags is nice to have but not necessary in most
cases. Remove it to reduce time spent doing this on the Centos6 slaves.

Change-Id: If2ca089df660b6dda1fb6381a8ea5a2ef6e5304f
Reviewed-on: https://review.openstack.org/36544
Reviewed-by: James E. Blair <corvus@inaugust.com>
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Approved: Jeremy Stanley <fungi@yuggoth.org>
Tested-by: Jenkins
2013-07-10 21:54:50 +00:00
Clark Boylan
dbe5f35a5a Add git fetch --tags to gerrit-git-prep.sh.
* modules/jenkins/files/slave_scripts/gerrit-git-prep.sh: Run
`git fetch --tags origin` to make sure that we have all available
tags`.

Change-Id: I2cfd691659cd0e10f5295fbbe66b36b818d6d6b6
Reviewed-on: https://review.openstack.org/35527
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Approved: James E. Blair <corvus@inaugust.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
2013-07-03 19:52:31 +00:00
James E. Blair
3ed03bbecb Clone from gerrit, fetch zuul refs from zuul.
Zuul may not always have the commits needed for some jobs,
and its branches may be in an unpredictable state, so only use
zuul to fetch zuul refs.

Re-set the origin to gerrit for any existing repos.

Change-Id: Ia300922d2e1585dd8d73a2711a7a25f4f9edd0e1
Reviewed-on: https://review.openstack.org/18492
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Approved: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
2012-12-20 20:52:16 +00:00
James E. Blair
2bb68e8d61 Checkout zuul_newrev if it exists.
This logic was in gerrit-git-prep but was erroneously removed.

Change-Id: I76b5dc8acf3e16c4659427d1f6f4f638a5e49791
Reviewed-on: https://review.openstack.org/18488
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Approved: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
2012-12-20 16:43:03 +00:00
James E. Blair
b432663cd9 Update gerrit-git-prep to use zuul refs.
Change-Id: I4b04c490495d731489e354b74906bb6f7209adfc
Reviewed-on: https://review.openstack.org/18193
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Approved: James E. Blair <corvus@inaugust.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Tested-by: James E. Blair <corvus@inaugust.com>
2012-12-16 19:15:25 +00:00
James E. Blair
5b9461b5e1 Move Zuul to its own server.
Remove zuul from jenkins server.
Remove transitional zuul config.
Add an extra argument to gerrit-git-prep for the git site name, so that it
doesn't have to be the same as the review site.
Serve zuul git repos via apache.

Change-Id: I342032bcedf317c0f48ff89b773546eb2ccd08f8
Reviewed-on: https://review.openstack.org/17949
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Approved: James E. Blair <corvus@inaugust.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Tested-by: James E. Blair <corvus@inaugust.com>
2012-12-16 17:25:55 +00:00
Clark Boylan
f40847dd78 Kill trailing whitespace.
Killed trailing whitespace in the puppet repo files using
`sed -r 's/\s+$//'`. Skip binary files and html templates for lodgeit
and mailman.

Change-Id: Ib43493161d8f0e8fae1426b22fb1737832ca14cd
Reviewed-on: https://review.openstack.org/12969
Reviewed-by: Paul Belanger <paul.belanger@polybeacon.com>
Approved: James E. Blair <corvus@inaugust.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
2012-10-05 23:27:31 +00:00
Monty Taylor
e35a6e7c73 Aggregate jenkins modules into one module.
Put jenkins_master into jenkins::master and jenkins_job_builder into
jenkins::job_builder and jenkins_slave into jenkins::slave.

Change-Id: Icb0e3071894730c17d8f36f49e9d34979d9c568e
Reviewed-on: https://review.openstack.org/11249
Approved: Monty Taylor <mordred@inaugust.com>
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Tested-by: Jenkins
2012-08-12 18:22:26 +00:00
Monty Taylor
be854cd76a Revert "Aggregate jenkins modules into one module."
This reverts commit 222f983fabfbf05f8aa074af90d60d7587acddfa

Change-Id: Iebc5744c5342a19aafdf24ea64e0b98812464ef4
Reviewed-on: https://review.openstack.org/11247
Approved: Monty Taylor <mordred@inaugust.com>
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Tested-by: Jenkins
2012-08-12 18:12:03 +00:00
Monty Taylor
222f983fab Aggregate jenkins modules into one module.
Put jenkins_master into jenkins::master and jenkins_job_builder into
jenkins::job_builder and jenkins_slave into jenkins::slave.

Change-Id: I2a1d242ecab0e765ab1b1556bbebd2db8f632888
Reviewed-on: https://review.openstack.org/10842
Approved: Monty Taylor <mordred@inaugust.com>
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Tested-by: Jenkins
2012-08-12 18:03:58 +00:00