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.
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/353Closes#398
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.
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.
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.
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).
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
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
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
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
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
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).
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
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#369Closes#370
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
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.
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