Jason Song
e28c95ea5c
feat: load secrets in task response
2022-11-25 17:48:46 +08:00
Jason Song
04634b9143
feat: pick jobs of the runner only
2022-11-25 17:48:46 +08:00
Jason Song
dca2ca2f47
fix: remove usage of core
2022-11-25 17:48:46 +08:00
Jason Song
8dbe30dff9
feat: tranfer log to storage
2022-11-25 17:48:45 +08:00
Jason Song
d2f8d5ded1
fix: use file name for log
2022-11-25 17:48:45 +08:00
Jason Song
dd5b2c5dfd
feat: optimize log indexes
2022-11-25 17:48:45 +08:00
Jason Song
d7b99e0028
feat: use dbfs to store log
2022-11-25 17:48:45 +08:00
Lunny Xiao
482832da76
delete unused structs
2022-11-25 17:48:45 +08:00
Bo-Yi.Wu
4c2d976629
chore(runner): get runner by uuid from header
...
Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
2022-11-25 17:48:45 +08:00
Bo-Yi.Wu
eeaac2c9f7
chore(runner): remove url checker from register
...
Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
2022-11-25 17:48:45 +08:00
Bo-Yi Wu
b7aaa3ba77
chore(runner): support update runner status.
2022-11-25 17:48:45 +08:00
fuxiaohei
fbb9f437a6
feat(runner): delete runner from admin html page
2022-11-25 17:48:45 +08:00
Jason Song
848a1ae309
feat: receive task logs
2022-11-25 17:48:45 +08:00
Jason Song
7497155d14
feat: update step state
2022-11-25 17:48:45 +08:00
Jason Song
6df53243aa
feat: create task steps
2022-11-25 17:48:45 +08:00
fuxiaohei
9648482ed6
feat(bots): move runner status update function to context
2022-11-25 17:48:45 +08:00
fuxiaohei
1a78fd3494
feat(runner): update runner last_online and status when FetchTask
2022-11-25 17:48:44 +08:00
Jason Song
32a5797608
chore: debug runner log reporting
2022-11-25 17:48:44 +08:00
Jason Song
79966763c6
feat: distribute tasks to runner
2022-11-25 17:48:44 +08:00
Bo-Yi.Wu
6f18f76577
chore(runner): update runner status using proto define
...
Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
2022-11-25 17:48:44 +08:00
Jason Song
530faf7227
feat: assign task to runner
2022-11-25 17:48:44 +08:00
Bo-Yi.Wu
4233090738
chore(runner): get token from header
...
Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
2022-11-25 17:48:44 +08:00
Bo-Yi.Wu
f79bc4f605
chore(runner): vaildate the repo URL
...
Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
2022-11-25 17:48:44 +08:00
Bo-Yi.Wu
ade88b3a7b
chore(runner): register new runner
...
Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
2022-11-25 17:48:44 +08:00
Jason Song
e21c07cc55
feat: parse runner from ctx
2022-11-25 17:48:44 +08:00
Bo-Yi.Wu
4dd135580f
chore(runner): update to latest proto format.
...
Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
2022-11-25 17:48:44 +08:00
Bo-Yi.Wu
fb738c4192
chore(runner): support fetch detail stage data
...
Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
2022-11-25 17:48:44 +08:00
Bo-Yi.Wu
8255915350
chore: move core package to top folder.
...
Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
2022-11-25 17:48:44 +08:00
Bo-Yi.Wu
1148903d79
refactor: move build status to core package
2022-11-25 17:48:44 +08:00
Bo-Yi.Wu
ea0cf8515e
chore(gRPC): handle requesut for stage data
...
Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
2022-11-25 17:48:44 +08:00
Bo-Yi.Wu
eac6425b2f
chore(gRPC): support update stage and step method.
...
Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
2022-11-25 17:48:44 +08:00
Bo-Yi.Wu
68d416bd1b
chore(gRPC): initial request method
...
Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
2022-11-25 17:48:44 +08:00
Bo-Yi.Wu
e07d416366
chore(model): create build, stage, step and logs table
...
Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
2022-11-25 17:48:44 +08:00
Bo-Yi.Wu
e05f224d19
chore(runner): support register
...
Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
2022-11-25 17:48:44 +08:00
Bo-Yi.Wu
c10414a018
test(ping): add testing for gRPC
2022-11-25 17:48:44 +08:00
Bo-Yi.Wu
e4e41a8065
chore(bots): re-structure grpc folder.
...
Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
2022-11-25 17:48:44 +08:00
Bo-Yi.Wu
2cba8fafd8
chore(grpc): add health check and grpc v1, alpha version
...
Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
2022-11-25 17:48:44 +08:00
GiteaBot
257ba77e8d
chore(proto): update import path
...
Signed-off-by: GiteaBot <teabot@gitea.io>
2022-11-25 17:48:44 +08:00
Bo-Yi Wu
ef3a74a1ba
chore(proto): Add ping service
...
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2022-11-25 17:48:44 +08:00
Bo-Yi Wu
0e79fc556a
chore(router): Add grpc and grep-web api
...
Using connect-go package
https://github.com/bufbuild/connect-go
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2022-11-25 17:48:44 +08:00
Lunny Xiao
931d8c2c21
add runners management ui
2022-11-25 17:48:43 +08:00
Lunny Xiao
2c4f6fd42f
add most tables
2022-11-25 17:48:43 +08:00
Lunny Xiao
5a479bb034
Add builds UI
2022-11-25 17:48:43 +08:00
Lunny Xiao
7732392a96
Add bots
2022-11-25 17:48:33 +08:00
KN4CK3R
a1ae83f36e
Workaround for container registry push/pull errors ( #21862 )
...
This PR addresses #19586
I added a mutex to the upload version creation which will prevent the
push errors when two requests try to create these database entries. I'm
not sure if this should be the final solution for this problem.
I added a workaround to allow a reupload of missing blobs. Normally a
reupload is skipped because the database knows the blob is already
present. The workaround checks if the blob exists on the file system.
This should not be needed anymore with the above fix so I marked this
code to be removed with Gitea v1.20.
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2022-11-25 13:47:46 +08:00
KN4CK3R
fc7a2d5a95
Add support for HEAD requests in Maven registry ( #21834 )
...
Related #18543
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2022-11-24 16:25:13 +02:00
Jason Song
e4eaa68a2b
Replace yaml.v2 with yaml.v3 ( #21832 )
...
I don't see why we have to use two versions of yaml. The difference
between the two versions has nothing to do with our usage.
2022-11-21 16:36:59 +08:00
KN4CK3R
044c754ea5
Add context.Context
to more methods ( #21546 )
...
This PR adds a context parameter to a bunch of methods. Some helper
`xxxCtx()` methods got replaced with the normal name now.
Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2022-11-19 16:12:33 +08:00
KN4CK3R
43ab9324c5
Fix setting HTTP headers after write ( #21833 )
...
The headers can't be modified after it was send to the client.
2022-11-18 01:55:15 +08:00
Lunny Xiao
34283a74e8
Allow detect whether it's in a database transaction for a context.Context ( #21756 )
...
Fix #19513
This PR introduce a new db method `InTransaction(context.Context)`,
and also builtin check on `db.TxContext` and `db.WithTx`.
There is also a new method `db.AutoTx` has been introduced but could be used by other PRs.
`WithTx` will always open a new transaction, if a transaction exist in context, return an error.
`AutoTx` will try to open a new transaction if no transaction exist in context.
That means it will always enter a transaction if there is no error.
Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: 6543 <6543@obermui.de>
2022-11-12 21:18:50 +01:00