Commit Graph

81 Commits

Author SHA1 Message Date
Simone Gotti 9588394b42
Merge pull request #133 from camandel/cmd_add_completion
cmd: add completion command
2019-10-02 10:58:15 +02:00
Simone Gotti eec25e6069
Merge pull request #132 from sgotti/cmd_projectgroup_delete
cmd: add project group delete command
2019-10-02 09:27:29 +02:00
Carlo Mandelli 761a777969 cmd: add completion command 2019-10-01 16:01:17 +02:00
Simone Gotti d18aadaf5c cmd: add project group update command 2019-10-01 15:39:29 +02:00
Simone Gotti 85b8888f76 cmd: add project group delete command 2019-10-01 10:33:56 +02:00
Simone Gotti ddfc5f41c0 cmd: add project update command 2019-09-30 13:30:13 +02:00
Carlo Mandelli 8df96757e3 fix typos in online help 2019-09-27 08:22:41 +02:00
Carlo Mandelli 229b4c511d Add variable/secret list subcommand 2019-09-26 09:33:24 +02:00
Simone Gotti 70eeddb719 types: use a global When type
Currently we are using different `When` types for every service and convert
between them. This is a good approach if we want to keep isolated all the
services (like if we were using different repos for every service instead of the
current monorepo).

But currently, since When is identical between all the services, simplify this by
using a common When type.
2019-09-05 09:37:27 +02:00
Simone Gotti 53dad95cd0 cmd: fix variable create/update
In c1ff28ef9f we exported various types. Unfortunately the types used by cmd
variable create/update are the wrong types and marshalling fails. Fix it using
the right type. In future this internal types should be exported.
2019-08-29 16:38:19 +02:00
Simone Gotti 2676770336 userdirectrun: add options to define variables
Add a --var and --var-file options (repeatable multiple times) to define the
variables to be used in the run.
2019-08-06 16:58:00 +02:00
Simone Gotti 4ec0b33eb4 userdirectrun: allow setting destination branch/tag/ref
Allow setting the destination branch/tag/ref so users can test the run
conditions based on the branch/tag/ref.

To simulate a pull request an user can define a ref that matches one of these
regular expressions: `refs/pull/(\d+)/head`, `refs/merge-requests/(\d+)/head`
2019-08-05 14:45:34 +02:00
Simone Gotti c1ff28ef9f *: export clients and related types
Export clients and related packages.

The main rule is to not import internal packages from exported packages.

The gateway client and related types are totally decoupled from the gateway
service (not shared types between the client and the server).

Instead the configstore and the runservice client currently share many types
that are now exported (decoupling them will require that a lot of types must be
duplicated and the need of functions to convert between them, this will be done
in future when the APIs will be declared as stable).
2019-08-02 12:02:01 +02:00
Simone Gotti fd26e617b3 configstore: move configstore types inside configstore package
Since they're not types common to all the services but belongs to the
configstore.

Next step will be to make them local to the configstore and not directly used by
other services since these types are also stored.
2019-08-02 10:05:47 +02:00
Simone Gotti f61a6068c2 cmd/serve: don't make --config required 2019-07-12 17:26:00 +02:00
Simone Gotti 378ee352c0 cmd: implement secret update 2019-07-08 10:32:59 +02:00
Simone Gotti 6508fd2b53 secret create: read values from yaml file/stdin 2019-07-08 09:58:11 +02:00
Simone Gotti 8c2f37d47c cmd: implement variable update 2019-07-06 15:25:57 +02:00
Simone Gotti c7aca42f1f variable create: read values from yaml file/stdin 2019-07-05 18:34:40 +02:00
Simone Gotti ee5c829653 *: add remote source option to disable registration/login
* Make the new fields RegistrationEnabled/LoginEnabled in types.RemoteSource
bool pointers (since they are new fields that don't exist in previously saved
remote sources) and default them to true if null when unmarshaling (or existing
remotesources will have registration and login disabled)

* Add options to cmd remotesource create/update to set the registration/login
disabled.
2019-07-05 13:33:29 +02:00
Simone Gotti e7864d0d84 gateway: add getruns filter by result 2019-07-05 10:42:45 +02:00
Simone Gotti 9d71f32368 cmd: don't set remotesourcecreate api-url flag as required
check it later since for github it could not be provided and will default to
"https://api.github.com"
2019-07-05 10:16:37 +02:00
Simone Gotti f861e2a647 cmd: fix run list 2019-07-04 16:22:11 +02:00
Simone Gotti abab40c6f5 gateway/cmd: generate CacheGroup for user direct runs
Since the user direct runs all belong to the same run group (the user id) all
the user direct runs will share the same caches. To distinguish between the
different caches we need to use something in addition to the user id. In this
case we are usin the local repo uuid generated by the direct run start command.
2019-07-03 15:19:52 +02:00
Simone Gotti 2859c3144a cmd: fix linter errors
Fix errors reported by default golangci-lint linters
2019-07-02 16:22:24 +02:00
Simone Gotti ced6108963 cmd toolbox: handle missing error checks 2019-07-02 14:27:32 +02:00
Simone Gotti b849e2c07e agola cmd: check MarkFlagRequired errors 2019-07-02 13:49:10 +02:00
Simone Gotti d8a92ba0d1 agola cmd: check possible Help function error 2019-07-02 13:44:43 +02:00
Simone Gotti 540f5888d2 agola cmd: return exit code 1 on bad command 2019-07-02 13:32:27 +02:00
Simone Gotti 88b7ea3de6 serve: rename all to all-base excluding executor
since the executor are usually run separately from the other "base" components,
make this explicit removing "all" and adding an "all-base" virtual component
that will start all the components except the executor.
2019-07-02 10:54:11 +02:00
Simone Gotti 8d67844cc4 *: use vanity url
use agola.io domain
2019-07-01 11:40:20 +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 a27721c5b1 directrunstart: use new user create run api
* Push the local custom ref to a branch ref (refs/heads/branch)
* After the push create the run calling the user create run api
2019-06-11 15:15:14 +02:00
Simone Gotti 810abaaab8 git-save: return commitSHA 2019-06-11 15:04:34 +02:00
Simone Gotti f92bcee73b directrun: setup local repo uuid and use it as remote repo name 2019-06-11 12:46:02 +02:00
Simone Gotti cff6b8d531 *: rename user local run to user direct run 2019-06-11 12:09:57 +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 8f1225da76 *: implement remote source update 2019-05-23 10:29:03 +02:00
Simone Gotti 933dfae658 cmd/api: add skipVerify remote source option
Add an option to set skipVerify on remote source to disable tls cert
verification on remote source api endpoint
2019-05-22 16:28:42 +02:00
Simone Gotti b22c197fef gitsources: add github gitsource 2019-05-15 23:46:21 +02:00
Simone Gotti 9cafc36a0d notification service: initial implementation 2019-05-15 10:17:20 +02:00
Simone Gotti 749109cd75 cmd: add org member list command 2019-05-14 12:56:38 +02:00
Simone Gotti 8f959c4500 cmd: add org member add/remove commands 2019-05-14 11:25:12 +02:00
Simone Gotti c5cdf01332 *: add organizations visibility 2019-05-14 10:56:17 +02:00
Simone Gotti f8b0061844 toolbox sleeper: reap inherited child processes 2019-05-10 14:28:56 +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 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