Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

migration to pkgctl #97

Open
wants to merge 408 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
408 commits
Select commit Hold shift + click to select a range
ae99fe4
drop no-quiet option and change tree_create message error to warn
arcan1s Oct 26, 2021
fcb130e
Release 1.6.0
arcan1s Oct 26, 2021
65ba590
use PackageSource enum for Package.load method
arcan1s Oct 26, 2021
a2639f8
add update printer which will print current version if any
arcan1s Oct 27, 2021
8b0f9bf
update license headers
arcan1s Oct 27, 2021
d480eb7
Release 1.6.1
arcan1s Oct 27, 2021
e8a10c1
add nginx configuration to the faq
arcan1s Oct 27, 2021
32a4a82
improve configuration extension
arcan1s Oct 28, 2021
91de1c2
Release 1.6.2
arcan1s Oct 28, 2021
fa4244d
take python laziness into account
arcan1s Nov 4, 2021
e6adb33
Release 1.6.3
arcan1s Nov 4, 2021
042638d
handle packages which have been removed from the repository (#45)
arcan1s Nov 9, 2021
3c5bcbd
Release 1.6.4
arcan1s Nov 10, 2021
5aac3db
do not read aur_url from settings, use repository property instead
arcan1s Nov 15, 2021
603c544
initial implementation of the local git clones (#48)
arcan1s Dec 22, 2021
bfca7e4
handle dependencies recursively
arcan1s Dec 22, 2021
52cd9a0
make mypy happy
arcan1s Dec 25, 2021
5a3770b
Release 1.7.0
arcan1s Dec 25, 2021
683abca
use own aur wrapper (#49)
arcan1s Feb 6, 2022
60a2e25
update for new aiohttp api
arcan1s Feb 6, 2022
e414616
Release 1.8.0
arcan1s Feb 6, 2022
026f741
set success status on up to date packages
arcan1s Feb 6, 2022
9f4acac
strict test checks
arcan1s Mar 3, 2022
61efbb7
add docker support (#52)
arcan1s Mar 13, 2022
e9886ef
docker hub integration
arcan1s Mar 13, 2022
d33844e
ALLOW_AUTO_ARCHITECTURE_RUN flag for unsafe commands
arcan1s Mar 19, 2022
57f25c3
add console printer
arcan1s Mar 19, 2022
4cc665f
replace pspec with spec
arcan1s Mar 20, 2022
8374590
add fallback for utf option
arcan1s Mar 20, 2022
b83bc5a
fallback to AUR source in case of PermissionError exception
arcan1s Mar 20, 2022
63e79ec
enable privileged mode for the docker
arcan1s Mar 20, 2022
1312129
deprecate init/repo-init command
arcan1s Mar 20, 2022
fb02e67
migrate to tox
arcan1s Mar 20, 2022
28cc38a
port part of settings to database (#54)
arcan1s Mar 30, 2022
0c5a90c
update license years
arcan1s Mar 30, 2022
2bc2b63
add help command
arcan1s Mar 30, 2022
fed2f3a
configure docker to work with tags
arcan1s Mar 30, 2022
06ec16a
create user in docker container
arcan1s Mar 31, 2022
e909e4f
add configurable exit codes to some commands (#55)
arcan1s Apr 1, 2022
7188cfa
remove implicit user from docker
arcan1s Apr 1, 2022
40b84b8
docs update
arcan1s Apr 2, 2022
2d2cd73
better processing for subcommands
arcan1s Apr 3, 2022
b7cd835
Release 2.0.0-rc1
arcan1s Apr 3, 2022
22d1d83
change regex for sed
arcan1s Apr 3, 2022
74906d0
Release 2.0.0rc2
arcan1s Apr 3, 2022
a734b86
allow any tag for push
arcan1s Apr 3, 2022
6de7537
Release 2.0.0rc3
arcan1s Apr 3, 2022
6946745
fix descriptions
arcan1s Apr 5, 2022
e200ac9
add support of officiall repositories api
arcan1s Apr 7, 2022
2536b8d
add support of repository restoration
arcan1s Apr 7, 2022
783c16b
trim versions before dependency list calculation
arcan1s Apr 7, 2022
733c014
Release 2.0.0rc4
arcan1s Apr 7, 2022
86af13f
add telegram integraion
arcan1s Apr 8, 2022
5b1f5a8
fix users migration
arcan1s Apr 8, 2022
dd521b4
force git run from the same dir to clone
arcan1s Apr 8, 2022
5ff2f43
change telegram default index to telegram-index
arcan1s Apr 8, 2022
900907c
Release 2.0.0rc5
arcan1s Apr 8, 2022
fd78f2b
do not render failed packages in jinja (#57)
arcan1s Apr 9, 2022
a6c8d64
Release 2.0.0rc6
arcan1s Apr 9, 2022
6551c8d
merge restore to rebuild commannd
arcan1s Apr 9, 2022
cb63bc0
add backup and restore subcommands
arcan1s Apr 10, 2022
208a9b9
docs update
arcan1s Apr 10, 2022
0db6191
Release 2.0.0rc7
arcan1s Apr 10, 2022
d90f417
Docstring update (#58)
arcan1s Apr 17, 2022
36b8b0f
fix target naming
arcan1s Apr 17, 2022
a261050
apply data migration in the same transaction block with schema migration
arcan1s Apr 17, 2022
c9ee470
move documentation to tox
arcan1s Apr 17, 2022
6ebbb04
readthedoc integration
arcan1s Apr 18, 2022
1cfc751
rename classes in order to make documentation reference work
arcan1s Apr 18, 2022
b7debdd
Complete official repository support (#59)
arcan1s May 2, 2022
b7dca2d
add note about ahriman to index page
arcan1s May 2, 2022
3d9fae5
add __all__ attribute
arcan1s May 2, 2022
304690e
correct archllinux wording in readme
arcan1s May 2, 2022
33e9fea
Docs update (#61)
arcan1s May 5, 2022
9891024
shorten public imports
arcan1s May 6, 2022
47c578e
Release 2.0.0rc8
arcan1s May 6, 2022
b6db2a8
fix error with missing sources
arcan1s May 8, 2022
d98cfa3
Release 2.0.0rc9
arcan1s May 8, 2022
9987484
triggers implementation (#62)
arcan1s May 9, 2022
88f71b2
Release 2.0.0rc10
arcan1s May 9, 2022
2431d5d
fix bug with checking file
arcan1s May 10, 2022
a11fd18
Release 2.0.0rc11
arcan1s May 10, 2022
d492c96
add contribution guide
arcan1s May 11, 2022
38e48b1
add not about pacman database update
arcan1s May 11, 2022
f6e57a4
fix case when provided trigger path is directory
arcan1s May 12, 2022
5674b7b
add ability to run only speicifed triggers from command line
arcan1s May 12, 2022
47de715
dynamic html load (#63)
arcan1s May 20, 2022
07b7689
do not bump timestamp on empty updates
arcan1s May 21, 2022
9f134e3
update readme
arcan1s May 21, 2022
f4131b8
add shell and version parser
arcan1s May 23, 2022
a0cfb75
rewrite api under single /api endpoint
arcan1s May 29, 2022
75b9a96
do not pass timestamp to pretty_datetime functioon
arcan1s May 31, 2022
22847aa
small docs update
arcan1s Jun 4, 2022
79d4a48
Release 2.0.0
arcan1s Jun 5, 2022
03c298c
replace if with while for telelgram reporting
arcan1s Jun 9, 2022
18daeca
review loggers
arcan1s Jun 19, 2022
cee4fd4
bump web libraries
arcan1s Jun 24, 2022
cd361a4
review loggers once more
arcan1s Jun 26, 2022
cbbe2b0
fix case with package name which cannot be downloaded
arcan1s Jun 27, 2022
31f551b
review loggers once more
arcan1s Jun 26, 2022
9c2f73a
simplify tmpdir method
arcan1s Jun 28, 2022
87ab368
Release 2.1.0
arcan1s Jul 2, 2022
f73d1eb
reduce docker image size a bit
arcan1s Jul 13, 2022
6633766
frozen dataclasses
arcan1s Jul 26, 2022
cf3c48f
patch architecture list in runtime (#66)
arcan1s Aug 9, 2022
1912790
Make optional dependencies trully optional (#67)
arcan1s Sep 10, 2022
08f6284
Release 2.2.0
arcan1s Sep 14, 2022
f6d9ea4
docs update
arcan1s Sep 14, 2022
4f6bd29
Release 2.2.1
arcan1s Sep 14, 2022
664b636
skip architecture list patching in case if any architecture is set
arcan1s Sep 17, 2022
e441d93
Release 2.2.2
arcan1s Sep 17, 2022
61969dd
make sqlite import consistent
arcan1s Sep 17, 2022
e0b0c3c
add minimal install step to workflow
arcan1s Sep 17, 2022
fc0d838
extend triggers to on_start and on_stop methods
arcan1s Sep 25, 2022
342b3cb
Add gitremote triggers (#68)
arcan1s Oct 17, 2022
f47be6c
disallow no values in configuration
arcan1s Oct 17, 2022
4bb598d
fix rtd docs building
arcan1s Oct 17, 2022
ad7cdb7
drop ahriman.core.triggers.Trigger.run method
arcan1s Oct 19, 2022
649df81
implement single-function patches (#69)
arcan1s Oct 30, 2022
b97c892
add daemon subcommand
arcan1s Oct 30, 2022
d98211e
add possibility to run full update
arcan1s Oct 31, 2022
4f35ec6
fix update handler tests
arcan1s Oct 31, 2022
fb6b22c
change gitremote api to be same as report and upload
arcan1s Nov 2, 2022
7cee859
docs update
arcan1s Nov 2, 2022
3aeaa8c
faq update
arcan1s Nov 2, 2022
0d1a890
fix case in which if no source PKGBUILDs were updated, an exception w…
arcan1s Nov 3, 2022
43c553a
improve repo-setup command
arcan1s Nov 5, 2022
2a07356
add ability to use ahriman pacman database instead of system one (#71)
arcan1s Nov 8, 2022
e58ccdc
write .makepkg.conf to home dir instead of repository root (#72)
arcan1s Nov 8, 2022
0eadef5
replace several store_true keys to booleanoptionalaction alternative …
arcan1s Nov 10, 2022
8b32bd4
make exception optional argument for check_output method
arcan1s Nov 10, 2022
9556779
add exec to shell subcommand
arcan1s Nov 10, 2022
233dda8
man update
arcan1s Nov 10, 2022
1855e51
speedup docker build command by adding dockerignore listing
arcan1s Nov 11, 2022
f590136
limit max module size and improve some help messages
arcan1s Nov 11, 2022
0cd07af
use intersection of from_database and depends_on filters for the rebu…
arcan1s Nov 11, 2022
9a008dd
Release 2.3.0rc1
arcan1s Nov 11, 2022
4f21eb6
Fix issue when there is no cached source directory yet (closes #75)
arcan1s Nov 11, 2022
5d4bd9e
Release 2.3.0rc2
arcan1s Nov 11, 2022
551ee67
rollback cwd parameter for clone
arcan1s Nov 11, 2022
b2ed383
Release 2.3.0rc3
arcan1s Nov 11, 2022
cdd66ee
fix case when no files were commited in remote push trigger
arcan1s Nov 13, 2022
84c1b4d
Release 2.3.0rc4
arcan1s Nov 13, 2022
2997321
remote threadname from logging
arcan1s Nov 14, 2022
8a6854c
Release 2.3.0
arcan1s Nov 15, 2022
137d62e
Extended package status page (#76)
arcan1s Nov 21, 2022
78e6b48
ask users to repeat password
arcan1s Nov 22, 2022
3bca780
check log record in handler instead of client
arcan1s Nov 22, 2022
bbb97d1
add more notes about docker
arcan1s Nov 22, 2022
6d4f998
fix login and logout buttons decorations
arcan1s Nov 22, 2022
15609ba
change wording for package actions
arcan1s Nov 22, 2022
011b4e2
change logging module imports
arcan1s Nov 22, 2022
28bd5f2
allow scrolling with fixed copy button position
arcan1s Nov 22, 2022
d36e851
render httpunauthorized as html in plain http requests
arcan1s Nov 22, 2022
f3341ec
update web preview picture
arcan1s Nov 22, 2022
3367845
add show/hide password button
arcan1s Nov 22, 2022
89944eb
add fallback for copying to clipboard
arcan1s Nov 23, 2022
df9e03f
change respone for service requests
arcan1s Nov 23, 2022
6ba96d8
build docs together with web views
arcan1s Nov 23, 2022
ce1bd2f
add curl examples to web views
arcan1s Nov 23, 2022
896cd0b
add security notes
arcan1s Nov 23, 2022
766081d
add demos links
arcan1s Nov 24, 2022
5073c80
add key-import button to interface
arcan1s Nov 25, 2022
eba247b
make package actions as dropdown
arcan1s Nov 26, 2022
09623c2
add rebuild implementation to interface
arcan1s Nov 27, 2022
4811dec
do not invoke configuration write in case if no salt or user was written
arcan1s Nov 27, 2022
0161617
implement support of unix socket for server
arcan1s Nov 28, 2022
01eda51
improve setup command by --makeflags-jobs argument and fix repository…
arcan1s Nov 29, 2022
7aa91f9
do not trigger update on sign command
arcan1s Dec 1, 2022
262462d
improve wording in documentation
arcan1s Dec 2, 2022
0e839fb
Some minor documentation related fixes
arcan1s Dec 4, 2022
da5d977
do not update database via pacman, use ahriman's own databses
arcan1s Dec 4, 2022
2e05902
Release 2.4.0
arcan1s Dec 4, 2022
1c8aed4
check that package has been created during setup workflow
arcan1s Dec 6, 2022
2d5b73c
remove badges from status page
arcan1s Dec 7, 2022
7df4adf
replace alert bodals with toasts
arcan1s Dec 8, 2022
b0b37e8
Release 2.4.1
arcan1s Dec 11, 2022
8864855
write patches via gitremote push trigger (#79)
arcan1s Dec 24, 2022
aa1a59d
fix property description in docs
arcan1s Dec 26, 2022
7de94a8
add repo-structure subcommand
arcan1s Dec 27, 2022
c7447f1
change another boolean info option to boolean action
arcan1s Dec 28, 2022
81d9526
improve VCS packages checks
arcan1s Dec 29, 2022
cd3d12a
allow 3 symbols for package search
arcan1s Dec 29, 2022
08d6825
add completion files generated by shtab
arcan1s Dec 29, 2022
1891d6c
force upgrade sphinx documentation
arcan1s Dec 30, 2022
b44e5c3
Release 2.5.0
arcan1s Dec 31, 2022
f984ea7
fully lazy handle load
arcan1s Dec 31, 2022
e9512e9
remote log for calculate version as it cleans logs
arcan1s Dec 31, 2022
214d6d7
Release 2.5.1
arcan1s Dec 31, 2022
2c2eae2
remote all gitfiles in git remote trigger
arcan1s Jan 1, 2023
84d4523
Release 2.5.2
arcan1s Jan 1, 2023
5c4d3ee
allow setting context with existing
arcan1s Jan 2, 2023
98f2f19
Release 2.5.3
arcan1s Jan 2, 2023
caca157
Correct way to allow setting context with existing
arcan1s Jan 2, 2023
04e5a26
add notes about documentation and methods inside class
arcan1s Jan 2, 2023
42c13b5
Release 2.5.4
arcan1s Jan 2, 2023
730f3ca
copyright update
arcan1s Jan 4, 2023
014007a
review unsafe commands access
arcan1s Jan 4, 2023
1f07a89
sort unsafe commands response
arcan1s Jan 4, 2023
d942a70
add config validator subcommand (#80)
arcan1s Jan 9, 2023
0239fb5
expose trigger configuration schema
arcan1s Jan 10, 2023
77954b9
subcommand review
arcan1s Jan 10, 2023
43a7d09
add ability to check for service updates
arcan1s Jan 11, 2023
d735692
consider vcs flag and vcs_allowed_age during local packages update
arcan1s Jan 11, 2023
30b9bcb
add note about other authroization options to gitremote triggers
arcan1s Jan 13, 2023
616a195
add ability to override pacman mirror in devtools configuration
arcan1s Jan 13, 2023
85baad6
add notes about non-x86_64 architecture setup
arcan1s Jan 15, 2023
c6555cf
Release 2.6.0
arcan1s Jan 15, 2023
9e4e3b7
enable lock for web service
arcan1s Jan 17, 2023
17466d8
make oauth client trully optional (#84)
arcan1s Jan 25, 2023
5bbb9d2
Release 2.6.1
arcan1s Jan 25, 2023
d3ad4c3
remove debug line
arcan1s Jan 27, 2023
5af8495
calculate dependencies based on package information (#89)
arcan1s Jan 30, 2023
25eee9c
add ability to suppress http logging errors (#86)
arcan1s Jan 30, 2023
9d7f63e
trim version from provides list
arcan1s Jan 30, 2023
0a2ba4a
filter empty packages from database
arcan1s Jan 30, 2023
917ec48
handle architecture specific fields for dependencies
arcan1s Jan 31, 2023
117f096
note about local database update (see #85)
arcan1s Jan 31, 2023
4db8ad8
hide passwords and secrets from repo-config subcommand by default
arcan1s Feb 5, 2023
3a4e8f4
mask mypy warning
arcan1s Feb 9, 2023
19bb19e
handle .gitignore file correctly in remote push trigger
arcan1s Feb 10, 2023
37e57c1
update dependencies before build (#91)
arcan1s Feb 12, 2023
d517d8b
Release 2.7.0
arcan1s Feb 20, 2023
4fb9335
add ability to read cookie secret from config
arcan1s Feb 22, 2023
13faf66
add more validation rules
arcan1s Feb 23, 2023
a274f91
simplify login ttl processing
arcan1s Feb 23, 2023
a8c40a6
replace InitializeException with InitializeError in docs
arcan1s Mar 2, 2023
df23be9
gracefully terminate web server
arcan1s Mar 5, 2023
ec0550a
Release 2.7.1
arcan1s Mar 5, 2023
7f5e541
execute request in context methods instead of handling them each time
arcan1s Mar 23, 2023
8f4a254
use api generated docs instead of comments (#92)
arcan1s Apr 3, 2023
e08ab2d
extract schemas automatically from views
arcan1s Apr 4, 2023
1106ff6
fix license url
arcan1s Apr 4, 2023
3c068ed
argument annootation update
arcan1s Apr 5, 2023
58379e7
optimize imports
arcan1s Apr 5, 2023
39fde7c
hide cookie key and salt from config output
arcan1s Apr 5, 2023
9503a9f
try to remove unknown packages from api
arcan1s Apr 6, 2023
2cd61b0
Release 2.8.0
arcan1s Apr 9, 2023
54d36cc
docs update
arcan1s Apr 10, 2023
abf2908
PEP-585 complaint: remove type aliases (#93)
arcan1s Apr 12, 2023
f7e260e
add reference to api documentation from main page
arcan1s Apr 12, 2023
ff91728
add referencne to api docs to docs
arcan1s Apr 14, 2023
e42ca95
suppress status errors also if option is set
arcan1s Apr 15, 2023
31f47b8
fix some pycharm warnings
arcan1s Apr 16, 2023
d59a062
PEP-561 complaint: add py.typed marker
arcan1s Apr 17, 2023
9dc6d56
fix flapping tests for oauth
arcan1s May 3, 2023
2ff5696
PEP-673 use Self as return type for classmethods (#94)
arcan1s May 4, 2023
277d40d
do not assign path in context manager as it is deprectated
arcan1s May 4, 2023
8c55438
disable debugpanel for now
arcan1s May 4, 2023
aac3ccf
migration to pkgctl
arcan1s May 8, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .bandit-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
skips: ['B101', 'B104', 'B105', 'B106', 'B404']
1 change: 1 addition & 0 deletions .bandit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
skips: ['B404', 'B603']
14 changes: 14 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.eggs/
.git/
.github/
.idea/
.mypy_cache/
.pytest_cache/
.tox/
.venv/

*.egg-info/
__pycache__/
*.pyc
*.pyd
*.pyo
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/01-bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''

---

## Summary

A clear and concise description of what the bug is.

### Steps to reproduce

Steps to reproduce the behavior (commands, environment etc).

### Expected behavior

A clear and concise description of what you expected to happen.

### Logs

Add logs to help explain your problem. By default, the application writes logs into `/dev/log` which is usually default systemd journal and can be accessed by `journalctl` command.

You can also attach any additional information which can be helpful, e.g. configuration used by the application (be aware of passwords and other secrets if any); it can be generated by using `ahriman config` command.

It is also sometimes useful to have information about installed packages which can be accessed by `ahriman version` command.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/02-security-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Security report
about: Create a report related to security issues
title: ''
labels: security
assignees: ''

---

## Summary

A clear and concise description of what the issue is.

### Steps to reproduce

Steps to reproduce the behavior (commands, environment etc).

### Intended impact

Brief optional description of how this vulnerability can be used and which effects can be achieved.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/03-feature-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''

---

## Feature summary

Brief description of the feature required

### Cause of the feature request

A clear and concise description of what the problem is. E.g. I'm always frustrated when [...]

### Proposed changes and/or features

A clear and concise description of what you want to happen.
12 changes: 12 additions & 0 deletions .github/ISSUE_TEMPLATE/04-discussion.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
name: Question
about: Create an issue to get help with project
title: ''
labels: question
assignees: ''

---

## Describe your question below

A clear and concise description of your issue for which you would like to get help.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
13 changes: 13 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## Summary

Brief description of the pull request. Try to provide clear explanation for major changes.

Please make sure that branch called either `feature/feature-name` for feature-related pull requests or `bug/bug-name` for bug-related ones.

Put `closes #ISSUE` in case if the pull requests solves one of the opened issues.

### Checklist

- [ ] Tests to cover new code
- [ ] `make check` passed
- [ ] `make tests` passed
42 changes: 42 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: docker image

on:
push:
branches: [ master ]
tags:
- '*'
- '!*rc*'

jobs:
docker-image:

runs-on: ubuntu-latest

steps:
- name: extract docker metadata
id: meta
uses: docker/metadata-action@v3
with:
images: |
arcan1s/ahriman
tags: |
type=ref,event=tag
type=edge

- name: setup QEMU
uses: docker/setup-qemu-action@v1

- name: setup docker buildx
uses: docker/setup-buildx-action@v1

- name: login to docker hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: build an image and push
uses: docker/build-push-action@v2
with:
push: true
tags: ${{ steps.meta.outputs.tags }}
41 changes: 41 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: release

on:
push:
tags:
- '*'

jobs:
make-release:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: extract version
id: version
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}

- name: create changelog
id: changelog
uses: jaywcjlove/changelog-generator@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
filter: 'Release \d+\.\d+\.\d+'

- name: create archive
run: make archive
env:
VERSION: ${{ steps.version.outputs.VERSION }}

- name: release
uses: softprops/action-gh-release@v1
with:
body: |
${{ steps.changelog.outputs.compareurl }}
${{ steps.changelog.outputs.changelog }}
files: ahriman-*-src.tar.xz
fail_on_unmatched_files: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40 changes: 40 additions & 0 deletions .github/workflows/run-setup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: setup

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
run-setup-minimal:

runs-on: ubuntu-latest

container:
image: archlinux:latest
volumes:
- ${{ github.workspace }}:/build
options: --privileged -w /build

steps:
- uses: actions/checkout@v2

- name: setup the minimal service in arch linux container
run: .github/workflows/setup.sh minimal

run-setup:

runs-on: ubuntu-latest

container:
image: archlinux:latest
volumes:
- ${{ github.workspace }}:/build
options: --privileged -w /build

steps:
- uses: actions/checkout@v2

- name: setup the service in arch linux container
run: .github/workflows/setup.sh
24 changes: 24 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: tests

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
run-tests:

runs-on: ubuntu-latest

container:
image: archlinux:latest
volumes:
- ${{ github.workspace }}:/build
options: -w /build

steps:
- uses: actions/checkout@v2

- name: run check and tests in arch linux container
run: .github/workflows/tests.sh
61 changes: 61 additions & 0 deletions .github/workflows/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
#!/bin/bash
# Install the package and run main install commands

set -ex

[[ $1 = "minimal" ]] && MINIMAL_INSTALL=1

# install dependencies
echo -e '[arcanisrepo]\nServer = http://repo.arcanis.me/$arch\nSigLevel = Never' | tee -a /etc/pacman.conf
# refresh the image
pacman --noconfirm -Syu
# main dependencies
pacman --noconfirm -Sy base-devel devtools-git-poc git pyalpm python-cerberus python-inflection python-passlib python-requests python-srcinfo sudo
# make dependencies
pacman --noconfirm -Sy python-build python-installer python-wheel
# optional dependencies
if [[ -z $MINIMAL_INSTALL ]]; then
# VCS support
pacman --noconfirm -Sy breezy darcs mercurial subversion
# web server
pacman --noconfirm -Sy python-aioauth-client python-aiohttp python-aiohttp-apispec-git python-aiohttp-cors python-aiohttp-debugtoolbar python-aiohttp-jinja2 python-aiohttp-security python-aiohttp-session python-cryptography python-jinja
# additional features
pacman --noconfirm -Sy gnupg python-boto3 rsync
fi

# create fresh tarball
make VERSION=1.0.0 archlinux # well, it does not really matter which version we will put here
# run makepkg
mv ahriman-*-src.tar.xz package/archlinux
chmod +777 package/archlinux # because fuck you that's why
cd package/archlinux
sudo -u nobody -- makepkg -cf --skipchecksums --noconfirm
pacman --noconfirm -U ahriman-1.0.0-1-any.pkg.tar.zst
# create machine-id which is required by build tools
systemd-machine-id-setup

# special thing for the container, because /dev/log interface is not available there
sed -i "s/handlers = syslog_handler/handlers = console_handler/g" /etc/ahriman.ini.d/logging.ini
# initial setup command as root
[[ -z $MINIMAL_INSTALL ]] && WEB_ARGS=("--web-port" "8080")
ahriman -a x86_64 service-setup --packager "ahriman bot <[email protected]>" --repository "github" "${WEB_ARGS[@]}"
# validate configuration
ahriman -a x86_64 service-config-validate --exit-code
# enable services
systemctl enable ahriman-web@x86_64
systemctl enable ahriman@x86_64.timer
if [[ -z $MINIMAL_INSTALL ]]; then
# run web service (detached)
sudo -u ahriman -- ahriman -a x86_64 web &
WEB_PID=$!
sleep 15s # wait for the web service activation
fi
# add the first package
# the build itself does not really work in the container
sudo -u ahriman -- ahriman package-add --now ahriman
# check if package was actually installed
test -n "$(find "/var/lib/ahriman/repository/x86_64" -name "ahriman*pkg*")"
# run package check
sudo -u ahriman -- ahriman repo-update
# stop web service lol
[[ -z $WEB_PID ]] || kill $WEB_PID
10 changes: 10 additions & 0 deletions .github/workflows/tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash
# Install dependencies and run test in container

set -ex

# install dependencies
pacman --noconfirm -Syu base-devel python-setuptools python-tox

# run test and check targets
make check tests
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,8 @@ ENV/
.venv/

*.tar.xz
status_cache.json

*.db

docs/html/
Loading