Commit Graph

24 Commits

Author SHA1 Message Date
James E. Blair 6c8855ede4 Add noxfile and switch to nox
Tox v4 behaves significantly differently than v3, and some of the
more complex things we do with tox would need an overhaul to
continue to use it.  Meanwhile, nox is much simpler and more
flexible, so let's try using it.

This adds a noxfile which should be equivalent to our tox.ini file.
We still need to update the docs build (which involves changes to
base jobs) before we can completely remove tox.

Depends-On: https://review.opendev.org/868134
Change-Id: Ibebb0988d2702d310e46c437e58917db3f091382
2022-12-20 08:57:53 -08:00
James E. Blair 74a9c9de9b Use ZooKeeper TLS in tests
This mirrors the configuration in Nodepool for using TLS-enabled
ZooKeeper in tests.  We use the ensure-zookeeper role in order
to get a newer ZooKeeper than is supplied in bionic.

Change-Id: I14413fccbc9a6a7a75b6233d667e2a1d2856d894
2021-03-08 06:49:57 -08:00
Tobias Henkel b6f3167b9c
Revert "Revert "Create zuul/web/static on demand""
The js content tarball creation was broken. Instead of leaving the
symlink to a non-existing directory which gets created during python
setup we should just remove that symlink as well and create the
symlink and the static dir during the python setup. This way nothing
will be in the way of the javascript content generation.

This reverts commit eb7b18b38e.

Change-Id: I5f8bfa62cd2d4d9823b86dbcda14885230847a82
2020-07-07 19:53:33 +02:00
Tobias Henkel 5c97994f9f
Fix ignored but tracked .keep file
We ignore the directory zuul/web/static but want to keep the directory
itself existing. We do this by having a .keep file in there which is
excluded in the gitignore file. However we currently ignore the
complete directory zuul/web/static so git ignores the exclude
rule. Thus the .keep file is ignored but tracked which is not really
what we want. Instead ignore all files below zuul/web/static. This way
the exclude rule works and the .keep file is not ignored.

Change-Id: I3b17d1c48c6da2c5920816153a1265dbec591d38
2018-12-02 09:12:25 +01:00
Ivan Remizov c032a8cea7 Exclude .keep files from .gitignore
There is a file zuul/web/static/.keep which is commited to git but
excluded from vcs by .gitignore. The problem is that some advanced IDEs
display annoying warnings related to this case.
It also looks like misconfiguration.

This patch excludes .keep files from .gitignore which means that such
files will be tracked.

Change-Id: Ib9ea9e585f723cad523d4f825c076280e2f2afe0
2018-10-20 00:36:28 +03:00
James E. Blair 8571b52ba8 Add docker-compose quickstart example
Use docker-compose to get a zuul+nodepool+gerrit up and configured
so that we can write walkthrough documentation which starts with
a running system.

Change-Id: I5819aee1fb9c3af72eb31818da476df074424225
Co-Authored-By: Tobias Henkel <tobias.henkel@bmw.de>
2018-10-09 14:36:06 -07:00
Fabien Boucher dc56869bb1 Add .stestr to .gitignore
Change-Id: I44d5fa8818296af5f87f066ccb3928a8a24ed6d0
2018-06-11 13:00:17 +02:00
Monty Taylor 4a781a7f86
Use yarn and webpack to manage zuul-web javascript
yarn drives package and dependency management. webpack handles
bundling, minification and transpiling down to browser-acceptable
javascript but allows for more modern javascript like import statements.

There are some really neat things in the webpack dev server. CSS
changes, for instance, get applied immediately without a refresh. Other
things, like the jquery plugin do need a refresh, but it's handled just
on a file changing.

As a followup, we can also consider turning the majority of the status page
into a webpack library that other people can depend on as a mechanism
for direct use. Things like that haven't been touched because allowing
folks to poke at the existing known status page without too many changes
using the tools seems like a good way for people to learn/understand the
stack.

Move things so that the built content gets put
into zuul/web/static so that the built-in static serving from zuul-web
will/can serve the files.

