Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into rei/noyaml
Browse files Browse the repository at this point in the history
for enhanced CI
  • Loading branch information
reivilibre committed Aug 19, 2021
2 parents f61ec2a + cb229a6 commit 60cb462
Show file tree
Hide file tree
Showing 8 changed files with 368 additions and 162 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
id: set-tag
uses: docker/metadata-action@v3
with:
images: reivilibre/panopticon
images: matrixdotorg/panopticon
tags: |
type=ref,event=tag,prefix=release-
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker_aggregate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
id: set-tag
uses: docker/metadata-action@v3
with:
images: reivilibre/panopticon
images: matrixdotorg/panopticon
tags: |
type=ref,event=tag,prefix=aggregation-release-
# we want all tags to be prefixed with aggregate- (to distinguish from
Expand Down
29 changes: 28 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
pull_request:
jobs:
run-unit-tests:
name: Unit tests
name: Unit tests (Panopticon)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -17,3 +17,30 @@ jobs:
- run: go get github.com/go-sql-driver/mysql
- run: go build
- run: ./runtests.sh

run-unit-tests-aggregate:
services:
mariadb:
image: mariadb:latest
ports:
- 3306
env:
MARIADB_USER: maria
MARIADB_PASSWORD: passypass
MARIADB_DATABASE: teststats
MARIADB_ROOT_PASSWORD: rootyroot

name: Unit tests (Aggregate)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: sudo apt-get update && sudo apt-get install python3-pip python3 && sudo apt-get clean
- run: pip install green -r requirements.txt
- run: >
cd scripts &&
PANOPTICON_DB_NAME=teststats
PANOPTICON_DB_USER=maria
PANOPTICON_DB_PASSWORD=passypass
PANOPTICON_DB_HOST=localhost
PANOPTICON_DB_PORT=${{ job.services.mariadb.ports[3306] }}
green test_aggregate.py -vv
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ _testmain.go
venv/*
.idea
.python-version
/scripts/__pycache__/
13 changes: 13 additions & 0 deletions RELEASING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Releasing (and Deploying) Panopticon — some brief notes

1. Ensure that you are on a recently-updated copy of the `master` branch and that CI is happy.
2. Based on the changes since the last release, add an entry at the top of the `CHANGELOG.md`, following the style of the prior entries.
3. Set a variable for the version you are releasing, for convenience: `ver=x.y.z`.
4. `git add CHANGELOG.md && git commit -m $ver && git push`
5. Give [the changelog](https://github.com/matrix-org/panopticon/blob/master/CHANGELOG.md) a quick check to ensure everything is in order.
6. When you're ready, tag the release with `git tag -s v$ver` and push it with `git push origin tag v$ver`.
7. Create a release on GitHub: `xdg-open https://github.com/matrix-org/panopticon/releases/edit/v$ver`
8. With any luck, *GitHub Actions* will spring into action, building the Docker images and pushing them to [Docker Hub](https://hub.docker.com/r/matrixdotorg/panopticon/tags?page=1&ordering=last_updated).


[Private, infrastructure-specific, instructions](https://gitlab.matrix.org/new-vector/internal/-/wikis/Panopticon) are available to internal members for deploying the 'official' deployment of Panopticon.
2 changes: 1 addition & 1 deletion run-panopticon.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
from scripts.aggregate import Config

c = Config()
db = "%s:%s@tcp/%s" % (c.DB_USER, c.DB_PASSWORD, c.DB_NAME)
db = "%s:%s@tcp/%s" % (c.db_user, c.db_password, c.db_name)
command = "./panopticon --db-driver=mysql --db %s --port 34124" % db
os.system(command)
Loading

0 comments on commit 60cb462

Please # to comment.