Commit Graph

268 Commits

Author SHA1 Message Date
Clark Boylan fbdd3aa557 Retire this repo
The opendev project has been moving away from puppet and this is one of
the puppet modules that is no longer used. To simplify things for us we
are taking the extra step of retiring this repo.

Change-Id: Ibd49cc2311b2b3ee10b5d0ec235f9d247dafdc94
2022-02-17 11:47:50 -08:00
Isaac Beckman 89d89683e3 Customize jenkins.default by template
Turn jenkins.default to a template. This enables to customize it
easily. This is useful for downstream projects where it is needed
to tune jenkins.default parameters. Either Pass the required
parameter to jenkins class or pass a customized jenkins.default
file location in jenkins_default.
For backward compatibility, default values are set in the class
parameters list.

Change-Id: Ice0e4ffa2fffd041d8bcc4a0b323ffae7ba2b0c8
2016-12-05 08:19:54 -06:00
Jenkins 06471dfde0 Merge "Remove unused GnuPG keyring" 2016-07-01 13:42:18 +00:00
Paul Belanger 868a8ec5c5
Add systemd scripts for cgroups
This is needed for Ubuntu Xenial.

Change-Id: Ibe7d18f10aa48222b8bc08fd6f56cc9cd2790232
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2016-06-29 10:14:29 -04:00
Jeremy Stanley fbed50c66f Remove unused GnuPG keyring
This was added by commit de7975c--Gerrit change 7--so old it
predates Change-Id headers in the repo (and, apparently, commit
messages). Today it seems to be completely unused. The pubring.gpg
contained just this one key:

    pub   2048R/32EE128C 2010-08-15
    uid                  OpenStack Hudson <hudson@openstack.org>
    sub   2048R/92E212FC 2010-08-15

Based on discussion in IRC, Monty vaguely recalls this might have
been related to DEB package building once upon a time (something we
no longer do and wouldn't configure from this module anyway when
eventually want to start doing again).

Change-Id: I70c3b82185681ee64791cda653360c26a93bd466
2016-06-23 18:11:51 +00:00
Clark Boylan 86589a9860 Don't try to delete master during safe restart
The master computer can be offline like any other slave but it cannot be
deleted so do not try to delete it.

Change-Id: I5b44f89cf2a8838bf2ea32bd5d7baaffe31f8451
2016-04-09 11:21:09 -07:00
Jenkins b5357b1bc1 Merge "Cleanup deprecated exception checking" 2015-11-12 16:27:07 +00:00
Ramy Asselin 953fcaf25c SECURITY-218: Update to latest cli-shutdown.groovy
Update to the latest version of the script:
3b8e932110/cli-shutdown.groovy


Change-Id: Ief950cffb24229aea8cbcabf62d3339aca6c9630
2015-11-09 15:46:09 +00:00
Jeremy Stanley 390d82fc09 Update cli-shutdown.groovy for license grant
Use the latest copy of cli-shutdown.groovy which includes a license
grant and some code comments.

Change-Id: I2f126e5a67d557c363e2a722532a9240a43d8c51
2015-11-07 03:07:42 +00:00
Jeremy Stanley 760ea2c501 Mitigate SECURITY-218 by disabling the CLI
Jenkins masters will need a restart after applying this change, or
it will have to be separately pasted into the Script Console.

Change-Id: I427d6e1a72fbe2144f3d9d9306c1cc918730e0cd
2015-11-07 02:25:36 +00:00
Clark Boylan 9e60d69a01 Cleanup deprecated exception checking
Exception.message is deprecated in python2.6 and removed in python3.
Switch use of that to str(Exception) instead to use non deprecated code
paths.

Change-Id: I040d650c277454a9170ca256c0a936d928a81f95
2015-10-07 17:07:26 -07:00
Clark Boylan c61d0588f1 Add utility script for safe master shutdown
This adds a script that will put the jenkins master in shutdown mode,
wait for all jobs to finish running, then optionally delete any offline
slaves. Once this is complete you can restart the jenkins master in
whatever fashion you choose safely.

