Commit graph

238 commits

Author SHA1 Message Date
Cockpit Project
c2a5c6df77 package.json: Update @patternfly/react-core package dependency
Closes #401
2020-12-15 08:27:21 +01:00
Martin Pitt
8771907002 workflows: Fix apt installation in npm-update
GitHub's base VMs don't automatically refresh package indexes, so it can
happen that one of the package dependencies get out of date and are not
available on the mirrors any more.

Run `apt update` first to ensure that the workflow installs the latest
packages.
2020-12-11 10:11:57 +02:00
Cockpit Project
224d9a2a12 package.json: Update core-js package dependency
Closes #399
2020-12-06 07:50:14 +01:00
Martin Pitt
f95b9a0373
workflows: Update release container registry
With [1] the release container moved from dockerhub to GitHub's
container registry, as we both build and use it from GitHub. This avoids
running into docker.io pull limits.

[1] https://github.com/cockpit-project/cockpituous/pull/353

Closes #398
2020-12-02 10:29:38 +01:00
Martin Pitt
7fca9b9a26 webpack: Compress css in production mode
Adjust the WEBPACK_TEST file, as index.css is now not reliable (in
production mode it's .css.gz).

Closes #395
2020-11-26 11:17:04 +01:00
Martin Pitt
61db732b4a webpack: Drop compression plugin's minRatio option
The default of 0.8 is just fine, no need to tweak this.
2020-11-26 11:17:04 +01:00
Martin Pitt
8874e6a233 webpack: Declare constants as such 2020-11-26 11:17:04 +01:00
Martin Pitt
9fd1cf7f3f webpack: Simplify copied files
As `files` is now the only entry in `info`, rename it to a `copy_files`
constant, and drop `info` completely.

Drop the "qualify" loop and add the src/ subdirectory to the path
directly. This is more explicit, thus easier to understand, and simpler.

Drop the now unused "vpath" function.
2020-11-26 11:17:04 +01:00
Martin Pitt
230c338a5a webpack: Simplify module.entries
Drop the "qualify" loop and add the src/ subdirectory to the path
directly. This is more explicit, thus easier to understand, and simpler.

Also move it into the `modules` declaration directly, so that (1) it's
easier to see what it actually means, and (2) info.files is for a
completely different purpose.
2020-11-26 11:17:04 +01:00
Martin Pitt
8aad356edb webpack: Simplify externals declaration
This is simple enough to be inline, and it's also not meant to be
expanded: `cockpit` is the only legit external symbol, everything else
ought to be bundled.
2020-11-26 11:17:04 +01:00
Martin Pitt
8ea62cb4d7 webpack: Drop unnecessary output settings
The default of `path` and `sourceMapFilename` are already what we want,
no need to set them explicitly.

The `output.filename` is already `[name].js`, and it's totally not
important to name the file differently in production mode (it will then
just be `index.js.gz`, compared to index.js in development mode).
2020-11-26 11:17:04 +01:00
Cockpit Project
d3d1df5533 package.json: Update core-js package dependency
Closes #397
2020-11-26 06:25:38 +01:00
Martin Pitt
c1c2d83b81 Bump test/common dependency to 233
This gets rid of the hack for
<https://github.com/cockpit-project/cockpit/issues/14133>.
2020-11-25 21:09:53 +01:00
Cockpit Project
5f3c5c8436 package.json: Update @patternfly/patternfly package dependency
Closes #394
2020-11-22 11:51:57 +01:00
Cockpit Project
b49d1d48dc package.json: Update @patternfly/react-core package dependency
Closes #393
2020-11-19 05:48:47 +01:00
Cockpit Project
92f009d489 package.json: Update core-js package dependency
Closes #392
2020-11-07 16:25:28 +01:00
Cockpit Project
7dacf49b9a package.json: Update @patternfly/react-core package dependency
Closes #389
2020-10-30 06:21:08 +01:00
Martin Pitt
0ea06f9235 Run integration tests in Travis
Travis now offers /dev/kvm, and its machines are powerful enough to run
our browser integration tests, at least for small projects.

Building an RPM on the Ubuntu host environment is a bit tricky, as there
are no installed RPMs. Thus ignore the BuildRequires, and install
appstream-util explicitly. In the future, the rpm/deb build should
happen inside the VM (like Cockpit does).

Add two scenarios for current Fedora and CentOS 8.

Switch to the "minimal" environment to make the test easier to reproduce
locally and more explicit.

Closes #386
2020-10-29 07:23:54 +01:00
Martin Pitt
180dde395e Makefile: Fix PO template generation dependencies
*2po tools need the npm modules installed.
2020-10-29 07:23:54 +01:00
Cockpit Project
fcab193597 package.json: Update @patternfly/patternfly package dependency
Closes #387
2020-10-29 06:49:59 +01:00
Martin Pitt
233b5cfe04 Use sassc instead of node-sass
node-sass is a compiled ELF module, which is problematic for
distributions that want to rebuild everything from source. The sassc CLI
program is packaged everywhere, and both use the same libsass library.

So drop node-sass and sass-loader, and replace it with a simple loader
wrapper around sassc.

This also saves 122 npm packages (16 MB in node_modules/).

Closes #382
2020-10-28 14:49:52 +01:00
Martin Pitt
ea1377da1c Travis: Move to Ubuntu 20.04 LTS 2020-10-28 14:49:52 +01:00
Sanne Raymaekers
3703120a23
Makefile: Bump test/common to 230
Closes #385
2020-10-28 10:15:32 +01:00
Cockpituous
29fb8b5c98 package.json: Update react-dom package dependency
Closes #383
2020-10-20 09:08:39 +02:00
Martin Pitt
8e16b06df2
Run npm-update in a GitHub workflow
This avoids a lot of moving parts in our infrastructure (webhook,
npm-trigger roundtrip, tasks container), works in exactly the same way
for independent third-party projects, and does not need *any* secret
other than the automatically provided GitHub token.

Let this run early every morning, roughly similar frequency as
cockpituous used to do. Also add a manual trigger, so that we get a
button to run it on demand.

Closes #384
2020-10-20 09:08:08 +02:00
Cockpit Bots
7838cb70a9
package.json: Update react package dependency (#381)
Closes #381
2020-10-16 22:07:15 +02:00
Cockpituous
b6a10e5cfe package.json: Update @patternfly/patternfly package dependency
Closes #379
2020-10-13 19:34:14 +02:00
Martin Pitt
2a51e057d7 Show how to run the release in GitHub workflow
Enter the new world of GitHub actions [1]/GitLab pipelines [2]. This
simplifies our end of the infrastructure considerably:

* No need any more to set up webhooks, all the relevant configuration
  is right in the workflow file.

* Does not need any infrastructure on our side any more, and thus works
  for third-party projects. They just need to set up their own secrets.

* GitHub automatically provides a temporary `GITHUB_TOKEN` with
  sufficient write access to the project to publish a release, so we
  don't need to carry around that secret. Thus if your project only
  releases to GitHub, there is zero secrets management.

Also adjust cockpituous-release a bit (update Fedora version, fix
project name copy-pasta), point to the action workflow and necessary
secrets.

Closes #380
2020-10-13 09:37:35 +02:00
Cockpituous
499eca014b package.json: Update @patternfly/react-core package dependency
Closes #378
2020-10-09 22:30:48 +02:00
Martin Pitt
cbedf06704 Fix building PO template
The current version failed with

    Option "--directory" requires 1 arguments, but 0 were provided

In the current stdio npm module version, getopt() now requires a
`default:` attribute, otherwise it considers the options as required.

Also sync PO helpers with current cockpit.

Add PO template build to travis check, to make sure that it keeps
working.

Closes #375
2020-09-29 13:50:31 +03:00
Martin Pitt
6f8cd78783 Use standard "translate" marker in HTML
Cockpit's test-static-code complains about `translatable`, so let's use
the correct attribute to avoid spreading it further.
2020-09-29 13:50:31 +03:00
Martin Pitt
8f93db2234 npm: Upgrade eslint to current major versions
Closes #373
2020-09-28 07:49:01 +02:00
Martin Pitt
a5ade152a8 npm: Upgrade webpack related development dependencies
compression-webpack-plugin fixes https://www.npmjs.com/advisories/1548

Adjust to new copy-webpack-plugin API.

Thew new modules now create dist/index.html.gz in `NODE_ENV=production`
mode, so switch `WEBPACK_TEST` to index.css instead (which remains
uncompressed in both modes).
2020-09-28 07:49:01 +02:00
Martin Pitt
e4dc9d7118 travis: Move to current LTS node.js
Version 8 is ancient and not supported any more, see
https://docs.travis-ci.com/user/languages/javascript-with-nodejs/

Newer versions of copy-webpack-plugin don't work any more with 8.
2020-09-28 07:49:01 +02:00
Cockpituous
44b94eb59d package.json: Update @patternfly/patternfly package dependency
Closes #372
2020-09-25 08:48:07 +02:00
Martin Pitt
6bd2f3ed94 Makefile: Serialize git commands using flock
We previously made directories depend on files for the synthetic
serialization of git commands. git does not track directories, and
time stamps across repos (starter-kit vs. bots) work rather poorly --
for example, this broke "bots" being a symlink to a previously existing
checkout.

Use file locking instead, which is a more direct way of ensuring that
there is only one git operation that affects the current checkout. We
don't need to flock bots/, as that's an independent git repository.

Closes #371
2020-09-22 08:50:54 +02:00
Martin Pitt
661ca771b3
Makefile: Replace git restore command
This is a relatively recent git feature which is not present in e.g.
Debian 9 yet. Use `git reset` instead, like in the test/common rule.

Fixes #369
Closes #370
2020-09-22 07:51:54 +02:00
Cockpituous
0a47c6f034 package.json: Update @patternfly/react-core package dependency
Closes #368
2020-09-21 12:32:01 +02:00
Matej Marusak
d7f9b03f3a
test: Bump test/common to 228
On the login page the `Reuse password` checkbox was dropped and that
makes all the tests to fail.
See ef97e7e9a2

Closes #366
2020-09-21 12:19:25 +02:00
Martin Pitt
080b20af94
Ensure application CSS has priority over library CSS
Import our application CSS as the very last thing, so that it can
properly override  PatternFly variables. Before, our application CSS
could land in the first third of dist/index.css *before* PatternFly's
definitions, so that the latter overrode the former [1].

This is a long-standing bug in mini-css-extract-plugin ([2] and
countless things that point to it) with `NODE_ENV=production` builds.

As a workaround, make sure that app.scss is the absolutely last imported
CSS, instead of "almost last". It is still conceptually correct for the
application CSS to be able to override patternfly-4-overrides.scss.

Closes #362
[1] https://github.com/martinpitt/performance-graphs/issues/10
[2] https://github.com/webpack-contrib/mini-css-extract-plugin/issues/188
2020-09-08 18:53:12 +02:00
Martin Pitt
cfced19000 Makefile: Serialize git cloning targets
The `bots`, `test/common`, and `src/lib/patternfly` targets cannot be
run in parallel, as they compete for the git lock.

Serialize them by adding arbitrary dependencies to them.
2020-09-08 17:14:34 +02:00
Katerina Koukiou
203604a463 Copy patternfly import files from cockpit project automatically
Closes #357
2020-09-08 17:14:34 +02:00
Cockpituous
0ec0856e0e package.json: Update @patternfly/react-core package dependency
Closes #359
2020-08-31 09:15:04 +02:00
Cockpituous
33d1b4425d package.json: Update @patternfly/patternfly package dependency
Closes #358
2020-08-27 17:28:03 +02:00
Cockpituous
427f85795a package.json: Update @patternfly/react-core package dependency
Closes #355
2020-08-20 12:16:14 +02:00
Martin Pitt
be1f24b8bc metainfo: Fix launchable and update description
`<launchable>` must coincide with the actual URL path defined by the
manifest.

Remove the period from `<summary>`, as the spec [1] suggests.

[1] https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#sect-Metadata-GenericComponent

Closes #350
2020-08-05 13:45:57 +02:00
Martin Pitt
fc4333b50e Makefile: Don't hardcode starter-kit in variable 2020-08-05 13:45:57 +02:00
Martin Pitt
7aa26f19ad travis: Move to Ubuntu 20.04 LTS
Trusty, aka 14.04 LTS, is not officially supported any more.
2020-08-05 13:45:57 +02:00
Martin Pitt
cd778dbe12 Bump Cockpit test API to 224 2020-08-05 13:45:57 +02:00
Martin Pitt
49a721354c
Exclude node_modules from webpack watching
This recently started to overflow inotify, and we don't need that --
it's fine to restart webpack when changing package.json, and it happens
rarely enough.

Closes #345
2020-07-23 18:04:54 +02:00