Commit Graph

21 Commits (563701973830f849e2307fa10b707bf3629c69de)

Author SHA1 Message Date
James E. Blair 5637019738 Make report message introduction configurable.
By setting parameters on a pipeline, you can change the default
"Build successful/failed" introductory messages left on Gerrit.

Change-Id: Ie05c8c87a47994faced4ee67fda4ab4e64ea0d20
Reviewed-on: https://review.openstack.org/19677
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Approved: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
11 years ago
Antoine Musso 5f1104216a precision on email_filter
The filtering regexp should not allow greedy matchers (such as .*) but
use non greedy ones (such as .*?).  One want to escape dots as well.

Additionally, whenever one want to add several emails, he should use a
YAML list.

Change-Id: I9deea0893151358ddde9b1ec5a40c322c45d7ff2
Reviewed-on: https://review.openstack.org/18350
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
11 years ago
James E. Blair 8dbd56aff0 Add JSON status endpoint.
Can be used for nifty ajax-style status pages.

Add optional description field to pipeline.

Change-Id: If5db3f6945f65f038833cbf9c783de5ffef63b49
Reviewed-on: https://review.openstack.org/18579
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Approved: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
11 years ago
James E. Blair 6aea36dd35 Add per-job URL patterns.
Add the option to specify the URL pattern left in Gerrit, per-job.

Example: a job that builds documentation and uploads it to a staging
site can leave the URL of the staging site iff the job succeeds.

Change-Id: I34841e61e9116fd8d4de7ac09d8f9cfe36fe78ec
Reviewed-on: https://review.openstack.org/18264
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Approved: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
11 years ago
Antoine Musso b4e809edf0 filter events by user email
On some setup we might restrict a pipeline to trusted users. The new
email_filter will matches the email coming from the event account
attribute.

In Gerrit, each event hold the account in a different field
name so I have simply added a map to find out the correct field.

email_filter works just like comment_filter, fields are ORed and are
considered to be regex.

Change-Id: I775f67b48d5f162106c024f94fe498a049b3fe94
Reviewed-on: https://review.openstack.org/17609
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: Monty Taylor <mordred@inaugust.com>
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Tested-by: Jenkins
11 years ago
Antoine Musso 2747501dee let us specify Gerrit root URL
Our code was expecting the Gerrit web interface to be available at the
root of the Gerrit server which is not always the case since people
could publish the Gerrit web interface under a subdirectory. In such
configuration, the existing assumption prevents Zuul from getting
references information.

This patch adds a new optional configuration variable 'baseurl' to the
'gerrit' section. It lets one override the default:

 [gerrit]
 server=gerrit.wikimedia.org
 baseurl=https://gerrit.wikimedia.org/r

Updated Gerrit._getInfoRefs() to use 'baseurl' instead of 'server' when
creating the url to fetch references from. This is still falling back to
the old default whenever gerrit.baseurl is not set.

Change-Id: Ia9910acf46fe82c425911784412356598b3c7eac
Reviewed-on: https://review.openstack.org/16884
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Tested-by: Jenkins
11 years ago
Antoine Musso 2b2d2c40d5 document Jenkins user permissions
This document the required permissions of the Zuul Jenkins user.

Change-Id: Id977e3813f943b032c7628d8cdc663b3bdbb688d
Reviewed-on: https://review.openstack.org/16528
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Approved: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Tested-by: Jenkins
11 years ago
Paul Belanger 43cdeab65f Import oslo-incubator for versioning
After successfully adding openstack versioning to jenkins-job-builder
this add the same support for zuul.

Change-Id: Ia5baab2b0d9392c1b3c70bf890eaf7c6a2ea5c29
Signed-off-by: Paul Belanger <paul.belanger@polybeacon.com>
Reviewed-on: https://review.openstack.org/16219
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: Monty Taylor <mordred@inaugust.com>
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Tested-by: Jenkins
11 years ago
Antoine Musso ce333845ea doc about a post-merge pipeline
Reacting on `change-merged` event definitely requires --force-message to
be passed to `gerrit review` or Gerrit will complain the change is
closed whenever it is also passed --verify X or --code-review Y.

Added a simple example to setup a post-merge independant pipeline.

Left a note about ``change-merged`` lacking the commit sha1. One should
instead use the ``ref-updated`` when the commit sha1 is needed.

Close #1067083

Change-Id: Ic402a0048651d10ac619010fdfd58725374368cd
Reviewed-on: https://review.openstack.org/14476
Approved: James E. Blair <corvus@inaugust.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
11 years ago
Antoine Musso 76904f2f98 honor ZUUL_UUID where UUID is used
The addition of ZUUL_COMMIT (commit 81515ad, change I88c38a28)
deprecated the UUID parameter in favor of ZUUL_UUID but did not honor
the new parameter.

This patch add ZUUL_UUID lookup in jenkins_endpoint() and
findBuildInQueue() with a fallback on UUID. Probably only needed on
jenkins_endpoint() when a Jenkins job lack the UUID parameter, but I
think we might as well add it in findBuildInQueue() just to be safe.