Change-Id: I0cb858665de0e733267b5f45b071b076167ee63a
2015-09-25 13:35:19 -07:00
Tristan Cacqueray 305f6543bd Adds jenkins default file
This change moves the jenkins file from system-config.

Change-Id: I87849efa7a40f3ac62e90e2d763a2836b6d91aab
Depends-On: I7316dba6cb333bf0821eacde8341601409a4453d
2015-05-11 12:55:35 +00:00
Monty Taylor 70debfaeb1 Add ability to change the slave gerrit user
Some slaves may want to connect to gerrit as a different person.
Rather than hardcoding jenkins@openstack.org - parameterize it.

Change-Id: Iafeb76f1bec7a0ba1a33b0c9c5b74e2b88d13889
2014-09-15 15:44:24 -07:00
Monty Taylor f12dd21627 Make select-mirror use the bandersnatch mirror
A simple next step is to have select-mirror just default everything
to the same thing.

Change-Id: I9882167596de0791eda86397510e2a942848f5c5
2014-06-30 15:24:50 -07:00
Monty Taylor e6047a710c Changes to get nodepool working with trusty
There are few things that are different for our slaves on trusty. Of
note, we don't want to pin puppet, and we need to provide a version
for postgres.

Change-Id: Ibee78cd4fbeef2e6af43379d2bc3a0f0e9767a06
2014-05-28 10:09:35 -07:00
K Jonathan Harker 8fb6c280ff Correct source file location
The jenkins-sudo file resources were moved from the jenkins module to
the openstack_project module, and the source paths in the file resource
were changed to reflect the move, but the source *.sudo files were not
moved to the new module.

Change-Id: I54c288fe73cacd8e0bd09db3d6f855e06fc65434
2014-05-23 14:14:42 -07:00
K Jonathan Harker 136ec60d08 Move openstack-specific config out of ::jenkins
The ::jenkins::slave class contained a lot of openstack-specific
configuration rather than configuration of a generic jenkins slave.

The term "bare slave" is overloaded and confusing: create simple_slave
and thick_slave to differentiate between the two meanings of "bare".
Some portions of ::jenkins::slave will move to simple_slave, some
portions to thick_slave, and some portions to slave_common (all in the
openstack_project module).

Change-Id: I5281a03a7f6da3f98714bcc59ae840ace8435578
2014-05-20 14:39:51 -07:00
Andreas Jaeger 65580750be Only download nearly finished translated files
The daily "Imported Translations from Transifex" patch includes all po
files, even the ones that are completely untranslated or only have a partial
translation. There's no real need for these files.

Therefore, only download files that are at least 75 per cent translated.

There is one exception: For openstack-manuals the common directory
contains many files where only a few need to be translated - so allow
here 8 per cent translation. This currently downloads the Japanese and
French files and thus covers the languages that we need.

Partial-Bug: #1317794

Change-Id: I763c21768e3876aaaf4734bf2d769de20b49ff42
2014-05-16 14:19:39 -04:00
Clark Boylan 17e610136b Fix zero tests ran unittest check.
The unittests attempt to check that more than 0 tests run; however, in
some cases 0 tests will be run and testr last won't list the number of
tests as a number. This causes the sed filter to fail to match resulting
in a rancount of "". If we get a rancount of "" or "0" fail the test.

Change-Id: I1f7ca358c73c071e60ba4b651cf75db18b8fd487
2014-05-07 20:00:18 -07:00
Jenkins 5da065a246 Merge "add subunit log test sanity" 2014-05-01 01:43:55 +00:00
Jenkins 5c145743ab Merge "Create propose_translation_update for horizon" 2014-04-30 14:55:04 +00:00
James E. Blair fdf89178ae Drop the ref from the tag fetch in GGP
If you start with an out of date repo (we do -- we clone from cached
git repos on our images) and the git remote update fails (eg due to
mirror sync issues) and you then do a fetch with a ref argument
(eg refs/tags/foo), it will fail with:

  error: no such remote ref refs/tags/foo

