Commit Graph

217 Commits

Author SHA1 Message Date
Allison Karlitskaya f06a1136f4 workflows/unit-tests: disable seccomp for podman
For some reason this starts causing trouble with `make distcheck` in
Fedora 40.
2024-04-30 13:17:02 +02:00
Martin Pitt f50edd913c dependabot: Group react packages
react and react-dom need to be kept in sync.
2024-04-11 09:36:11 +02:00
Martin Pitt 2e1b2980b4 dependabot: Update all typescript related packages as a group
They get new releases very often and cause too much CI churn/conflicts
otherwise.
2024-04-11 08:53:52 +02:00
Martin Pitt d34cabacb8 workflows: Run release on Ubuntu 20.04
Just like the "reposchutz" and "dependabot" workflows, run "release" on
ubuntu 20.04. Podman in 22.04 creates truncated tarballs when streaming
them through stdout.
2024-04-10 13:58:57 +02:00
Martin Pitt df41e3f757 workflows: Run tasks-container-update in "self" environment
This workflow produces PRs which need to run reposchutz, so they need to
be pushed via SSH, not the GitHub token.
2024-04-09 10:11:38 +02:00
Allison Karlitskaya eabef5a10a tools: add 'release' script
This is a new script for building Cockpit releases.  It essentially does
what we do now, except:

 - we use the container version specified in our .cockpit-ci/container
   file

 - we download everything with a single invocation of `git clone`, which
   downloads all the required submodules, but only does a shallow fetch

 - we run the build process entirely offline, inside of its own
   container

The new script is meant to be more accessible to anyone who may be
interested in running it, including outside of GitHub, and is written in
a way that attempts to convince its reader that nothing tricky is going
on.  It should always produce a byte-for-byte identical release as the
official one.  It acts as a convenient way to verify the reproducibility
and validity of a Cockpit release, and also as an alternative to
downloading the tarball from GitHub.
2024-04-03 07:24:50 +02:00
Martin Pitt a8c3aa5dc8 Move remaining quay.io/cockpit/tasks references to ghcr.io 2024-04-02 17:43:17 +02:00
Martin Pitt bb231192df workflows: Move tasks-container-update to Sunday night
We previously ran tasks-container-update and cockpit-lib-update at the
same time, which sometimes collides. Move it to the night between Sunday
and Monday instead, so that we have the updates ready for us to inspect
when we start our week.
2024-03-26 11:29:12 +01:00
Marius Vollmer fa8dfd9653 ci: Don't use "make" in tasks-container-update
Instead, use test/common/make-bots directly. The Makefile only exists
after running autogen.sh, and we really don't need to do that just to
get the bots.
2024-03-21 09:05:09 +01:00
Jelle van der Waa 64b3b17161 workflows: add tasks-container-update workflow
This workflow tries to update our cockpit CI container on a weekly
interval.
2024-03-19 11:38:11 +01:00
Allison Karlitskaya 6f53f89568 misc: move to new tasks container location 2024-03-18 12:36:47 +01:00
Allison Karlitskaya da22d7a749 workflows: run unit-tests in the correct container 2024-03-13 17:01:48 +01:00
Martin Pitt 0be8662240 workflows: Allow urls-check to write issues
Commit bc7e2bf38f was wrong: This workflow only doesn't need any
permissions if all URLs are valid. But if not, then it wants to
update/create an issue to notify us about that.
2024-03-13 16:30:00 +01:00
Allison Karlitskaya 962fbcad0d flatpak: use org.flatpak.Builder flatpak
This is what gets used to build us on flathub, so better to find out
about potential issues earlier than later.
2024-03-13 07:08:03 +01:00
Martin Pitt 8c559b16ad workflows: Bump action-release to get github-script@v7
This gets rid of the obsolete node.js 16. See
https://github.com/cockpit-project/action-release/commit/7d2e2657382e8
2024-02-27 11:39:26 +01:00
Martin Pitt 2e18e81fe5 workflows: Move weblate-sync-pot.yml to cockpit/tasks container
This was forgotten in commit f16f1fc14b
2024-02-22 09:55:06 +01:00
Martin Pitt 1de8c1aeb4 workflows: Switch tarball generation job to the tasks container
This was forgotten in commit f16f1fc14b.
2024-02-16 12:20:51 +01:00
Martin Pitt f16f1fc14b workflows: Run unit tests in our tasks container
This reduces our tools like `ruff` to a single source of truth (as all
our other projects already run their unit tests and linting in the tasks
container). It also removes a lot of moving parts only relevant for CI.
In practice, us developers run the unit tests in toolbox or our own dev
machines anyway.

