Remove merge jobs.

Zuul internally merges or cherry-picks changes before running jobs
and gerrit-git-prep now uses the output of that.  Therefore, merge
jobs are redundant.  However, some projects have no gate tests,
so create a noop job for those projects so Zuul has something to run.
As long as it doesn't actually do anything with a git repo, it can
be shared by all projects.

* Remove definitions of merge jobs in jjb.
* Add a new singleton 'gate-noop' job.
* Remove invocations of -merge jobs in zuul, replacing them
  with -noop jobs if they are the only jobs for a pipeline.
* Update new job documentation to mention gate-noop, and lack
  of need to update projects.yaml if not using python-jobs.

Change-Id: I56d3f0f99b2f05780fc82222854db4f1c8f68b57
Reviewed-on: https://review.openstack.org/18246
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Approved: Monty Taylor <mordred@inaugust.com>
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Tested-by: Jenkins
This commit is contained in:
James E. Blair 2012-12-17 08:59:47 -08:00 committed by Jenkins
parent 704a02d3d5
commit e04970cc53
6 changed files with 387 additions and 716 deletions

View File

@ -85,81 +85,59 @@ these additional tools.
Add Jenkins Jobs to StackForge Projects Add Jenkins Jobs to StackForge Projects
======================================= =======================================
In the same openstack-infra/config repository (and in the same change if In the same openstack-infra/config repository (and in the same change
you like) we need to edit two additional files to setup Jenkins jobs if you like) we need to edit additional files to setup Jenkins jobs
and Zuul for the new StackForge project. and Zuul for the new StackForge project.
Edit If you are interested in using the standard python Jenkins jobs (docs,
pep8, python 2.6 and 2.7 unittests, and coverage), edit
``openstack-infra/config/modules/openstack_project/files/jenkins_job_builder/config/projects.yaml`` ``openstack-infra/config/modules/openstack_project/files/jenkins_job_builder/config/projects.yaml``
and add a new section for your project at the end of the file. It should and add a new section for your project at the end of the file. It
look something like:: should look something like::
- project: - project:
name: project-name name: project-name
github-org: stackforge github-org: stackforge
node: precise node: precise
jobs:
- gate-{name}-merge
This will add a single Jenkins job for your project called
gate-project-name-merge. This job will return success if the submitted
change can be merged into the current state of your project's master
branch and failure otherwise.
The above config is the bare minimum Jenkins job config needed. If you
are interested in using the standard python Jenkins jobs (docs, pep8,
python 2.6 and 2.7 unittests, and coverage) your entry in
``projects.yaml`` should look like this instead::
- project:
name: project-name
github-org: stackforge
# Requires additional config please discuss docs with infra team.
doc-publisher-site: some.ftp.host
node: precise
jobs: jobs:
- python-jobs - python-jobs
Now that we have a Jenkins job we need to tell Zuul to run that job when If you aren't ready to run any gate tests yet, you don't need to edit
``projects.yaml``.
Now that we have Jenkins jobs we need to tell Zuul to run them when
appropriate. Edit appropriate. Edit
``openstack-infra/config/modules/openstack_project/files/zuul/layout.yaml`` ``openstack-infra/config/modules/openstack_project/files/zuul/layout.yaml``
and add a new section for your project at the end of the file. It should and add a new section for your project at the end of the file. It
look something like:: should look something like::
- name: stackforge/project-name - name: stackforge/project-name
check: check:
- gate-project-name-merge - gate-project-name-docs
- gate-project-name-pep8
- gate-project-name-python26
- gate-project-name-python27
gate: gate:
- gate-project-name-merge - gate-project-name-docs
- gate-project-name-pep8
This configures zuul to check if change patchsets can merge on every - gate-project-name-python26
submission to Gerrit and will check that the change can merge before - gate-project-name-python27
attempting to merge approved changes.
If you configured the ``python-jobs`` your ``zuul/layout.yaml`` should
look like this instead::
- name: stackforge/project-name
check:
- gate-project-name-merge
- gate-project-name-docs
- gate-project-name-pep8
- gate-project-name-python26
- gate-project-name-python27
gate:
- gate-project-name-merge
- gate-project-name-docs
- gate-project-name-pep8
- gate-project-name-python26
- gate-project-name-python27
post: post:
- project-name-coverage - project-name-coverage
- project-name-docs - project-name-docs
publish: publish:
- project-name-docs - project-name-docs
If you aren't ready to run any gate tests yet and did not configure
python-jobs in project.yaml, it should look like this instead::
- name: stackforge/project-name
check:
- gate-noop
gate:
- gate-noop
That concludes the bare minimum openstack-infra/config changes necessary to That concludes the bare minimum openstack-infra/config changes necessary to
add a project to StackForge. You can commit these changes and submit add a project to StackForge. You can commit these changes and submit
them to review.openstack.org at this point, or you can wait a little them to review.openstack.org at this point, or you can wait a little