However, git fetch --tags will get all the tags from the zuul merger,
which is what we really care about, and the subsequent checkout and
reset will make sure that we really did get the tag we wanted.
Therefore, remove the ref argument that can cause these occasional
failures.

Change-Id: Iaed8b82204a3eddc7ee418ebe94637f2a371d25b
2014-04-29 13:20:57 -07:00
Clark Boylan ecde9cfda4 Handle additional reqs push failure as non failing
When pushing changes to gerrit for requirements proposals there are
cases where we want to ignore push errors. Specifically when gerrit is
complaining because you are pushing the same commit or one with
identical comments. We should just ignore these errors as it means the
current reqs proposal is up to date.

See
https://review.openstack.org/Documentation/error-no-changes-made.html
for more info.

Change-Id: I5d7a1991449a80f570191eaad49dc3f9a0ff1a6a
2014-04-23 12:38:03 -07:00
Jenkins 625020442f Merge "Add a slave-script to Jenkins for pushing to swift" 2014-04-23 03:10:48 +00:00
Clark Boylan 63ace3be08 Set config prior to git review -s.
Requirements proposal jobs need to set git configs for each git repo it
is proposing to. This is necessary because it shouldn't set the git
config globally for the Jenkins user on the slaves.

Change-Id: Id69ba218065022f69d2dd9d140825699d78604e3
2014-04-17 16:17:09 -07:00
James E. Blair 23f3a247d1 Override user interaction in merge tags job
Add the "-y" flag to avoid the "Is this really what you meant to do?"
prompt.

Change-Id: I3397a6e1266c6c3a5f652d3b343e37073f968dc7
2014-04-17 07:02:46 -07:00
Andreas Jaeger dc83f46b03 Create propose_translation_update for horizon
Add slave-file to handle horizon translations.
Setup periodic job to import horizon translations the same way its done
for other projects.

Change-Id: I0e28f0268e7f3fdea9d5f22d2e896b0079410ea6
2014-04-16 20:09:25 +02:00
Clark Boylan 18d8f43561 Use proposal bot username in proposal jobs.
After the switch to using the proposal-bot gerrit user in proposal jobs
some jobs continued to attempted to use the jenkins user. Fix that and
use the proposal-bot user.

Change-Id: I146b6ea29d66bd171072e6529413efcc5cae3d8d
2014-04-15 11:11:51 -07:00
Jenkins e67290b5ef Merge "Propose translation update: Handle PO-Revision-Date" 2014-04-15 17:17:47 +00:00
Jenkins 0dc8702f57 Merge "Make jenkins proposal jobs use dedicated user." 2014-04-15 16:58:53 +00:00
Andreas Jaeger 4882c00fc2 Propose translation update: Handle PO-Revision-Date
Include PO-Revision-Date in list of lines to ignore so that we do
not get new proposed files where just the date has changed.

Change-Id: I3ce13d0cdd9fdbf1711d40ebbdef408c93d49523
2014-04-15 09:00:36 +02:00
Jenkins 81297d10fa Merge "Reduce number of files send for propose_translation" 2014-04-14 23:15:28 +00:00
Clark Boylan 39593cd8ab Make jenkins proposal jobs use dedicated user.
Switch all jenkins proposal jobs to a dedicated user with dedicated
credentials. This is being done to be more flexible and secure when it
comes to managing the scripts that make proposals to gerrit.

Change-Id: I2dbdd530bf5b64c14207f645512a1eb319681166
2014-04-14 15:38:31 -07:00
Andreas Jaeger 3cc564a6a9 Reduce number of files send for propose_translation
If a single file has changed, all other .pot files are send as well
since they have a new timestamp.

Check for files that only have a new timestamp and revert their change
so that they do not get committed at all.

Also, handle Project-Id-Version the same way as the timestamp.

Change-Id: I49488d01a7bb9242508ec7d378240449124608de
2014-04-14 21:54:07 +02:00
Andreas Jaeger 485740ae57 Do not generate obsolete translations
Call update_catalog with option --ignore-obsolete=true to not generate
any obsolete translation entries.