Update MANIFEST.in so that if npm run build:dist is run before the
python setup.py sdist, the built html/javascript content will be
included in the source tarball.

Add a pbr hook so that if yarn is installed, javascript content will be
built before the tarball.

Add a zuul job with a success url that contains a source_url
pointing to the live v3 data.

This adds a framework for verifying that we can serve the web app
urls and their dependencies for all of the various ways we want to
support folks hosting zuul-web.

It includes a very simple reverse proxy server for approximating
what we do in openstack to "white label" the Zuul service -- that
is, hide the multitenancy aspect and present the single tenant
at the site root.

We can run similar tests without the proxy to ensure the default,
multi-tenant view works as well.

Add babel transpiling enabling use of ES6 features

ECMAScript6 has a bunch of nice things, like block scoped variables,
const, template strings and classes. Babel is a javascript transpiler
which webpack can use to allow us to write using modern javascript but
the resulting code to still work on older browsers.

Use the babel-plugin-angularjs-annotate so that angular's dependency
injection doesn't get borked by babel's transpiling things (which causes
variables to otherwise be renamed in a way that causes angular to not
find them)

While we're at it, replace our use of var with let (let is the new
block-scoped version of var) and toss in some use of const and template
strings for good measure.

Add StandardJS eslint config for linting

JavaScript Standard Style is a code style similar to pep8/flake8. It's
being added here not because of the pep8 part, but because the pyflakes
equivalent can catch real errors. This uses the babel-eslint parser
since we're using Babel to transpile already.

This auto-formats the existing code with:

  npm run format

Rather than using StandardJS directly through the 'standard' package,
use the standardjs eslint plugin so that we can ignore the camelCase
rule (and any other rule that might emerge in the future)

Many of under_score/camelCase were fixed in a previous version of the patch.
Since the prevailing zuul style is camelCase methods anyway, those fixes
were left. That warning has now been disabled.

Other things, such as == vs. === and ensuring template
strings are in backticks are fixed.

Ignore indentation errors for now - we'll fix them at the end of this
stack and then remove the exclusion.

Add a 'format' npm run target that will run the eslint command with
--fix for ease of fixing reported issues.

Add a 'lint' npm run target and a 'lint' environment that runs with
linting turned to errors. The next patch makes the lint environment more
broadly useful.

When we run lint, also run the BundleAnalyzerPlugin and set the
success-url to the report.

Add an angular controller for status and stream page

Wrap the status and stream page construction with an angular controller
so that all the javascripts can be bundled in a single file.

Building the files locally is wonderful and all, but what we really want
is to make a tarball that has the built code so that it can be deployed.

Put it in the root source dir so that it can be used with the zuul
fetch-javascript-tarball role.

Also, replace the custom npm job with the new build-javascript-content
job which naturally grabs the content we want.

Make a 'main.js' file that imports the other three so that we just have
a single bundle. Then, add a 'vendor' entry in the common webpack file
and use the CommonsChunkPlugin to extract dependencies into their own
bundle. A second CommonsChunkPlugin entry pulls out a little bit of
metadata that would otherwise cause the main and vendor chunks to change
even with no source change. Then add chunkhash into the filename. This
way the files themselves can be aggressively cached.

This all follows recommendations from https://webpack.js.org/guides/caching/
https://webpack.js.org/guides/code-splitting/ and
https://webpack.js.org/guides/output-management/

Change-Id: I2e1230783fe57f1bc3b7818460463df1e659936b
Co-Authored-By: Tristan Cacqueray <tdecacqu@redhat.com>
Co-Authored-By: James E. Blair <jeblair@redhat.com>
2018-03-04 07:20:40 -06:00
Tobias Henkel 7fd7fa3f6f Ignore .mypy_cache
This folder is now generate by the mypy tests.