Move building the guide in the release workflow to the tasks container
as well.
2024-02-14 09:43:09 +01:00
Martin Pitt 15a98ff833 workflows: Drop clang unit test
It hasn't helped us in years, modern gcc has good static analysis (plus
of course CodeQL and Coverity), none of our supported downstream distros
care, and we are not going to add significant amounts of C code any
more.
2024-02-14 09:43:09 +01:00
Martin Pitt 59e1df60b3 workflows: Drop i386 unit test/container
We won't add a lot of new C code any more, valgrinding Python code isn't
very useful (or architecture specific), and more and more distributions
drop i386 support. Also, we still run the unit tests during RPM package
build through packit/COPR, which cover even more architectures.

This paves the way for dropping the unit test container altogether in
favor of running the tests in the cockpit/tasks container, once we agree
on how to build a proper staging setup.

Drop tools/valgrind.supp which was only relevant for i386.
2024-02-14 09:43:09 +01:00
Martin Pitt bb96d7df88 workflows: Drop C bridge unit tests
We don't support the C bridge on this branch any more.
2024-02-14 09:43:09 +01:00
dependabot[bot] ca6201e702 build(deps): bump actions/github-script from 6 to 7
Bumps [actions/github-script](https://github.com/actions/github-script) from 6 to 7.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](https://github.com/actions/github-script/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-10 08:47:50 +01:00
dependabot[bot] 53f54e42e2 build(deps): bump actions/checkout from 3 to 4
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-10 08:47:42 +01:00
Jelle van der Waa 52e9a41ff3 .github: don't run integration tests on actions changes 2024-02-10 07:59:14 +01:00
Allison Karlitskaya 9f0d8781ef workflows: stop using actions/setup-python
This was added by 09fe9eeef9 which needed
it for `xml.etree.ElementTree.indent` but the `ubuntu-latest` GitHub
Actions image has gained Python 3.10 since then, so this is now
superfluous.  Drop it.
2024-02-09 16:06:51 +01:00
dependabot[bot] baf27b2e3b build(deps): bump github/codeql-action from 2 to 3
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2 to 3.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-09 08:22:47 +01:00
dependabot[bot] a7c62c52ab build(deps): bump redhat-plumbers-in-action/differential-shellcheck
Bumps [redhat-plumbers-in-action/differential-shellcheck](https://github.com/redhat-plumbers-in-action/differential-shellcheck) from 4 to 5.
- [Release notes](https://github.com/redhat-plumbers-in-action/differential-shellcheck/releases)
- [Changelog](https://github.com/redhat-plumbers-in-action/differential-shellcheck/blob/main/docs/CHANGELOG.md)
- [Commits](https://github.com/redhat-plumbers-in-action/differential-shellcheck/compare/v4...v5)

---
updated-dependencies:
- dependency-name: redhat-plumbers-in-action/differential-shellcheck
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-09 07:49:44 +01:00
Jelle van der Waa 56495b7247 .github: update workflow checkout actions to v4
Node.js 16 actions are deprecated. Please update the following actions
to use Node.js 20.
2024-02-09 07:45:44 +01:00
Jelle van der Waa 17165a227e
github: allow dependabot to update github workflow actions
Github usually updates their actions once a while and then warns about a
node env getting deprecated in runs. Which is not super easily spotted
by a developer until it's too late, so let's like npm let dependabot
handle updating.
2024-02-09 07:12:47 +01:00
Marius Vollmer 95eda94a47 unit-tests: Run "make check" when refreshing the container
Running just "make distcheck" somehow misses regressions in
test/static-code.
2023-12-11 13:19:26 +01:00
Martin Pitt 5300deb796 workflows: Update Anaconda trigger for -webui split
Since https://github.com/cockpit-project/bots/pull/5524/files
rhinstaller/anaconda was an unknown project. Update it for the webui
split-out.
2023-11-20 13:52:11 +01:00
Martin Pitt 7c56290d67 workflows: Drop COCKPITUOUS_TOKEN from trigger-anaconda.yml
https://github.com/cockpit-project/bots/pull/5569 changed the allowlist
from a GitHub team to a hardcoded Python list, so we don't need the
cockpituous token privilege with its `read:org` any more.
2023-11-20 13:52:11 +01:00
Allison Karlitskaya bb18b8d9e4 workflows: drop pybridge-c8s.yml
At some point this made sense as a very rudimentary smoke test that we
weren't using language features that weren't compatible with Python 3.6,
but we've long been running our entire unit tests suite under Python 3.6
in our tox workflow.

What's more: this workflow often fails due to inability to fetch patches
from the CentOS mirrors.

Let's drop this one.
2023-10-26 13:55:55 +02:00
Martin Pitt d8246f1a82 workflows: Switch anaconda trigger COPR polling to timestamp comparison
Expecting the branch'es HEAD SHA does not work for proposed branches
which are behind the target branch (i.e. usually `main`). For those,
the packit source RPM build does a merge first, which produces an
unpredictable SHA, which ends up as the COPR package'es version.

Switch to a time based approach: Parse the timestamp from the package
version, and wait until it is newer than the most recent push to the
target branch.

https://issues.redhat.com/browse/COCKPIT-1071
2023-10-17 16:28:24 +02:00
Martin Pitt 953a6eeb9b workflows: Trigger anaconda test on bridge/storaged changes
We want to make sure to not break Anaconda with changes which affect it,
i.e. the bridge or the Storage page. As Anaconda's tests are "special"
(require booting boot.iso, can't run in tmt/Testing Farm), we need to
run them in Cockpit's CI.

Add a workflow which runs if the PR affects Anaconda (changes to the
bridge or Storage page), polls the packit COPR until it has the current
PR version available, and then test-triggers a "cockpit PR" scenario.

https://issues.redhat.com/browse/COCKPIT-1064
2023-10-11 13:03:37 +02:00
Martin Pitt 375f0995f1 dependabot: Run in our evenings, reduce limit
So far the daily updates tend to run in our mornings between 7:00 and
8:00, which blocks our CI for a long time, and thus collides with
developers sending PRs. Move them to the evening instead, when they can
use the quiet bots time.

Also reduce the number of parallel PRs from 5 to 3. Parallel ones always
need to be rebased, and thus are very expensive. We still want to be
able to have a complicated PatternFly PR open for several days without
blocking other updates.
2023-10-06 10:06:26 +02:00
Jelle van der Waa da4d19f574 .github: add kdump as page section for bug reports 2023-10-04 21:35:43 +02:00
Jelle van der Waa 05e60497e4 Switch to dependabot for node_modules updates
Pin our devDependencies, as they will now be updated via dependabot in a
more controlled fashion.
2023-10-04 04:38:59 +02:00
Martin Pitt d9f988f5e8 flatpak: Add SSH login test
Exercise the beiboot → SSH code path with actual interaction (user and
password).

Only run the test when giving `$COCKPIT_TEST_SSH_{HOST,PASS}`. That way,
developers can run the test locally against our usual test VM:

    COCKPIT_TEST_SSH_HOST=admin@127.0.0.2:2201 COCKPIT_TEST_SSH_PASS=foobar

Create a user in the GitHub VM.
2023-09-29 17:06:44 +02:00
Martin Pitt ea870fab68 workflows: Retry `dnf install` in pybridge-c8s
This is prone to failing on transient networking issues. It also often
just hangs indefinitely, so timebox each iteration.
2023-09-27 08:48:17 +02:00
Martin Pitt 751a9faa4a workflows: Run "daily" scenario every night
This covers the runs against the dnf and udisks daily COPRs. That's the
last bit to obsolete our fedora-testing refreshes.
2023-09-10 20:03:29 +02:00
Martin Pitt 36cc2b0268 workflows: Fix nightly invocation
`make bots` is not a thing in cockpit.
2023-09-10 20:03:29 +02:00
Jelle van der Waa 2bac35e5ec .github: add nightly testing scenario
This tests Cockpit nightly with `updates-testing` enabled.
2023-09-10 10:16:19 +02:00
Martin Pitt 14c07d7087 build: Make Python bridge the default
Replace --enable-pybridge with --enable-old-bridge, and flip the logic.
That way, it will slowly disappear as old distro releases become
unsupported. This also means that builders from upstream now get the
Python bridge by default.

The distcheck scenarios now apply to the Python bridge. Add a
`$DEB_PYTHON_INSTALL_LAYOUT` hack to work around
https://bugs.debian.org/1035546 to unbreak the installation of the
generated wrapper binaries, as by default they'd go into
prefix/usr/local/bin on Debian.

Add a new distcheck scenario for the C bridge, to ensure that we don't
break that.

https://issues.redhat.com/browse/COCKPIT-1037
2023-09-08 12:36:49 +02:00
Allison Karlitskaya eab0640513 modules: rename to vendor
This is a lot more tab-complete-friendly and it's also closer to what
many other packages do for similar situations.
2023-09-07 17:48:36 +02:00
Martin Pitt ecf6250712 workflows: Drop i386 clang check-memory
In recent Debian testing, valgrind now shows a gazillion
Memcheck:{Cond,Value4} errors all over the place: in GMP, GnuTLS, glib
hashtables, and even strcmp(). Give up at last, and run valgrind on 64
bit only. This also becomes less important with us moving more and more
code away from C.

Add a comment about the explicit "check" run. It was introduced in
commit 1ef0001abf to run static code checks, which don't work against a
tarball in "distcheck".

Change the order in unit-tests-refresh.yml to match the order in
unit-tests.yml to reduce confusion.
2023-08-24 15:25:26 +02:00
Jelle van der Waa d974c4bbcd .github: scan JavaScript code with codeql 2023-08-23 11:06:36 +02:00
Allison Karlitskaya e830319f99 .github/workflows: add a tox-venv test
Run all of our python tests in all possible venvs on each PR.
2023-07-04 16:45:11 +02:00
Allison Karlitskaya 236ab5062e flatpak: Change approach to external packages
Port containers/flatpak/prepare to Python, with the following changes:

 - cockpit-beiboot is now unconditionally enabled

 - instead of keeping a static list of .tar.xz files for extra packages
   in-tree, we add a --packages= option which presents two extra
   options:

     - create the file by scanning upstreams for the latest release

     - download the extra packages from downstream (read: flathub)

 - our sed-templated .yml.in quasi-format is abandoned in favour of just
   writing the manifest data directly into the prepare script.  This is
   easier than figuring out a better approach to templating, and allows
   us to remove yaml from the process entirely.  All produced files are
   now JSON, which flatpak-builder is also happy to consume.

Modify the release process to scan upstream for new packages and update
the downstream list accordingly.

For other users (humans, CI): the first time containers/flatpak/prepare
is run, --packages=downstream is the default.  It will write a copy of
the downloaded packages file to the current directory, and after that,
this local copy will be used.

The idea here is two-fold:

 - downloading a single file from downstream is a lot faster and easier
   than scanning upstream for new releases all the time

 - this provides something like a "stable downstream image" to test
   upstream cockpit changes against which will prevent changes in a new
   release of one of our modules from causing our CI to go red in
   cockpit.
2023-06-27 19:42:06 +02:00
Martin Pitt 40c1b98bc2 workflows: Run pytest-cov scenario in unit-tests-refresh
This spontaneously broke our CI the last time around, as ruff got
upgraded and started to complain.
2023-06-22 20:03:36 +02:00