Commit Graph

21 Commits

Author SHA1 Message Date
Clark Boylan b163a52c25 Only run yarn build when necessary in tools/pip.sh
The Zuul unittest jobs were timing out which prompted me to take a look
at what might be taking extra time. One thing I noticed is that we're
running the yarn build (which runs react-scripts) multiple times when we
really only need to run it once. The reason for that is our check to see
if zuul web has already built is looking for a file that the builds no
longer produce. Update that check to look for a current file and we'll
save a bit of time in our jobs and when running things locally.

Change-Id: Iae3604fbaf072d53895db850cfc989a832b12b27
2022-10-07 13:29:25 -07:00
Clark Boylan bb52902303 Update nodejs runtime to version 16
We had been using version 14 which is the previous LTS. Now there are
problems running:

  npx browserslist@latest --update-db

running out of memory. Update to the current nodejs LTS version to
ensure we are running an up to date runtime that hopefully performs more
consistently with the browserslist command.

Change-Id: Ib20c1090ea0f30b7dac2780b6ed963dd6e4b6f77
2022-03-14 15:29:31 -07:00
James E. Blair 01ffc3a6c1 Don't use --verbose with yarn
This appears to output something like 145,000 lines in our build
logs, so let's be less verbose.

Change-Id: Ie41c1f21a090de84cb51331c00668b9b7f06379a
2021-10-21 13:59:26 -07:00
James E. Blair 819bae3559 Really retry yarn installs
The set -e was subverting the yarn retry loops in tools/pip.sh.

Change-Id: Ibee12479336670142fdc6733e744ab5273cb8c5b
2021-05-05 11:59:28 -07:00
James E. Blair 1736ea8ca2 Retry yarn package installs
We're seeing occasional npm install failures in jobs; retry the
"yarn install" command if it fails.

Also, pass the YARN_REGISTRY env var in the tox remote job.

Change-Id: Ic80dccf0869ce805368f678eafcfdf48f8bf9bea
2021-05-03 11:26:52 -07:00
Tobias Henkel 9cb2e52c59
Use npm mirrors in tox jobs
Opendev runs a caching mirror for npm packages. Use it when running
yarn install during tox tests. Due to the way yarn.lock files work at
the moment we need to patch the lockfile on the fly to inject the
mirror urls [1]. This can be handlel inside the pip.sh where we patch
the lockfile, run yarn and reset it afterwards.

[1] https://github.com/yarnpkg/yarn/issues/2566

Change-Id: Id1f2daac8327f3110e6beeb2d6391baccfd3ce34
2020-07-28 22:21:17 +02: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
Monty Taylor 349991c568 Update node to v14 and update to new jobs
v14 is the latest lts. Let's use it.

Also - rename the jobs to make it clear what they're doing, and
add a dashboard job that points at opendev's multi-tenat api too.

There are new jobs that default to latest node LTS and auto-detect
yarn vs npm. Update to use them.

Depends-On: https://review.opendev.org/728097
Depends-On: https://review.opendev.org/726547
Change-Id: I5717edea2cd09acc5bce673c38bbe7fa8057a376
2020-05-20 14:25:47 -05:00
Zuul ea1d3b7d72 Merge "Retry nodeenv creation" 2020-05-16 15:18:55 +00:00
Sorin Sbarnea 268bab1362 Fix cherrypy dependency conflict
Current set of dependencies brings latest cherrypy which is
incompatible with cheroot we need. This pins cherrypy to last
version that is compatible. The current verision of pip will
still install cherrypy, but the upcoming depsolver is unable to
resolve the conflict.

We also add a fail-safe `pip check` that runs the new depsolver
and should prevent a similar regressions from appearing.

Change-Id: I2b0fa43b906d0919854d30da0ee825002444b201
2020-04-29 22:07:44 +00:00
Tobias Henkel a0844c4b56 Retry nodeenv creation
We saw some failures while creating the nodeenv so add a retry there.

Change-Id: I97d65a31a4d1170e3aa2dae730e6e52e47780c82
2020-04-07 20:04:34 +00:00
Zuul 4e8757d477 Merge "Use nodejs v10 in testing" 2019-06-10 15:57:12 +00:00
James E. Blair eb7b18b38e Revert "Create zuul/web/static on demand"
This reverts commit 64e2bc8ba8.