Change-Id: Ia898149f6203ebf024a64b8bf3ecbffd75261ce8
Related-Bug: #1299349
2014-04-08 11:33:31 +02:00
Jenkins b6af1f0d70 Merge "Make transifex the only source of translations" 2014-04-08 08:26:43 +00:00
Sean Dague 9e9f74fbb5 add subunit log test sanity
subunit logs should not be more than 50MB uncompressed. If they
are you are doing something terribly wrong, and both consuming a
ton of infra resources, as well as local user memory.

Change-Id: I0f93684c0b9055bc95808cfae827e171fa30f6d1
2014-04-07 15:48:43 -04:00
Thierry Carrez 1ca1cd73f6 Fix milestone-proposed requirements update
milestone-proposed was checked out in a detached state, which prevents
git-review from successfully proposing changes to it. It works with
master because master is checked out by default on the initial clone.

This commit makes sure the branch is checked out with proper origin
tracking before proceeding with changes.

Fixes bug #1302490

Change-Id: Iff4f653d2d68fd36bb076ed8ae9fa5b0bb03edda
2014-04-04 15:49:01 +02:00
Jeremy Stanley 7cb56472cd Requirements check should tolerate existing cruft
* .../slave_scripts/project-requirements-change.py: When parsing
requirements files, only perform style checks like missing final
newline or duplicate entries on the new/proposed version of a file
and ignore them on the original version of the file in the
repository. This makes it possible to actually correct errors on
imported requirements files, even with the job running this script
already voting on the correcting change. Also annotate this with
more commentary so people have some hope of understanding what the
heck it's doing.

Change-Id: I8ea2800ecc8eb24937e69a573e925b4daf64ff3f
Closes-Bug: #1300843
2014-04-03 15:25:48 +00:00
Joshua Hesketh 37c69a6c3e Add a slave-script to Jenkins for pushing to swift
I042cdd2dd2407f381cafcabc5c6b83d9b9a9eb00 adds instructions to
workers on how to send logs to swift using the FormPost middleware.
This slave-script allows you to pass in a directory to push to
swift using these instructions and returns a URL where they are
available.

Change-Id: I7ccafa408a88ef80317b1c546b3451c0033dce61
2014-04-01 14:01:36 +11:00
Clark Boylan 88bda92b7b Make transifex the only source of translations
Prior to this change we attempted to push translations made direclty in
the git tree to transifex allowing translations to be made via git
directly or in transifex. Simplify the process to avoid cases where the
transifex client will refuse to update local translations because they
are newer than those in transifex. This makes transifex the only source
of translation updates. In addition to simplifying the process force tx
pull -a operations as a way to force the updates if we end up in this
state.

Change-Id: I171b3b1a29cbeaab0c4d9de3ab1bd3a6b933ea53
2014-03-31 11:05:52 -07:00
Jenkins 73a9a23d76 Merge "Fetch tag refs from zuul in gerrit-git-prep" 2014-03-30 23:23:18 +00:00
Jeremy Stanley 6d1f079452 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 7215705e1d 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
Jenkins 1643308c2b Merge "Another fix for upstream_translation_horizon.sh" 2014-03-21 20:10:45 +00:00
Jenkins c6d817429f Merge "Switch to using version-properties.sh script." 2014-03-21 19:05:13 +00:00
Andreas Jaeger 11c9f73946 Another fix for upstream_translation_horizon.sh
There was an extra closing bracked "]" that breaks the script.

Hope this finally gets the job running again.

Change-Id: Ib9721e312aa9a678fe483d6cbb1fb910be1c1659
2014-03-21 15:52:43 +01:00
Jenkins 649218c4e6 Merge "Increase the default pip socket timeout" 2014-03-21 01:09:13 +00:00
Derek Higgins 8631d0d8b3 Increase the default pip socket timeout
pip's default timeout of 15 seconds doesn't seem to be high enough
causing us to intermittently fail getting the pypi index. Increasing
the timeout to 60 in an attempt to make it less likely to hit the
problem.

Change-Id: Ifd4689283e53d6afb7a76b480e004cdde3b302f6
Related-Bug: #1272417
2014-03-21 00:01:42 +00:00