Commit Graph

33 Commits

Author SHA1 Message Date
Marcel
8b03d6448e Update matrix-appservice-bridge and use our own alias for matrix-bot-sdk (#609)
* Update matrix-appservice-bridge and use our own alias for matrix-bot-sdk

* Bump node version to support matrix-appservice-bridge

* Bump node version in CI

* Fix comments

* Add changelog entry
2024-10-10 12:11:26 +02:00
Gnuxie
b13b6150e5 Use multi-stage build in Dockerfile (#595)
* Use multi-stage build in Dockerfile

https://github.com/the-draupnir-project/Draupnir/issues/300.

* Move git describe and build into one stage.

Probably won't be a good idea to download an alpine image just to install git.

* Remove git describe step from CI.

* whoopsie, copy version from the build stage not the deleted stamp.
2024-10-10 09:35:23 +01:00
gnuxie
bdf0ed0bcc Re-add the unit test CI step.
This reverts commit 0854aec780.
But also we edit it so that the command is correct again.
2024-09-09 13:28:16 +01:00
gnuxie
0854aec780 Temporarily disable unit tests because...
We moved these tests to @the-draupnir-project/interface-manager.

We will get some more unit tests shortly...
2024-09-06 17:18:53 +01:00
Gnuxie
337a6a3b76 Add reuse.software (#486)
We have a lot of verbose headers, and i think now is the best opportunity we have to become reuse compliant given that we just did two other similar maintenance changes (prettier, typescirpt5 & eslint9 & typescript-eslint).

* synapse_antispam resuse headers.

* delete old unused tslint.json.

* Add REUSE to pre-commit config.

* reuse info for config directory.
2024-07-25 10:58:40 +01:00
Marcel
87222588f9 Remove the attest step until we figure out how it is meant to work (#479)
* Remove the attest step until we figure out how it is meant to work

* Fix end of files
2024-07-19 09:53:56 +01:00
Marcel
d334912706 Ensure that we use the correct docker registry (#478)
This is stated at 456d685447/README.md (L187-L188) but I missed it.
2024-07-18 10:01:46 +01:00
Marcel
337d7c72a6 Add SBOM and Attestation to the Docker release process (#477)
* feat: Add SBOM and Attestation to the Docker release process. Also ensure we only deploy platforms on the qemu action as needed and update versions.

This also limits the permissions used

* fix: Make sure there is an empty line at the end of the file

* Fix the qemu platforms
2024-07-18 09:44:56 +01:00
Aminda Suomalainen ⚧
8587280cdc [Yarn Classic] Enable corepack & fix pre-commit run --all-files (#472)
* Setup Yarn Classic through Corepack

* pre-commit: use corepack and silence warnings, add .eslintignore's

* .github/workflows/mjolnir.yml: use yarn through corepack

* mx-tester.yml: use corepack

* mx-tester.yml & package.json: replace references to npx and call corepack more

At least yarn build didn't break locally for me, so I think it's supported here too

* rm & gitignore .yarnrc

* mx-tester.yml & package.json: return to npx since yarn dlx doesn't exist in classic
2024-07-04 11:22:33 +01:00
dependabot[bot]
27e058711e Bump actions/github-script from 6 to 7 in the github-actions group (#398)
Bumps the github-actions group with 1 update: [actions/github-script](https://github.com/actions/github-script).


Updates `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
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-29 14:56:23 +01:00
gnuxie
7d4009cf1a Update documentation links for new base url.
Context is that we had `docs` as part of the base URL, fixed in https://github.com/the-draupnir-project/draupnir-documentation/pull/13.
2024-05-24 15:40:16 +01:00
Catalan Lover
bbea4155ea Add Signoff CI to Enforce Signoff requirement. (#395)
* Add Signoff CI to Enforce Signoff requirement.

* Integrate Changes to Signoff CI from Docs Repo Version
2024-05-05 14:49:56 +01:00
Gnuxie
198b65e96e Protect latest from pre-releases (#336)
Fixes https://github.com/the-draupnir-project/Draupnir/issues/318
2024-04-12 19:18:42 +01:00
dependabot[bot]
fa9525c4f5 Bump the github-actions group with 2 updates (#326)
Bumps the github-actions group with 2 updates: [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) and [baptiste0928/cargo-install](https://github.com/baptiste0928/cargo-install).


Updates `docker/setup-buildx-action` from 3.0.0 to 3.3.0
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v3.0.0...v3.3.0)

Updates `baptiste0928/cargo-install` from 2 to 3
- [Release notes](https://github.com/baptiste0928/cargo-install/releases)
- [Changelog](https://github.com/baptiste0928/cargo-install/blob/main/CHANGELOG.md)
- [Commits](https://github.com/baptiste0928/cargo-install/compare/v2...v3)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
- dependency-name: baptiste0928/cargo-install
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-09 18:06:56 +01:00
dependabot[bot]
4f806dbd95 Bump the github-actions group with 1 update (#162)
Bumps the github-actions group with 1 update: [actions/setup-node](https://github.com/actions/setup-node).

- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v3...v4)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-15 14:56:44 +00:00
dependabot[bot]
9f04502774 Bump the github-actions group with 4 updates (#125)
Bumps the github-actions group with 4 updates: [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action), [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action), [docker/login-action](https://github.com/docker/login-action) and [docker/build-push-action](https://github.com/docker/build-push-action).


Updates `docker/setup-qemu-action` from 2.2.0 to 3.0.0
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](https://github.com/docker/setup-qemu-action/compare/v2.2.0...v3.0.0)

Updates `docker/setup-buildx-action` from 2.10.0 to 3.0.0
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v2.10.0...v3.0.0)

Updates `docker/login-action` from 2 to 3
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v2...v3)

Updates `docker/build-push-action` from 4 to 5
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v4...v5)

---
updated-dependencies:
- dependency-name: docker/setup-qemu-action
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-19 14:29:18 +01:00
dependabot[bot]
2330ddc719 Bump the everything group with 4 updates (#115)
Bumps the everything group with 4 updates: [actions/checkout](https://github.com/actions/checkout), [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action), [docker/login-action](https://github.com/docker/login-action) and [baptiste0928/cargo-install](https://github.com/baptiste0928/cargo-install).


Updates `actions/checkout` from 2 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/v2...v4)

Updates `docker/setup-buildx-action` from 2.6.0 to 2.10.0
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v2.6.0...v2.10.0)

Updates `docker/login-action` from 1 to 2
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v1...v2)

Updates `baptiste0928/cargo-install` from 1 to 2
- [Release notes](https://github.com/baptiste0928/cargo-install/releases)
- [Changelog](https://github.com/baptiste0928/cargo-install/blob/main/CHANGELOG.md)
- [Commits](https://github.com/baptiste0928/cargo-install/compare/v1...v2)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: everything
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: everything
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: everything
- dependency-name: baptiste0928/cargo-install
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: everything
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-11 14:44:16 +01:00
Marcel
8894e29606 Multiarch CI fixes (#59)
* Also build arm images

* Increase docker timeout for qemu and install missing parts in CI for multiplatform building
2023-06-12 23:34:38 +01:00
Marcel
b3f0c6e222 Also build arm images (#58)
Based on https://www.docker.com/blog/multi-arch-build-and-images-the-simple-way/
https://github.com/docker/build-push-action and https://docs.docker.com/engine/reference/commandline/buildx_build/#platform
2023-06-12 15:09:00 +01:00
gnuxie
c14fbeb183 Update github actions workflows to use node 18. 2023-05-10 20:10:13 +01:00
gnuxie
a0ffb0d315 Github release action won't sync tags with remote. 2023-03-14 12:53:04 +00:00
gnuxie
0620bb1db7 Tag information missing when creating version.txt in CI. 2023-02-20 20:10:54 +00:00
gnuxie
acc7b59a33 Github actions should generate version.txt. 2023-02-11 15:59:50 +00:00
gnuxie
b7139b398c Move version.txt to project top level. 2023-02-11 14:20:46 +00:00
gnuxie
cbddf71ebe Include version information in !draupnir status. 2023-02-11 14:20:46 +00:00
Gnuxie
bb125b3828 Dockerhub gnuxie/draupnir (#2)
Change old matrix.org/mjolnir references in github actions.
2023-01-14 22:43:39 +00:00
David Teller
38c5714027 CI: Scheduling daily builds (#426) 2022-11-29 15:02:58 +01:00
Jess Porter
50f80f2392 manymjolnir appservice (#364)
Mjolnir can now be run as an application service,
meaning it will host multiple independent mjolnirs that can be requested by users.
If the user is on the same homeserver as the appservice is deployed on,
then they can provision a mjolnir via a widget https://github.com/matrix-org/mjolnir-widget.
Otherwise they can invite the appservice bot to a room they want to protect.
This will create them a mjolnir, a management room and a policy list.

The appservice shares the same docker image as the bot,
but is started slightly differently by specifying "appservice"
as the first argument to docker run (this s managed by `mjolnir-entrypoint.sh`. 
We could have used another Dockerfile for the appservice,
extending the existing one but we decided not to because there
would have been lots of fiddling around the entrypoint
and logistics involved around adding a tag for it via github actions.
Not to mention that this would be duplicating the image
just to run it with a different binary.

A list of followup issues can be found here https://github.com/issues?q=is%3Aopen+is%3Aissue+author%3AGnuxie+archived%3Afalse+label%3AA-Appservice.

Somewhat relevant and squashed commit messages(regrettably squashing because frankly these won't make sense in isolation): 

* draft widget backend

* add `managementRoomId` to `provisionNewMjolnir`

* remove ratelimits from appservice mjolnirs

* add /join endpoint to api backend


* tighter guard around room type in PolicyList

matrix-bot-sdk imporved the types for this

* enable esModuleInterop

* launch and use postgres in a container whilst using mx-tester


* limited access control

policy list used for access control

* Redesign initialization API of many mjolnir.

It's much harder to forget to initialize the components now that you have to in order to construct them in the first place.


* Ammend config not to clash with existing CI

this means that the appsrvice bot is now called 'mjolnir-bot' by default
which was easier than going through old code base and renaming


* Change entrypoint in Dockerfile so that we can start the appservice.

We could have used another Dockerfile for the appservice,
extending the exising one but we decided not to because there
would have been lots of fiddling around the entrypoint
and logistics involved around adding a tag for it via github actions.
Not to mention that this would be duplicating the image
just to run it with a different binary.

This solution is much simpler, backwards compatible, and conscious about the future.


Co-authored-by: gnuxie <gnuxie@element.io>
2022-11-15 18:03:06 +00:00
David Teller
28265cec2e CI: Let's try and cache mx-tester installs (#383) 2022-10-10 17:17:22 +02:00
Gnuxie
84ffb36494 Bump minimum node version to 16. (#316)
* Bump minimum node version to 16.

We already made the mistake of using features from 16 without realising
Previously: https://github.com/matrix-org/mjolnir/pull/192

* Make sure CI uses specific version of node and we also lint.

https://github.com/matrix-org/pipelines/blob/master/mjolnir/pipeline.yml#L13
2022-07-06 14:50:33 +01:00
Gnuxie
65f52fef3a Timeout integration tests CI after 1 hour. (#317) 2022-07-06 14:21:33 +01:00
Gnuxie
fb7167773b Use github workflows to push dockerhub images+tags. (#265) 2022-03-28 15:25:31 +01:00
David Teller
a21415a04c Give the ability to moderators to react quickly to /report abuse reports. (#137) 2021-11-09 13:15:49 +01:00