Change-Id: I90ba009e977df75f53904878ba4715c0be3b499f
2017-07-28 10:26:00 +02:00
Clint Byrum f18ca9cd20 Add coverage artifacts to .gitignore
Change-Id: I786d481d23dc01d1268f1a6d7303a6c089dfdbc6
2017-06-08 10:10:39 -07:00
Joshua Hesketh 25695cbb51 Merge branch 'master' into feature/zuulv3
Change-Id: I37a3c5d4f12917b111b7eb624f8b68689687ebc4
2017-03-06 09:40:04 -08:00
Tobias Henkel e9bc74fb39 Ignore .idea directory
Change-Id: I183b52e548d4684878a0af687b72326ca5dcfd73
2016-11-28 07:40:10 +01:00
Joshua Hesketh 89b67f617c Merge master into feature/zuulv3
Conflicts:
	zuul/connection/gerrit.py
	zuul/lib/connections.py
	zuul/model.py
	zuul/scheduler.py

Change-Id: If1c8ac3bf26bd8c4496ac130958b966d9937519e
2016-02-12 14:10:03 +11:00
JP Sullivan 802c03ccc0 Add vim swap files to .gitignore
Change-Id: I8db056a61e76b58ba0ca98c7b411f656c76352b6
2015-12-10 18:18:34 +00:00
James E. Blair 96f2694b67 Merge configurations with multiple layout files
Add a test for multiple tenants with a partially shared config.

We might use something like this in OpenStack to define common
pipelines but then have separate tenant config files for groups
of projects.

Change-Id: I29dc9327e3d72d5f6797eb2c366c36fe5be8ea8e
2015-12-09 13:44:44 -08:00
Paul Belanger cabc247b5f Ignore .venv directory
Change-Id: I477ef147d2f1d04487613049139107f6b8bb0a3b
Signed-off-by: Paul Belanger <paul.belanger@polybeacon.com>
2013-12-03 17:23:54 -08:00
Monty Taylor bc7588343f Migrate to testrepository.
Needed to move some directory creation around to be contained within the
testcase, but with parallel testing, we shave 48 seconds off the run
time and go from around 60s to around 11. We're also now compatible with
future subunit-based fast-fail semantics when we grow them.

Change-Id: I6c7148c29d1edb5d9469a8c2afe4b31b2b340009
Reviewed-on: https://review.openstack.org/33352
Approved: James E. Blair <corvus@inaugust.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
2013-06-27 01:49:59 +00:00
Monty Taylor 5cc8a47d40 Migrate to pbr.
Change-Id: I734f0f8237fb603ee41a39f06e63c007e79825a9
Reviewed-on: https://review.openstack.org/33350
Reviewed-by: James E. Blair <corvus@inaugust.com>
Reviewed-by: Doug Hellmann <doug.hellmann@dreamhost.com>
Approved: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
2013-06-25 19:04:30 +00:00
James E. Blair 4795838dd2 Add layout file validation.
Based on voluptuous library.

Basic validation should catch typos, missing or extra attributes.
Can be expanded to do more serious validation (ie, specifying
a comment in a trigger should require the event be comment-added).

Adds a command line option to validate a named layout file and
exit.

(Also add dist/ to .gitignore.)

Change-Id: Ia864ebde1765141d4d1a52bc77033689b6210e81
Reviewed-on: https://review.openstack.org/19443
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
2013-01-15 01:17:47 +00:00
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
2012-11-17 01:32:14 +00:00
James E. Blair cdd000764e Add documentation.
Change-Id: I8197ec2e52596fa4136f8af9aa93ea06e56d4d0d
2012-06-08 19:17:28 -07:00
James E. Blair ff986a134b Add Jenkins cleanup thread.
It searches for outstanding builds that haven't reported back
or otherwise can't be found by Jenkins, and marks them complete
with a result of "LOST".  This should help to avoid deadlocks
where Zuul waits forever to hear back from Jenkins after missing
a notification.

Add pyflakes to tox.ini.

Change-Id: I26d3fbf375e82e224448ec3337f9cc97deeccd56
2012-05-30 14:58:35 -07:00
James E. Blair 1ce97ad61c Add .pyc to gitignore.
Fix missing header.

Change-Id: Ib74e8f13323cb2e8c0962a7e072eec0ab275215b
2012-05-29 15:38:19 -07:00
James E. Blair ee743613ce Initial commit. 2012-05-29 14:49:32 -07:00