Commit Graph

357 Commits

Author SHA1 Message Date
Simone Gotti f8b0061844 toolbox sleeper: reap inherited child processes 2019-05-10 14:28:56 +02:00
Simone Gotti ba5399b97e config/runconfig: add global docker registries auth 2019-05-10 11:45:00 +02:00
Simone Gotti 59e4a1f0ba runservice: update runconfig group comment 2019-05-10 11:16:57 +02:00
Simone Gotti 0c94386149 gateway: add badges endpoint
Currently we generate badges only for projects branches. In future this could be
extended to also generate badges for tags and PRs
2019-05-10 11:08:24 +02:00
Simone Gotti c523bcba4e gateway: add delete remote source handler 2019-05-10 00:03:03 +02:00
Simone Gotti c9fb7258ec configstore: fix delete remote source action 2019-05-10 00:02:37 +02:00
Simone Gotti da224c7580 executor: make docker driver logger sugared 2019-05-09 23:44:41 +02:00
Simone Gotti b0fe7e4115 *: implement delete organization member 2019-05-09 17:05:13 +02:00
Simone Gotti d0309db97f types: add RemoteUserAvatarURL to User 2019-05-09 16:49:02 +02:00
Simone Gotti b37eddbe8b gateway: remove omitempty json struct tag from UserResponse 2019-05-09 16:48:28 +02:00
Simone Gotti 620bae68df *: implement add/update org member 2019-05-09 16:47:22 +02:00
Simone Gotti 8069063e0d gateway: add project update repo linked account api
Change the project repo linked account to the one of the current user
2019-05-09 15:36:47 +02:00
Simone Gotti a43be4a6be gateway: update CreateProject api
remove currentuserid since we can get it directly in the action
2019-05-09 15:34:58 +02:00
Simone Gotti e1d0318c9b configstore: add UpdateProject api 2019-05-09 15:33:57 +02:00
Simone Gotti 79c1a60a36 configstore: update CreateProject action
* move validation to ValidateProject function
* remove wrong project group check
2019-05-09 15:32:27 +02:00
Simone Gotti 92de7591da gitsources: implement gitea oauth2 auth
As from https://github.com/go-gitea/gitea/pull/5378 gitea is an oauth2 provider.
2019-05-09 14:14:13 +02:00
Simone Gotti 4e785e4851 runservice: build and use multiple toolboxes per architecture 2019-05-09 12:36:30 +02:00
Simone Gotti 28d31c0802 agolademo: move example config and update Dockerfile 2019-05-08 17:40:07 +02:00
Simone Gotti f6f267545a examples: add k8s simple and distributed examples 2019-05-08 15:42:42 +02:00
Simone Gotti 06d6d18305 Makefile: add docker images targets 2019-05-08 15:42:22 +02:00
Simone Gotti 41daf61da4 Dockerfile: add agola image stage
and make agolademo image depend on it
2019-05-08 15:40:11 +02:00
Simone Gotti ce7924d7fd runservice: use the path escaped cache key
Use the path escaped cache key so we can also handle cache keys with slashes
inside.
2019-05-08 12:15:17 +02:00
Simone Gotti bec9476d6c runservice: store related runid with logs and archives
Logs and archives can be shared by multiple runs. So removing a run doesn't
imply that we could also remote the logs and archives since they could be
"referenced" by another run.

Store also the runids as specific objects along with the logs and archives so,
we'll remove them only when no runids objects exist.
2019-05-08 12:11:46 +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 e4e7de4ad2 runservice/gateway: return run on run action 2019-05-07 23:23:58 +02:00
Simone Gotti 83273489e0 jwt: unify token generation functions 2019-05-07 18:30:20 +02:00
Simone Gotti 649c42f75b gitsources: create secret and webhook secret
Use the webhook secret on webhook creation and check it and webhook receive
2019-05-07 18:29:31 +02:00
Simone Gotti 2675aee333 configstore: generate User and Project secret 2019-05-07 17:16:42 +02:00
Simone Gotti 4154be3370 *: set sshhostkey and skip check on remote source 2019-05-07 15:59:08 +02:00
Simone Gotti 4d19ce1633 serve: add option to choose which components to run 2019-05-06 17:49:57 +02:00
Simone Gotti afae185e11 *: rework run approval and annotations
* runservice: use generic task annotations instead of approval annotations
* runservice: add method to set task annotations

* gateway: when an user call the run task approval action, it will set in the
task annotations the approval users ids. The task won't be approved.

* scheduler: when the number of approvers meets the required minimum number
(currently 1) call the runservice to approve the task

In this way we could easily implement some approval features like requiring a
minimum number of approvers (saved in the task annotations) before marking the
run as approved in the runservice.
2019-05-06 15:19:29 +02:00
Simone Gotti a590c21127 runservice api: get run from readdb 2019-05-06 15:18:49 +02:00
Simone Gotti 3139ef38d9 runservice readdb: get run from ost db if it's not in run db 2019-05-06 14:55:10 +02:00
Simone Gotti a04dd62e91 gateway: initial authorization 2019-05-03 23:19:23 +02:00
Simone Gotti 081ac8a44f gateway: move webhook genGroup to common as GenRunGroup 2019-05-05 23:58:40 +02:00
Simone Gotti 6ef5649b21 gateway: set user admin value in context 2019-05-05 17:30:38 +02:00
Simone Gotti 6dfb789e77 gateway: project(group) create: rename parentID to parentRef 2019-05-05 17:19:23 +02:00
Simone Gotti 05ae46a72d gateway: move run logic from api to actions 2019-05-06 00:00:45 +02:00
Simone Gotti 6b5bd40417 gateway: move remaining remotesource logic from api to actions 2019-05-05 14:54:16 +02:00
Simone Gotti 42184d0b5b gateway: move remaining user logic from api to actions 2019-05-05 14:45:19 +02:00
Simone Gotti 96918e9bad gateway: move remaining org logic from api to actions 2019-05-05 14:36:14 +02:00
Simone Gotti c889c2c1c2 gateway: move remaining project(group) logic from api to actions 2019-05-05 14:27:22 +02:00
Simone Gotti 64044df94d gateway: move secret logic from api to actions 2019-05-05 14:11:29 +02:00
Simone Gotti f73f0ba434 gateway: move variable logic from api to actions 2019-05-04 15:16:49 +02:00
Simone Gotti cb78ea48bc runservice: rename command(handler) to action(handler)
Since we're going to migrate all actions (also queries that now are implemented
in the api handlers) there
2019-05-03 23:59:21 +02:00
Simone Gotti 3f7e554f04 gateway: rename command(handler) to action(handler)
Since we're going to migrate all actions (also queries that now are implemented
in the api handlers) there
2019-05-03 23:48:49 +02:00
Simone Gotti ca5b5f3a7e configstore: rename command(handler) to action(handler)
Since we're going to migrate all actions (also queries that now are implemented
in the api handlers) there
2019-05-03 23:35:25 +02:00
Simone Gotti 5a50a2681d util/errors: add ErrForbidden 2019-05-03 23:18:51 +02:00