Commit Graph

12 Commits

Author SHA1 Message Date
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 c17772040b tests: test also clone step
Also test clone step so we are sure that the clone url is correct.
2019-08-05 13:33:58 +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 cf0b7f8ded add initial integration tests 2019-05-29 13:35:20 +02:00
Simone Gotti 504f538c6e ci: update agola config 2019-07-03 11:17:03 +02:00
Simone Gotti e0d37b08f2 runservice: add k8s driver 2019-04-22 17:54:24 +02:00
Simone Gotti 4c19ea3e91 remove .agola/config.yml
since we use the jsonnet format
2019-04-16 17:51:39 +02:00
Simone Gotti fcba3ccfad tests: add config.jsonnet
Use a jsonnet config that make creating matrix build and tests a breeze
2019-04-16 15:37:23 +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 7be0ae205f update .agola/config.yml 2019-04-03 18:05:34 +02:00
Simone Gotti 41ac92086a *: test on itself
What is a CI/CD system if it cannot test itself?
2019-03-13 12:14:55 +01:00