229d47f7c7
docs(server/config): add docs to types
ci/woodpecker/push/push-next Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
ci/woodpecker/push/cron-docker-builder Pipeline was successful
2024-04-13 14:09:57 +01:00
e272ca296b
fix(actor/repo): always reschedule to validate repos
...
ci/woodpecker/push/tag-created Pipeline was successful
ci/woodpecker/push/push-next Pipeline was successful
ci/woodpecker/push/cron-docker-builder Pipeline was successful
If validate repos saw anything unexpected it would stop and not schedule a re-validation.
2024-04-13 07:05:40 +01:00
af221f8a2f
fix(forge/mock): visibility on methods
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
ci/woodpecker/push/push-next Pipeline failed
2024-04-13 06:56:11 +01:00
3bbe9abbd9
test: Create stub mock forge
...
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
ci/woodpecker/push/push-next Pipeline was successful
ci/woodpecker/cron/push-next Pipeline was successful
ci/woodpecker/cron/tag-created Pipeline was successful
ci/woodpecker/cron/cron-docker-builder Pipeline was successful
Still need to figure out what tests this will need to support, and how
to configure it's behaviour. I've not ruled out creating a forge object
that is passed in rather than the functions we have now.
Closes kemitix/git-next#37
2024-04-12 22:43:19 +01:00
1ffa8366e0
feat: isolate ForgeJo behind default feature 'forgejo'
ci/woodpecker/push/tag-created Pipeline was successful
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/push-next Pipeline was successful
2024-04-12 20:53:55 +01:00
9df732ce97
chore: reduce logging to debug
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/push-next Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
2024-04-12 19:46:52 +01:00
223dd426c6
chore: don't log success
ci/woodpecker/push/tag-created Pipeline was successful
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/push-next Pipeline was successful
2024-04-12 19:43:21 +01:00
ee9cc53540
fix: don't log url containing API token
ci/woodpecker/push/push-next Pipeline was successful
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
2024-04-12 19:41:47 +01:00
5fcf16ea75
feat: Abstract Git command execution into injectable enum
...
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/push-next Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
Closes kemitix/git-next#36
2024-04-12 19:39:24 +01:00
fb74879309
chore(foregejo): don't log fetch url
...
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/push-next Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
It contained the api token
2024-04-12 19:21:27 +01:00
8c4ad4b534
chore: clean up some logging
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
ci/woodpecker/push/push-next Pipeline was successful
2024-04-12 17:41:09 +01:00
4e6a306a72
feat: Don't advance next branch if the target commit message is invalid
...
ci/woodpecker/push/push-next Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
ci/woodpecker/push/cron-docker-builder Pipeline was successful
Closes kemitix/git-next#33
2024-04-12 17:31:55 +01:00
cedaf16acf
feat: wrap API Token in a secrect::Secret and avoid logging
...
ci/woodpecker/push/tag-created Pipeline was successful
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/push-next Pipeline failed
Closes kemitix/git-next#30
2024-04-12 15:27:03 +01:00
e8d174ee84
fix(forgejo): treat a blank status check result as pending
...
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/push-next Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
Closes kemitix/git-next#29
2024-04-12 13:51:56 +01:00
869935dfc2
fix(server): Prevent losing a task waker
...
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/push-next Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
Closes kemitix/git-next#26
2024-04-12 13:00:40 +01:00
3735afb2f8
fix: don't reload config when updating next branch
...
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/push-next Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
The StartRepo handler loads the config before then sending the
ValidateRepo message. However, we already have the config, so reloading
it isn't needed.
Added todo markers on sleep and dispatching of ValidateRepo where it is
used as a stop-gap until we have working webhook integration.
Add todo markers for checking valid commit messages before advancing
next branch.
2024-04-12 10:14:32 +01:00
0b427f1d4c
fix: avoid using terrors::OneOf across an await boundary
...
ci/woodpecker/push/push-next Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
ci/woodpecker/push/cron-docker-builder Pipeline was successful
OneOf appears to not be Send
2024-04-12 10:14:32 +01:00
8ed942a501
fix: remove extra StartRepo message
...
ci/woodpecker/tag/cron-docker-builder Pipeline was successful
ci/woodpecker/tag/push-next Pipeline was successful
ci/woodpecker/tag/tag-created Pipeline was successful
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
ci/woodpecker/push/push-next Pipeline failed
Closes kemitix/git-next#32
2024-04-12 08:41:24 +01:00
c9d52a5b7f
feat: when no action to take, wait 10 seconds then restart
...
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
ci/woodpecker/push/push-next Pipeline was successful
ci/woodpecker/tag/push-next Pipeline was successful
ci/woodpecker/tag/cron-docker-builder Pipeline was successful
ci/woodpecker/tag/tag-created Pipeline failed
As a stop-gap until we have a working webhook server, this will poll the
repo for updates to it's status.
Closes kemitix/git-next#22
2024-04-11 18:30:52 +01:00
bb4d171174
fix: restore lost sleep
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/push-next Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
2024-04-11 18:19:47 +01:00
f7dc27f67e
feat: git command output is suppressed
...
ci/woodpecker/push/push-next Pipeline was successful
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
Closes kemitix/git-next#27
2024-04-11 18:19:47 +01:00
ec258bca97
refactor: rename ResetForce::Normal as None
ci/woodpecker/push/push-next Pipeline failed
ci/woodpecker/push/tag-created Pipeline was successful
ci/woodpecker/push/cron-docker-builder Pipeline failed
2024-04-11 18:09:57 +01:00
e0b15712c2
refactor: reuse branch::reset to advance next towards dev
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
ci/woodpecker/push/push-next Pipeline was successful
2024-04-11 18:05:26 +01:00
6bad8a27f7
refactor: reuse branch::reset to advance main branch to next
ci/woodpecker/push/push-next Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
ci/woodpecker/push/cron-docker-builder Pipeline was successful
2024-04-11 18:02:07 +01:00
ab58981f87
refactor: reuse branch::reset to advance main branch to next
ci/woodpecker/push/tag-created Pipeline was successful
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/push-next Pipeline was successful
2024-04-11 17:45:11 +01:00
115b353389
feat: Force push next branch to main when it isn't a dev ancestor
...
ci/woodpecker/push/push-next Pipeline was successful
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
Closes kemitix/git-next#21
2024-04-11 15:48:18 +01:00
d2d49f353c
refactor: pass RepoDetails by reference
ci/woodpecker/push/tag-created Pipeline was successful
ci/woodpecker/push/push-next Pipeline was successful
ci/woodpecker/push/cron-docker-builder Pipeline was successful
2024-04-11 15:47:28 +01:00
ed1ab6faa5
feat: add branch::reset function
ci/woodpecker/push/cron-docker-builder Pipeline failed
ci/woodpecker/push/tag-created Pipeline failed
ci/woodpecker/push/push-next Pipeline failed
2024-04-11 14:24:18 +01:00
1c9f7cb4ea
fix: clean up instrumentation
ci/woodpecker/push/tag-created Pipeline was successful
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/push-next Pipeline was successful
2024-04-11 07:46:30 +01:00
7dab1da44b
fix(server): reduce complexity of StartMonitoring handler
...
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
ci/woodpecker/push/push-next Pipeline was successful
Closes kemitix/git-next#25
2024-04-11 07:15:19 +01:00
9469d27476
fix(server): Pause before checking CI status when just updated branch
...
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
ci/woodpecker/push/push-next Pipeline was successful
ci/woodpecker/cron/push-next Pipeline was successful
ci/woodpecker/cron/tag-created Pipeline was successful
ci/woodpecker/cron/cron-docker-builder Pipeline was successful
If we check the status of the commit as soon as we push we get a Pass before the CI tests have even started. Wait briefly (10 seconds) to allow the CI to start and set the status to pending.
Closes kemitix/git-next#24
2024-04-10 22:40:33 +01:00
50a56aadee
fix(server): Doesn't properly detect when dev or next are ahead
...
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/push-next Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
Closes kemitix/git-next#23
2024-04-10 20:51:40 +01:00
3a761b5b21
feat(server): Implement advancing main branch to the next commit
...
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
ci/woodpecker/push/push-next Pipeline was successful
Closes kemitix/git-next#19
2024-04-10 17:36:08 +01:00
98a94ea855
Implement advancing next branch to next commit on dev branch
...
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
ci/woodpecker/push/push-next Pipeline was successful
Uses gix to invoke git commands as there is not API to directly update
the position of a branch.
Closes kemitix/git-next#14
2024-04-10 15:54:50 +01:00
a5e9421405
feat(server): implement forge: :get_commit_history
...
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
ci/woodpecker/push/push-next Pipeline failed
Closes kemitix/git-next#13
2024-04-10 11:48:24 +01:00
e27b050a09
feat(server): log returned status for next branch
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
ci/woodpecker/push/push-next Pipeline was successful
2024-04-10 11:47:14 +01:00
5c4b745c00
feat(server): add marker info logs for advance main and next
ci/woodpecker/push/tag-created Pipeline was successful
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/push-next Pipeline was successful
2024-04-10 11:46:51 +01:00
0b85ac3f8d
refactor(server): inline console_subscriber
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
ci/woodpecker/push/push-next Pipeline was successful
2024-04-10 11:40:42 +01:00
0721b63448
fix(server): stop logging all network requests
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
ci/woodpecker/push/push-next Pipeline was successful
2024-04-10 11:40:06 +01:00
d64024e1ab
feat(server): implement Display for forge::Commit
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
ci/woodpecker/push/push-next Pipeline was successful
2024-04-10 10:54:41 +01:00
546d91554c
feat(server): next commit status is returned as pass, fail ro pending
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
ci/woodpecker/push/push-next Pipeline was successful
2024-04-10 09:17:44 +01:00
c66170c3b4
feat(server): implement repo::status::check_next
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
ci/woodpecker/push/push-next Pipeline was successful
2024-04-10 07:13:55 +01:00
a7a3f8a67b
feat(server): add stub for forge: :get_commit_status
ci/woodpecker/push/tag-created Pipeline was successful
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/push-next Pipeline was successful
2024-04-10 07:13:55 +01:00
8ad84bc72b
feat(server): add deserialise types for commit status
ci/woodpecker/push/docker Pipeline was successful
ci/woodpecker/push/builder Pipeline was successful
ci/woodpecker/push/release Pipeline was successful
ci/woodpecker/push/todo-check Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
2024-04-10 06:56:00 +01:00
ad7d513481
feat(server): add message and handler for AdvanceMainTo(Commit)
ci/woodpecker/push/docker Pipeline was successful
ci/woodpecker/push/release Pipeline was successful
ci/woodpecker/push/todo-check Pipeline was successful
ci/woodpecker/push/builder Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
2024-04-10 06:55:58 +01:00
7ed30fc382
feat(server): add stub for branch::advance_main
ci/woodpecker/push/docker Pipeline was successful
ci/woodpecker/push/builder Pipeline was successful
ci/woodpecker/push/release Pipeline was successful
ci/woodpecker/push/todo-check Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
2024-04-10 06:55:55 +01:00
70e0f94042
feat(server): Assess next action for repo
2024-04-09 22:19:33 +01:00
3203bbd967
feat(server): validate branch head positions
ci/woodpecker/push/docker Pipeline was successful
ci/woodpecker/push/release Pipeline was successful
ci/woodpecker/push/todo-check Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
2024-04-09 18:18:19 +01:00
9eb7660f7b
feat(server/forgejo): fetch commit histories
ci/woodpecker/push/docker Pipeline was successful
ci/woodpecker/push/release Pipeline was successful
ci/woodpecker/push/todo-check Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
2024-04-09 18:15:19 +01:00
bdea942bcb
feat(server): create stub for validating branch positions
ci/woodpecker/push/docker Pipeline was successful
ci/woodpecker/push/release Pipeline was successful
ci/woodpecker/push/todo-check Pipeline was successful
ci/woodpecker/push/build Pipeline failed
2024-04-09 15:31:59 +01:00
ca37045e3a
feat(server/forgejo): verify branches exist in repo
ci/woodpecker/push/docker Pipeline was successful
ci/woodpecker/push/release Pipeline was successful
ci/woodpecker/push/todo-check Pipeline was successful
ci/woodpecker/push/build Pipeline failed
2024-04-09 14:52:12 +01:00
b093c002d4
feat(server/forgejo): load repo config
ci/woodpecker/push/todo-check Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/docker Pipeline was successful
ci/woodpecker/push/release Pipeline was successful
2024-04-09 11:09:07 +01:00
f255c44dfa
feat: Replace own filesystem module with kxio lib
...
ci/woodpecker/push/release Pipeline was successful
ci/woodpecker/push/docker Pipeline was successful
ci/woodpecker/push/todo-check Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
The filesystem, and the intended network module have been extracted into
their own library as they are used by more than one project, so they can
now be developed independently and updates shared.
Closes kemitix/git-next#9
2024-04-09 07:41:41 +01:00
7e08640743
refactor(server): reduce complexity starting server
ci/woodpecker/push/docker Pipeline was successful
ci/woodpecker/push/todo-check Pipeline was successful
ci/woodpecker/push/release Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
2024-04-09 07:41:41 +01:00
a1484939ab
config(server): add token field to Forge
ci/woodpecker/push/docker Pipeline was successful
ci/woodpecker/push/release Pipeline was successful
ci/woodpecker/push/todo-check Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
2024-04-08 12:09:29 +01:00
aaaa975911
refactor(config): compare whole server config in one go
2024-04-08 12:09:29 +01:00
be01d106a4
feat(config): use accesors for hostname and user
2024-04-08 12:09:29 +01:00
3c4a0d52b1
feat(config): Add ApiToken newtype
2024-04-08 11:50:10 +01:00
abbd2e66e6
feat(actors/repo): add RepoActor::new
ci/woodpecker/push/release Pipeline was successful
ci/woodpecker/push/docker Pipeline was successful
ci/woodpecker/push/todo-check Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
2024-04-08 11:34:07 +01:00
c3f2266dc1
feat(config): Parse RepoConfig
2024-04-08 11:34:07 +01:00
d5e9b14e3d
refactor(config): rename Config as ServerConfig
2024-04-08 08:33:46 +01:00
a4e781d4e4
feat(config): make RepoDetails Clone
2024-04-08 08:22:23 +01:00
77705035f9
feat(config): impl Display for RepoDetails
ci/woodpecker/push/docker Pipeline was successful
ci/woodpecker/push/todo-check Pipeline was successful
ci/woodpecker/push/release Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
2024-04-08 08:12:31 +01:00
e9685abf5f
feat(config): Repos specify which branch to read config from
ci/woodpecker/push/docker Pipeline was successful
ci/woodpecker/push/todo-check Pipeline was successful
ci/woodpecker/push/release Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
2024-04-08 08:05:13 +01:00
b66b70c08b
fix(server): fix typo
ci/woodpecker/push/docker Pipeline was successful
ci/woodpecker/push/todo-check Pipeline was successful
ci/woodpecker/push/release Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/cron/docker Pipeline was successful
ci/woodpecker/cron/release Pipeline was successful
ci/woodpecker/cron/todo-check Pipeline was successful
ci/woodpecker/cron/build Pipeline was successful
2024-04-07 20:57:51 +01:00
ca673f9545
feat(server): start repo actors
ci/woodpecker/push/release Pipeline was successful
ci/woodpecker/push/docker Pipeline was successful
ci/woodpecker/push/todo-check Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
2024-04-07 20:16:41 +01:00
eacefefe20
feat(server/actors): create stub RepoActor
2024-04-07 20:15:41 +01:00
3ac4894d68
feat(config): add ForgeDetails and RepoDetails types
2024-04-07 20:15:41 +01:00
1de2bd2ecb
feat(server): log parsed config
ci/woodpecker/push/docker Pipeline was successful
ci/woodpecker/push/release Pipeline was successful
ci/woodpecker/push/todo-check Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
2024-04-07 19:10:37 +01:00
f1041d6fe6
fix(config): parse the server file with sections
2024-04-07 19:10:37 +01:00
ef75ecda08
feat(server): log error when fails to load config
2024-04-07 18:37:01 +01:00
dc4110596f
feat(config): implement Display for ForgeType
2024-04-07 18:36:27 +01:00
a3c52c7761
feat(config): rename propery url as hostname
ci/woodpecker/push/build Pipeline failed
ci/woodpecker/push/release Pipeline was successful
ci/woodpecker/push/todo-check Pipeline was successful
ci/woodpecker/push/docker Pipeline failed
2024-04-07 16:14:05 +01:00
cb0a7f7cd7
feat(config): rename property type as forge_type
2024-04-07 16:11:23 +01:00
cd8d236940
chore: cargo clippy fixes
2024-04-07 16:09:16 +01:00
efb55e4b3b
feat(server/config): Parse file
2024-04-07 13:47:39 +01:00
90f9ab8e96
feat(filesystem): Add read_file()
2024-04-07 13:46:59 +01:00
2c07bb5af3
refactor(filesystem): Use info! rather than event!
2024-04-07 13:26:02 +01:00
1d42c63e53
chore(server): Rename server.rs as server/mod.rs
...
Server will be the more complex component, so prepare to add more
modules under server.
2024-04-07 13:17:02 +01:00
1207bbcff3
feat: Add Filesystem to wrap fs operations
2024-04-07 12:06:33 +01:00
d341647d7d
feat(init): log when not overwritting exiting file
2024-04-07 08:56:33 +01:00
e25ff500d8
feat(server): Add stub for server start command
2024-04-06 18:53:18 +01:00
3a253d8568
chore: Remove redundant logging
2024-04-06 18:50:16 +01:00
1e3ca5b711
feat(server): creates a default server configuration file
...
The default configuration is currently blank
2024-04-06 18:42:34 +01:00
aa27e96d53
feat(init): creates a default configuration file
...
The default configuration file is currently empty
2024-04-06 18:39:20 +01:00
dd124d11ae
feat: Parse commands from args
2024-04-06 18:28:18 +01:00
1dc9c38165
chore: cargo init
2024-04-06 17:39:56 +01:00