This appears to have broken js content tarball generation:
 http://zuul.openstack.org/build/f26dc90f339a4359a5cf93a3b0edb96f

Change-Id: I3d4928aeba8449702ba7484cb6b679433b10cbeb
2019-06-04 09:57:04 -07:00
Clark Boylan aa350543b4 Use nodejs v10 in testing
We currently use a mix of nodejs 6, 8, and 10 across different jobs.
Lets standardize on nodejs 10 everywhere.

Change-Id: Iec9bbf270589029d10c60ed602817e853c6e5bc4
2019-05-30 14:27:30 -07:00
Tobias Henkel 64e2bc8ba8
Create zuul/web/static on demand
We generate the static web build into zuul/web/static which gets
cleaned by yarn before the build. This directory must be existing
before running the yarn build. In order to guarantee that it exists we
currently have the file zuul/web/static/.keep under version
control. This problem with this is that every time the yarn build is
done (e.g. re-creating the tox environment) this file is deleted. This
file deletion is often added to commits accidentally. We can avoid
needing this file if we create the target dir on demand.

Change-Id: I6e94316a89373af1cbfc0abcfc403b54e33046a3
2019-05-26 20:58:46 +02:00
Tobias Henkel fa0715eeac
Move ansible installation from pre_command to install phase in tox
We currently install ansible during the pre_command phase in tox. This
breaks the following use case:

  tox -e py36 --notest
  ttrun <test case>

This is broken now because ttrun doesn't run pre_commands. Instead we
already have a pip wrapper that does the nodeenv installation. We can
use this to also call zuul-manage-ansible on zuul installation.

Change-Id: I680777e5406368d35366602ac37e029db91c8a5c
2019-03-19 10:09:36 +01:00
Tristan Cacqueray 68d1189871
Revert "Revert "web: rewrite interface in react""
This reverts commit 3dba813c64.

Change-Id: I233797a9b4e3485491c49675da2c2efbdba59449
2018-10-06 10:42:31 -05:00
James E. Blair 3dba813c64 Revert "web: rewrite interface in react"
Revert "Fix publish-openstack-javascript-content"

This reverts commit ca199eb9db.
This reverts commit 1082faae95.

This appears to remove the tarball publishing system that we rely on.

Change-Id: Id746fb826dfc01b157c5b772adc1d2991ddcd93a
2018-09-29 11:51:43 -07:00
Tristan Cacqueray 1082faae95 web: rewrite interface in react
This change rewrites the web interface using React:
http://lists.zuul-ci.org/pipermail/zuul-discuss/2018-August/000528.html

Depends-On: https://review.openstack.org/591964
Change-Id: Ic6c33102ac3da69ebd0b8e9c6c8b431d51f3cfd4
Co-Authored-By: Monty Taylor <mordred@inaugust.com>
Co-Authored-By: James E. Blair <jeblair@redhat.com>
2018-09-27 02:14:46 +00:00
James E. Blair 1e2ec9ad57 Pin node to version 8: LTS stable
The 10.0.0 release is incompatible with upath 1.0.4:

  error upath@1.0.4: The engine "node" is incompatible with this module. Expected version ">=4 <=9".

Version 8 is the LTS stable series, 8.11.1 is the latest in that series.

Change-Id: I8251d1e6d815763ac291097d9f4f0ef90195b88b
2018-04-24 15:47:15 -07:00
Monty Taylor fadd15a001
Use nodeenv for npm and yarn in tox
Add a wrapper installation script that will install npm and yarn into the
current virtualenv. If yarn is installed globally, the script is a
no-op.

If yarn is not installed globally, whenever tox thinks it needs to
create or re-create a virtualenv, install nodeenv then use it to
install yarn.

This removes the use of the zuul-tox-py35 job because it should now just work
properly with the normal job. It does not remove the job itself because
it's still used in tox-py35-on-zuul.

Change-Id: If360a3f0c6b3d74498f8aa063d8b1ae87daff101
2018-04-12 12:38:55 -05:00