Commit graph

217 commits

Author SHA1 Message Date
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
Martin Pitt
2bb8e01d2d
Port to PatternFly 4.x
Closes #343
2020-07-21 10:33:48 +02:00
Martin Pitt
f2a11ba1de
npm: Bump development dependencies
Closes #334
2020-06-29 22:16:55 +02:00
Cockpituous
96dfac3862 package.json: Update @patternfly/patternfly package dependency
Closes #332
2020-06-26 11:47:04 +02:00
Cockpituous
f2644bff9b package.json: Update @patternfly/react-core package dependency
Closes #329
2020-06-14 16:59:01 +02:00
Martin Pitt
820549d862
test: Adjust to new navigation in Cockpit 220
The parent element `#navbar-dropdown` exists in both old and new
versions.

Closes #325
2020-06-02 08:44:49 +02:00
Martin Pitt
5660330c4c
Drop Vagrantfile
Nobody in the development team has ever really used that, it needs a ton
of dependencies, and doesn't work in toolbox/Silverblue. Our own
vm-run/image-customize etc. machinery is efficient enough, and proven to
work.

Closes #321
2020-05-29 11:16:35 +02:00
Martin Pitt
4166f0a5d4 Use cockpit 220's test runner
This will format the test output as TAP and thus provide nice log.html
output.

Closes #320
2020-05-28 10:52:41 +02:00
Martin Pitt
c039821e18 README: Bump fedora version 2020-05-28 10:52:41 +02:00
Martin Pitt
c083e8a7cf package.json: Fix versions
Use ^ for node-sass, it's a development dependency.

Drop the ^ for patternfly, as these are runtime dependencies controlled
by our npm-update bot.
2020-05-28 10:52:41 +02:00
Katerina Koukiou
96514e279e
main: Stop importing patternfly.css
* Stop importing cockpit's base1/patternfly.css

This is deprecated API and will be dropped at some point, in favor
of projects shipping their own CSS.

Install and import the styles from PF4 now.

* Use webpack based string replacement for removing the font-face rules from PF4

Doing the seddery in Makefile breaks `npm run build`, webpack watching,
and is generally brittle.
Do the font replacement hacking with `string-replace-loader`, which fits into webpack much more nicely.

There is still some potential simplification by not duplicating the
entire scss loader chain.

Co-authored-by: Martin Pitt <martin@piware.de>

Closes #315
2020-05-28 10:01:31 +02:00
Matej Marusak
8adad16874
Bump up version of test/common
There has been a lot of improvements since 213 and also due to new
privilege escalation this is need.

Closes #317
2020-05-23 07:51:00 +02:00
Cockpituous
ccc8d7fc89 package.json: Update node-sass package dependency
Closes #311
2020-05-08 10:53:29 +02:00
Cockpituous
744c1ddb6e package.json: Update node-sass package dependency 2020-04-25 19:59:46 +02:00
Cockpituous
30f646bfa1 package.json: Update core-js package dependency
Closes #302
2020-04-13 09:14:30 +02:00
Cockpituous
7836502c6b package.json: Update react-dom package dependency
Closes #298
2020-03-28 21:09:37 +01:00
Cockpituous
1d0fd48e2d package.json: Update react package dependency
Closes #296
2020-03-22 21:28:38 +01:00
Martin Pitt
d544bda271 test: Use test scenario for selecting browser
Similar to what cockpit-composer does. This is rather simplistic, but
does fine until we need more complex scenarios.

Also use plain shell in test/run, there are no bashisms.

Closes #291
2020-03-10 17:52:30 +01:00
Martin Pitt
115e5a885f Makefile: Use proper file dependencies
Avoid phony dependencies, as they break timestamp comparison and thus
always cause rebuilding of the tarball, rpm, and (the very expensive) VM
for each `make check`, even if only the tests (or nothing at all)
changed.

Use `rpmspec` to predict the name of the built rpm. Use the .spec.in
file directly, as we can't depend on the generated .spec file in the
variable definition.

Closes #290
2020-03-10 11:49:29 +01:00
Martin Pitt
38bd17faef Make cockpit-starter-kit.spec.in rpmspec compliant
Use `%{VERSION}` as version macro instead of `@VERSION@`, so that the
.spec.in file is syntactically a correct spec file that can be parsed
with `rpmspec`.
2020-03-10 11:49:29 +01:00
Martin Pitt
b0bf8afa48 test: Trim package installation
We don't need the full cockpit metapackage with cockpit-docker, etc.
The starter-kit RPM will already pull in cockpit-system, so we just need
cockpit-ws.
2020-03-10 11:49:29 +01:00
Martin Pitt
696ef20f32 Bump cockpit test API to 213 2020-03-10 11:49:29 +01:00