Commit Graph

27 Commits

Author SHA1 Message Date
Eng Zer Jun 83e66e73f2
test: use `T.TempDir` to create temporary test directory
The directory created by `T.TempDir` is automatically removed when the
test and all its subtests complete.

Reference: https://pkg.go.dev/testing#T.TempDir
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2022-03-01 16:37:17 +08:00
Simone Gotti d2b09d854f *: use new errors handling library
Implement a new error handling library based on pkg/errors. It provides
stack saving on wrapping and exports some function to add stack saving
also to external errors.
It also implements custom zerolog error formatting without adding too
much verbosity by just printing the chain error file:line without a full
stack trace of every error.

* Add a --detailed-errors options to print error with they full chain
* Wrap all error returns. Use errors.WithStack to wrap without adding a
  new messsage and error.Wrap[f] to add a message.
* Add golangci-lint wrapcheck to check that external packages errors are
  wrapped. This won't check that internal packages error are wrapped.
  But we want also to ensure this case so we'll have to find something
  else to check also these.
2022-02-28 12:49:13 +01:00
alessandro.pinna 9251a2a046 enhancement: automatic cleanup of old repos/branches 2022-02-08 11:34:23 +01:00
alessandro.pinna e600ca078e config: fix executor ActiveTasksLimit yaml tag 2021-10-11 09:48:25 +02:00
Simone Gotti d9d6b995da executor: add init image config authentication options
Add config options to define docker registry authentication for init image
pulling.
2021-05-26 08:57:21 +02:00
Simone Gotti afece4d846 executor: use busybox:stable as default init image
Use "busybox:stable" as default init image name so it won't be checked/pulled
any time.
2021-05-25 14:03:55 +02:00
Simone Gotti 21a63af6f5 executor: add config option to define the init image
* Add an executor config option to define the init image to use.
2021-05-25 11:46:44 +02:00
Carlo Mandelli aab2321d58 services: check config only for enabled services 2019-11-05 09:25:22 +01:00
Simone Gotti 7d375e4c4e runservice: add run workspace cleaner
Removes old workspace files (defaults to 7 days)
2019-09-17 09:40:23 +02:00
Simone Gotti 0ec0a37fa3 config: remove unused gatewayURL from gitserver config 2019-07-04 10:55:12 +02:00
Simone Gotti 8d67844cc4 *: use vanity url
use agola.io domain
2019-07-01 11:40:20 +02:00
Simone Gotti 0296d594b5 executor: add option to allow privileged containers
* add a config option allowPrivilegedContainers
* fail task setup if privileged containers are requested but they aren't
allowed.
* report if privileged containers are allowed to the runservice
2019-06-13 18:31:08 +02:00
Simone Gotti 5a74ebf9d8 *: remove agola git hook
* Delete the command and it's rule in the Makefile
* Don't use it inside gitserver and remove related config option (also from
examples)
* Remove webhook parsing from agolagit gitsource
2019-06-11 15:30:09 +02:00
Simone Gotti 9b2ce717c7 *: migrate to "golang.org/x/xerrors"
Just a raw replace of "github.com/pkg/errors".

Next steps will improve errors (like remote errors, api errors, not exist errors
etc...) to leverage its functionalities
2019-05-23 11:23:14 +02:00
Simone Gotti 9cafc36a0d notification service: initial implementation 2019-05-15 10:17:20 +02:00
Simone Gotti 43341f2cba *: rename GitServer to Gitserver 2019-05-08 15:23:13 +02:00
Simone Gotti 1e34dca95d runservice: split and simplify scheduler and executor naming
Also if they are logically part of the runservice the names runserviceExecutor
and runserviceScheduler are long and quite confusing for an external user

Simplify them separating both the code parts and updating the names:

runserviceScheduler -> runservice
runserviceExecutor -> executor
2019-05-07 23:56:10 +02:00
Simone Gotti 44d5b0f25a *: rename ConfigStore to Configstore 2019-05-07 23:42:42 +02:00
Simone Gotti e970e217e2 config: add global agola id field 2019-04-30 12:08:59 +02:00
Simone Gotti 41e333d7ec *: rename "lts" to "ost"
`lts` was choosen to reflect a "long term storage" but currently it's just an
object storage implementation. So use this term and "ost" as its abbreviation
(to not clash with "os").
2019-04-27 15:16:48 +02:00
Simone Gotti e0d37b08f2 runservice: add k8s driver 2019-04-22 17:54:24 +02:00
Simone Gotti 9c74b4ddc1 runservice scheduler: choose scheduler only if it has capacity 2019-04-17 20:59:28 +02:00
Simone Gotti 4dd89646af runservice executor: report ActiveTasksLimit
Add a config option to set the active tasks limit and report it.
2019-04-17 15:51:20 +02:00
Simone Gotti d3e95ba665 runservice config: set executor labels 2019-04-17 15:25:11 +02:00
Simone Gotti d3f658c5ad runservice: add run cache cleaner
Removes old cache entries (defaults to 7 days)
2019-04-17 13:58:41 +02:00
Simone Gotti fe5bc2fa31 gw repos: use config provided gitServerURL 2019-04-05 16:23:54 +02:00
Simone Gotti 5bdfb4c084 Add common services configuration 2019-02-21 16:05:06 +01:00