Commit Graph

26 Commits

Author SHA1 Message Date
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
3a7ba2694d internal: fix linter errors
Fix errors reported by default golangci-lint linters
2019-07-02 16:20:53 +02:00
Simone Gotti
8d67844cc4 *: use vanity url
use agola.io domain
2019-07-01 11:40:20 +02:00
Simone Gotti
96c0fa9aea config: refactor config unmarshal
* Don't use a complex UnmarshalJSON for Task but use specific UnmarshalJSON for
every type that requires custom unmarshaling
2019-06-08 16:07:15 +02:00
Simone Gotti
42f578a0b5 config: add more validations to task steps 2019-05-24 11:57:10 +02:00
Simone Gotti
7658c44694 config: make runtime type pod the default
In this way users are not forced to always set it in the config file.
2019-05-23 23:23:54 +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
ba5399b97e config/runconfig: add global docker registries auth 2019-05-10 11:45:00 +02:00
Simone Gotti
dfeba334f6 runservice: update docker registry auth 2019-04-22 14:38:25 +02:00
Simone Gotti
f3e583bb40 config: check Runtime.Arch 2019-04-17 15:24:37 +02:00
Simone Gotti
ebe34ba1fa runservice: set default config task working_dir
Set default task working_dir to ~/project
2019-04-16 15:20:45 +02:00
Simone Gotti
4c30a5af1c runservice: handle jsonnet and json config files
Handle config files with name `config.jsonnet`, `config.json` and
`config.yml` and take the first from the repository in this order

For a jsonnet file execute it and use the generated output as the config
2019-04-16 15:00:37 +02:00
Simone Gotti
03451535c8 runservice: rework config format
The current config format was thought for future extensions for reusing runtimes
and job definitions adding some parameters.

After a lot of thoughts this looks like a complex approach: the final result
will be a sort of templating without a lot of powers.

Other approach like external templating should be an alternative but I really
don't think templating yaml is the way to go.

A much better approach will to just use jsonnet when we need to create matrix
runs and a lot of other use cases.

So just make the config a simple yaml/json. User can generate their config using
any preferred tool and in future we'll leverage jsonnet automated parsing and
provide a lot of jsonnet based examples for most use cases.

Main changes:

* Runs are now an array and not a map. The run name is in the Name field
* Tasks are now an array and not a map. The task name is in the Name field
* Use https://github.com/ghodss/yaml so we'll use json struct tags and unmarshall functions
2019-04-16 11:01:02 +02:00
Simone Gotti
6066221136 runservice: rename config pipeline(s) to run(s)
No need for different names. We are always talking about a run. In the config
it's the run definition, in the service is the run execution.
2019-04-15 23:42:10 +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
68e95ad3be runservice: implement task dependencies conditions
Handle the task dependencies conditions:
* on_success (default if no conditions are specified)
* on_failure
* on_skipped

Not the runservice won't stop run but continue executing tasks that depends on a
parent also if this is failed
2019-04-12 16:46:04 +02:00
Simone Gotti
634a8a543c runservice: implement docker registry auth
By now just support default username/password login

In future also support additional container registries with their own credential
helpers
2019-04-10 17:13:51 +02:00
Simone Gotti
298ffc3529 config: generalize and simplify value string/from_variable parsing 2019-04-10 17:12:39 +02:00
Simone Gotti
7d787c5f77 *: implement task approval 2019-04-08 17:29:57 +02:00
Simone Gotti
61b454d4da config environment from variable 2019-03-18 15:02:32 +01:00
Simone Gotti
8b92b6f55c initial project group impl
and related api updated
2019-03-14 14:36:18 +01:00
Simone Gotti
b05b377d31 runservice: add option to define custom container entrypoint 2019-03-13 12:12:32 +01:00
Simone Gotti
16ac6ada66 runservice: add privileged containers options 2019-03-13 12:11:46 +01:00
Simone Gotti
6f38c48066 *: initial implementation of when conditions 2019-03-07 18:01:34 +01:00
Simone Gotti
44173ac473 cmd: initial commit 2019-02-21 15:57:40 +01:00
Simone Gotti
f70dc16738 Add initial agola config format and handling 2019-03-07 14:42:32 +01:00