Also update the documentation to uses ZUUL_ prefixed variables where
relevant and added a note about GERRIT_PROJECT and UUID being
deprecated.

Change-Id: Ie0426f388cbd3a373af2110b7460aca6ff4f1751
Reviewed-on: https://review.openstack.org/14327
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: Monty Taylor <mordred@inaugust.com>
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Tested-by: Jenkins
11 years ago
James E. Blair 81515adbd6 Add ZUUL_COMMIT.
To facilitate using zuul with just the jenkins git plugin, add
the ZUUL_COMMIT parameter.  Also, always include ZUUL_REF, whether
the job is pre- or post-commit.  If it's pre, it will be a
refs/zuul ref, if it's post, it will be refs/tags or a branch
name.

Change-Id: I88c38a28dcd552b2540095d36caacd10acf167b8
Reviewed-on: https://review.openstack.org/13934
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Approved: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
11 years ago
James E. Blair 172c076a1b Add documentation about serving Zuul refs.
Change-Id: I6cdd20e6238fafdca626eb2531a3a78c985bb680
Reviewed-on: https://review.openstack.org/13974
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Approved: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
11 years ago
Clark Boylan 9b670905d9 Provide link to status page in Gerrit comments.
When commenting on Gerrit that jobs are beginning include a link to the
zuul status page if one is configured.

Change-Id: Iba5f315f4baa006939dbdcb07b0758e570242ca8
Reviewed-on: https://review.openstack.org/13858
Reviewed-by: James E. Blair <corvus@inaugust.com>
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Approved: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
11 years ago
James E. Blair bb480fd092 Merge branch 'dev'
Change-Id: I65fc0ed6fed411ec3c453989b748ee6022081366
11 years ago
Antoine Musso fec5c7ac18 update github URLs in documentation
Some puppet modules have been renamed in openstack-ci-puppet:

* `jenkins_slave` puppet module has been integrated in `jenkins` module
* `openstack-ci-config` has been renamed `openstack_project`

Change-Id: Ie4a35022301c156f74e1fdef859c87319efb60da
Reviewed-on: https://review.openstack.org/13519
Approved: Monty Taylor <mordred@inaugust.com>
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Tested-by: Jenkins
11 years ago
Clark Boylan 00635dc6c2 Move terminology from "queue" to "pipeline".
The zuul terminology for queues was changed to pipelines to help clean
up the code and make it easier to read and debug. Update the
documentation to reflect this terminology change.

Change-Id: I8805f7ee201196b9658b8ea3546d4451aed4c700
Reviewed-on: https://review.openstack.org/13312
Approved: James E. Blair <corvus@inaugust.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
11 years ago
James E. Blair 222d4987c1 Add job option to hold following changes.
By setting 'hold-following-changes' to True on .*-merge jobs,
jobs for following changes in the dependend change queue won't be
launched until all of the -merge jobs ahead of them complete
successfully.  This prevents wasting resources on testing changes
that have no chance of merging as tested.  It gives up a small
amount of parallelization in order to achieve this (merge jobs will
now run in series, while other jobs may continue to run in parallel).

This should also help ensure that jobs nearer the front of the queue
run sooner than jobs at the back.  Currently, the nondeterminism of
job run-time can cause Jenkins to use limited resources on the back
of the queue instead of the front.

Also fixes these bugs:

* The success/failure messages specified were not being used.
* If a parameter function was applied to a meta-job, it would not
  be applied to jobs that matched the meta-job.

Change-Id: I03cc3e25c554d8aeb1ddb478afaed168a961962f
11 years ago
James E. Blair e5a847f484 Add parameter function and job branch specs.
Add a parameter-function attribute to jobs that specifies a function
that should be called to manipulate parameters passed to jenkins
before a job is launched.

Add the ability to include a python file to define such a function.

Finish implementing the "branch" attribute of jobs that lets you
specify whether a job should run on a particular branch.

Change-Id: I3f4d21ad5ac58a24d44a9a8437daa5c668967db9
11 years ago
Clark Boylan b9bcb409e9 Add ability to filter patchset comments.
Zuul layouts can now specify that jobs get run when comments match
a filter. Trigger layouts would look like:
  trigger:
    - event: comment-added
      comment_filter:
        - reverify
        - recheck

This would trigger a job whenever comments containing the string
"reverify" or "recheck" are added to a change.

Change-Id: I3dd75abbf75686b3929dd2bb412b02740911d6ee
11 years ago
James E. Blair dc2538693e Add start actions.
Add the ability to specify a report to gerrit on start.  This
can be used to clear the verified column.

Fixes bug #1012730.

Change-Id: I8dd2a60c3a16a8fa0046675437c750948af99577
11 years ago
James E. Blair cdd000764e Add documentation.
Change-Id: I8197ec2e52596fa4136f8af9aa93ea06e56d4d0d
11 years ago