Simone Gotti
5dfe7f8ce9
gateway api: return projectgroup visibility
2019-05-12 23:24:48 +02:00
Simone Gotti
d2d1a5fb65
gateway api: return project visibility
2019-05-12 23:23:30 +02:00
Simone Gotti
83f6ebe95f
gateway: implement updateProject
...
Update project currently handles updating project name and visibility. In future
we'll add additional update logic.
2019-05-12 23:22:18 +02:00
Simone Gotti
55b4a94281
gateway api: remove unused exposedURL variable
2019-05-12 00:28:11 +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
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
e4e7de4ad2
runservice/gateway: return run on run action
2019-05-07 23:23:58 +02:00
Simone Gotti
4154be3370
*: set sshhostkey and skip check on remote source
2019-05-07 15:59:08 +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
a04dd62e91
gateway: initial authorization
2019-05-03 23:19:23 +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
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
5a50a2681d
util/errors: add ErrForbidden
2019-05-03 23:18:51 +02:00
Simone Gotti
041e8867f8
*: add creatorUserID and cretedAt to organization
2019-05-03 14:24:18 +02:00
Simone Gotti
ea02eed2d9
* api: accept both ids or names in the same endpoint
...
Simplify api to accept both ids or names in the same endpoint
2019-05-03 11:07:53 +02:00
Simone Gotti
b9db3137ad
gateway api: return user linked accounts
2019-05-03 09:54:47 +02:00
Simone Gotti
ab7e4b8a4b
gateway: add user remote repos API
2019-05-03 00:11:11 +02:00
Simone Gotti
68e6bd5bdf
configstore: add project/projectgroup visibility
2019-04-30 17:09:26 +02:00
Simone Gotti
b1c9892378
configstore: report project/projectgroup path
...
and also parent path
2019-04-30 17:09:26 +02:00
Simone Gotti
984efb539e
configstore: use augmented types for vars/secrets dynamic values
2019-04-30 16:28:01 +02:00
Simone Gotti
1820e7c477
types: rename user UserName field to Name
2019-04-30 12:56:43 +02:00
Simone Gotti
8bde2f2bc0
runservice: implement caching
...
Add `save_cache` and `restore_cache steps`
2019-04-13 14:58:56 +02:00
Simone Gotti
3928851c10
runservice: rename Run.RunTasks to Run.Tasks
2019-04-12 17:45:38 +02:00
Simone Gotti
5165984030
runservice: convert RunConfigTask.Depends to a map
2019-04-12 17:04:07 +02:00
Simone Gotti
da27348a1d
runservice: implement run setup errors
...
Add the ability to define a run with a setuperror phase.
When the run setup has errors client could submit a run with a list of setup
errors. In such case the run will be created in the setuperror phase.
Setup errors are currently generated by the webhook receiver and the run service
when it checks the run config for possible issues.
2019-04-09 16:51:37 +02:00
Simone Gotti
3642be6f21
*/api: Use helpers for error handling
...
* client: always parse the json error message field and return its contents
* Use ErrBadRequest and ErrNotFound in every handler and command
* Gateway: by default pass underlying service error (configstore, runservice) to
client keeping the status code and message. In future, if some errors must be
masked, we should change the specific parts that need special handling.
2019-04-09 14:53:00 +02:00
Simone Gotti
7d787c5f77
*: implement task approval
2019-04-08 17:29:57 +02:00
Simone Gotti
81537f882f
gateway: fix runs url to plural
2019-04-08 16:11:19 +02:00
Simone Gotti
04f3905ea1
client: fix content type header case
2019-04-08 12:28:15 +02:00
Simone Gotti
56d903d4db
gateway api: improve response handling
...
* Always return a json message also on error. For internal errors return a
generic "internal server error" message to not leak the real internal error to
clients
* Return 201 Created on resource creation
* Return 204 No Content on resource deletion and other action with no json
output
2019-04-08 11:35:45 +02:00
Simone Gotti
763d77d899
gateway: rename projectid to projectref
2019-04-08 09:04:55 +02:00
Simone Gotti
f3781c9087
*: fix rest methods
...
* use POST instead of PUT for resource creation
* use PUT instead of POST for resource special actions
2019-04-08 08:54:45 +02:00
Simone Gotti
595590e611
api: use httpError helper everywhere
2019-04-05 16:33:00 +02:00
Simone Gotti
fe5bc2fa31
gw repos: use config provided gitServerURL
2019-04-05 16:23:54 +02:00
Simone Gotti
ac28731d11
gateway: only admin or the same logged user can create an user token
2019-04-05 15:56:06 +02:00
Simone Gotti
c4310be7de
Implement user token delete
2019-04-05 15:01:57 +02:00
Simone Gotti
3a41e66f5b
cmd: implement variable delete
2019-04-05 11:11:27 +02:00
Simone Gotti
2e335effe9
cmd: implement secret delete
2019-04-05 11:00:45 +02:00
Simone Gotti
42becb0505
update secret create
2019-04-05 10:32:32 +02:00
Simone Gotti
25eb200625
gw api: fix matching secret logic
2019-04-05 10:26:35 +02:00
Simone Gotti
2d68be8a30
gw api: fix project and remotesource to return the right response
2019-04-03 15:08:33 +02:00
Simone Gotti
bb21520133
gw api client: add GetCurrentUser
2019-04-03 15:06:02 +02:00
Simone Gotti
3d39553189
project create: user project path
...
Use project path for project creation and get the project clone url directly
from the remote source
2019-04-03 11:07:54 +02:00
Simone Gotti
6736f5aebc
gw api: require at least one group on runs query api
2019-04-03 08:52:29 +02:00
Simone Gotti
f0e7ce4a96
cmd: implement project/projectgroup variable create
2019-04-02 11:07:39 +02:00
Simone Gotti
eb8cd9cc52
gateway: add user registration
...
Adds two handler:
* Authorize handler used to ask remote source authorization
* Register handler used to do user and related linked account creation
2019-03-29 17:53:15 +01:00
Simone Gotti
3e3a7a0ea5
gateway: move user la and login validation to command layer
2019-03-29 14:33:41 +01:00
Simone Gotti
48ab496beb
*: add api to query last run per group
2019-03-29 12:00:18 +01:00
Simone Gotti
1e41e3ad33
gateway/api: report if the run can be restarted
2019-03-29 09:22:34 +01:00
Simone Gotti
50547a6490
initial secret and variables impl
2019-03-14 14:36:18 +01:00
Simone Gotti
8b92b6f55c
initial project group impl
...
and related api updated
2019-03-14 14:36:18 +01:00
Simone Gotti
8f4a5b29b9
*: implement setup step
2019-03-13 15:48:35 +01:00
Simone Gotti
f09602cdc3
*: implement run stop
2019-03-08 10:02:37 +01:00
Simone Gotti
a4ad66ac2d
gateway: implement initial basic run restart
2019-03-04 16:12:07 +01:00
Simone Gotti
41002efbff
*: add organizations
2019-02-28 15:52:35 +01:00
Simone Gotti
fd486bbe09
gateway: add internal git server repos api
2019-02-22 09:34:48 +01:00
Simone Gotti
021a0465ce
gateway: initial implementation
2019-02-21 17:58:25 +01:00