woodpecker/server/store/datastore
Anbraten d494b6a959
Use forge from db (#1417)
This is the first step towards support for multiple forges (#138). It
inserts a forge using the currently existing env varaibles into db and
uses this forge from db later on in all places of the code.

closes #621

addresses #138 

# TODO
- [x] add forges table
- [x] add id of forge to repo
- [x] use forge of repo
- [x] add forge from env vars to db if not exists
- [x] migrate repo.ForgeID to the newly generated forge
- [x] support cache with forge from repo
- [x] maybe add forge loading cache? (use LRU cache for forges, I expect
users to have less than 10 forges normally)

---------

Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
2024-04-16 08:04:55 +02:00
..
migration Use forge from db (#1417) 2024-04-16 08:04:55 +02:00
agent.go Enable golangci linter stylecheck (#3167) 2024-01-10 22:56:42 +01:00
agent_test.go Fix agent updating (#3287) 2024-01-28 12:29:56 +01:00
config.go Simplify store interfaces (#3437) 2024-02-25 10:37:10 +01:00
config_test.go Simplify store interfaces (#3437) 2024-02-25 10:37:10 +01:00
cron.go Replace goimports with gci (#3202) 2024-01-14 18:22:06 +01:00
cron_test.go Enable golangci linter stylecheck (#3167) 2024-01-10 22:56:42 +01:00
engine.go Replace goimports with gci (#3202) 2024-01-14 18:22:06 +01:00
engine_test.go Replace goimports with gci (#3202) 2024-01-14 18:22:06 +01:00
errors.go Update go module path for major version 2 (#2905) 2023-12-08 08:15:08 +01:00
feed.go Clean up models (#3228) 2024-01-22 07:56:18 +01:00
feed_test.go Use assert for test (#3201) 2024-01-14 19:33:58 +01:00
forge.go Use forge from db (#1417) 2024-04-16 08:04:55 +02:00
forge_test.go Use forge from db (#1417) 2024-04-16 08:04:55 +02:00
helper.go Update go module path for major version 2 (#2905) 2023-12-08 08:15:08 +01:00
helper_test.go Replace goimports with gci (#3202) 2024-01-14 18:22:06 +01:00
init.go Migrate to Xorm (#474) 2021-11-13 20:18:06 +01:00
init_cgo.go Add linter revive (#554) 2021-12-01 14:22:06 +01:00
log.go Simplify store interfaces (#3437) 2024-02-25 10:37:10 +01:00
log_test.go Simplify store interfaces (#3437) 2024-02-25 10:37:10 +01:00
org.go Add check for storage where repo/org name is empty (#2968) 2023-12-19 06:03:56 +01:00
org_test.go Add check for storage where repo/org name is empty (#2968) 2023-12-19 06:03:56 +01:00
permission.go Simplify store interfaces (#3437) 2024-02-25 10:37:10 +01:00
permission_test.go Simplify store interfaces (#3437) 2024-02-25 10:37:10 +01:00
pipeline.go Update pipeline state on server as a whole on approval (#3504) 2024-03-18 20:07:45 +01:00
pipeline_test.go Simplify store interfaces (#3437) 2024-02-25 10:37:10 +01:00
redirection.go Simplify store interfaces (#3437) 2024-02-25 10:37:10 +01:00
redirection_test.go Simplify store interfaces (#3437) 2024-02-25 10:37:10 +01:00
registry.go Update go module path for major version 2 (#2905) 2023-12-08 08:15:08 +01:00
registry_test.go Clean up models (#3228) 2024-01-22 07:56:18 +01:00
repo.go Add check for storage where repo/org name is empty (#2968) 2023-12-19 06:03:56 +01:00
repo_test.go Make PipelineConfig unique again (#3215) 2024-01-18 23:50:29 +02:00
secret.go Update go module path for major version 2 (#2905) 2023-12-08 08:15:08 +01:00
secret_test.go Use assert for test (#3201) 2024-01-14 19:33:58 +01:00
server_config.go Update go module path for major version 2 (#2905) 2023-12-08 08:15:08 +01:00
server_config_test.go Use assert for test (#3201) 2024-01-14 19:33:58 +01:00
step.go Update go module path for major version 2 (#2905) 2023-12-08 08:15:08 +01:00
step_test.go Use assert for test (#3201) 2024-01-14 19:33:58 +01:00
task.go Update go module path for major version 2 (#2905) 2023-12-08 08:15:08 +01:00
task_test.go Use assert for test (#3201) 2024-01-14 19:33:58 +01:00
user.go Update go module path for major version 2 (#2905) 2023-12-08 08:15:08 +01:00
users_test.go Add spellcheck config (#3018) 2024-01-27 21:15:10 +01:00
workflow.go Update pipeline state on server as a whole on approval (#3504) 2024-03-18 20:07:45 +01:00
workflow_test.go Use assert for test (#3201) 2024-01-14 19:33:58 +01:00
xorm.go Replace interface{} with any (#2807) 2023-11-12 18:23:48 +01:00