View File

@ -1,8 +1,3 @@
- job-group:
name: api-jobs
jobs:
- gate-{name}-merge
# this moves the openstack-api-programming job from manuals.yaml and adjusts target # this moves the openstack-api-programming job from manuals.yaml and adjusts target
# and publishers accordingly # and publishers accordingly
- job: - job:

View File

@ -0,0 +1,7 @@
- job:
name: gate-noop
triggers:
- zuul
node: precise

View File

@ -1,12 +1,3 @@
- project:
name: api-site
github-org: openstack
node: precise
doc-publisher-site: api.openstack.org
jobs:
- gate-{name}-merge
- project: - project:
name: ceilometer name: ceilometer
github-org: openstack github-org: openstack
@ -43,43 +34,6 @@
- openstack-compute-api-doc - openstack-compute-api-doc
- project:
name: devstack-gate
github-org: openstack-infra
node: precise
jobs:
- gate-{name}-merge
- project:
name: devstack
github-org: openstack-dev
node: precise
jobs:
- gate-{name}-merge
- project:
name: diskimage-builder
github-org: stackforge
node: precise
tarball-publisher-site: 173.203.107.207
jobs:
- gate-{name}-merge
- project:
name: gerrit
github-org: openstack-infra
node: precise
jobs:
- gate-{name}-merge
- project: - project:
name: gerritbot name: gerritbot
github-org: openstack-infra github-org: openstack-infra
@ -88,7 +42,6 @@
tarball-publisher-site: 173.203.107.207 tarball-publisher-site: 173.203.107.207
jobs: jobs:
- gate-{name}-merge
- gate-{name}-pep8 - gate-{name}-pep8
- gate-{name}-pyflakes - gate-{name}-pyflakes
- '{name}-sdist-tarball' - '{name}-sdist-tarball'
@ -104,7 +57,6 @@
tarball-publisher-site: nova.openstack.org tarball-publisher-site: nova.openstack.org
jobs: jobs:
- gate-{name}-merge
- gate-{name}-pep8 - gate-{name}-pep8
- gate-{name}-pyflakes - gate-{name}-pyflakes
- '{name}-pypi-sdist' - '{name}-pypi-sdist'
@ -119,7 +71,6 @@
tarball-publisher-site: nova.openstack.org tarball-publisher-site: nova.openstack.org
jobs: jobs:
- gate-{name}-merge
- gate-{name}-pep8 - gate-{name}-pep8
- gate-{name}-pyflakes - gate-{name}-pyflakes
- '{name}-pypi-sdist' - '{name}-pypi-sdist'
@ -131,7 +82,6 @@
github-org: openstack-infra github-org: openstack-infra
node: precise node: precise
jobs: jobs:
- gate-{name}-merge
- gate-{name}-pep8 - gate-{name}-pep8
@ -217,7 +167,6 @@
tarball-publisher-site: nova.openstack.org tarball-publisher-site: nova.openstack.org
jobs: jobs:
- gate-{name}-merge
- gate-{name}-pep8 - gate-{name}-pep8
- gate-{name}-pyflakes - gate-{name}-pyflakes
- '{name}-sdist-tarball' - '{name}-sdist-tarball'
@ -241,33 +190,6 @@
- translation-jobs - translation-jobs
- project:
name: lodgeit
github-org: openstack-infra
node: precise
jobs:
- gate-{name}-merge
- project:
name: meetbot
github-org: openstack-infra
node: precise
jobs:
- gate-{name}-merge
- project:
name: MRaaS
github-org: stackforge
node: precise
jobs:
- gate-{name}-merge
- project: - project:
name: netconn-api name: netconn-api
github-org: openstack github-org: openstack
@ -299,7 +221,6 @@
tarball-publisher-site: 173.203.107.207 tarball-publisher-site: 173.203.107.207
jobs: jobs:
- gate-{name}-merge
- '{name}-sdist-tarball' - '{name}-sdist-tarball'
- '{name}-pypi-sdist' - '{name}-pypi-sdist'
- '{name}-pypi-upload' - '{name}-pypi-upload'
@ -322,15 +243,6 @@
- translation-jobs - translation-jobs
- project:
name: config
github-org: openstack-infra
node: precise
jobs:
- gate-{name}-merge
- project: - project:
name: object-api name: object-api
github-org: openstack github-org: openstack
@ -356,46 +268,6 @@
- gate-{name}-pyflakes - gate-{name}-pyflakes
- project:
name: openstack-nose
github-org: openstack-dev
node: precise
tarball-publisher-site: nova.openstack.org
doc-publisher-site: docs.openstack.org
jobs:
- gate-{name}-merge
- project:
name: openstack-chef
github-org: openstack
node: precise
tarball-publisher-site: nova.openstack.org
doc-publisher-site: docs.openstack.org
jobs:
- gate-{name}-merge
- project:
name: openstack-qa
github-org: openstack-dev
node: precise
jobs:
- gate-{name}-merge
- project:
name: openstack-planet
github-org: openstack
node: precise
jobs:
- gate-{name}-merge
- project: - project:
name: pbr name: pbr
github-org: openstack-dev github-org: openstack-dev
@ -408,33 +280,6 @@
- pypi-jobs - pypi-jobs
- project:
name: puppet-apparmor
github-org: openstack-infra
node: precise
jobs:
- gate-{name}-merge
- project:
name: puppet-dashboard
github-org: openstack-infra
node: precise
jobs:
- gate-{name}-merge
- project:
name: puppet-vcsrepo
github-org: openstack-infra
node: precise
jobs:
- gate-{name}-merge
- project: - project:
name: python-ceilometerclient name: python-ceilometerclient
github-org: openstack github-org: openstack
@ -552,15 +397,6 @@
- python-jobs - python-jobs
- project:
name: reddwarf-integration
github-org: stackforge
node: precise
jobs:
- gate-{name}-merge
- project: - project:
name: python-reddwarfclient name: python-reddwarfclient
github-org: stackforge github-org: stackforge
@ -638,24 +474,6 @@
- hook-{name}-rtfd - hook-{name}-rtfd
- project:
name: requirements
github-org: openstack
node: precise
jobs:
- gate-{name}-merge
- project:
name: sandbox
github-org: openstack-dev
node: precise
jobs:
- gate-{name}-merge
- project: - project:
name: swift name: swift
github-org: openstack github-org: openstack
@ -677,28 +495,9 @@
node: precise node: precise
jobs: jobs:
- gate-{name}-merge
- gate-{name}-pep8 - gate-{name}-pep8
- project:
name: volume-api
github-org: openstack
node: precise
jobs:
- gate-{name}-merge
- project:
name: openstack-manuals
github-org: openstack
node: precise
jobs:
- gate-{name}-merge
- project: - project:
name: zuul name: zuul
github-org: openstack-infra github-org: openstack-infra
@ -713,14 +512,6 @@
- '{name}-pypi-upload' - '{name}-pypi-upload'
- project:
name: openstack-qa
github-org: openstack-dev
node: precise
jobs:
- gate-{name}-merge
- project: - project:
name: devstack-node-provider-rackspace name: devstack-node-provider-rackspace
provider: rackspace provider: rackspace

View File

@ -174,20 +174,6 @@
node: '{node}' node: '{node}'
- job-template:
name: 'gate-{name}-merge'
triggers:
- zuul
builders:
- gerrit-git-prep
publishers:
- console-log
node: '{node}'
- job-template: - job-template:
name: 'gate-{name}-docs' name: 'gate-{name}-docs'
@ -224,7 +210,6 @@
name: python-jobs name: python-jobs
jobs: jobs:
- '{name}-coverage' - '{name}-coverage'
- 'gate-{name}-merge'
- 'gate-{name}-pep8' - 'gate-{name}-pep8'
- 'gate-{name}-python26' - 'gate-{name}-python26'
- 'gate-{name}-python27' - 'gate-{name}-python27'

File diff suppressed because it is too large Load Diff