-
Notifications
You must be signed in to change notification settings - Fork 504
jenkins DSL/workflow script to support a 'fabric8.yml' file in a projects source code which can be used to configure the CI/CD process #4086
Comments
BTW I'm wondering if we should use a YAML file for configuration; then allow folks to write optional groovy files for adding new build configurations by hand. I figure it'd be nice to have a hawtio UI (maybe a forge CLI command too) to configure the CI / CD pipelines. e.g. we could maybe have a set of standard templates for CI / CD builds / pipelines; then have a default set we use and allow a project to configure which to enable / disable - together with allowing it to opt in or out of gerrit / taiga et al. |
Using a yaml config file like circle ci proposes could be a great way to express the project (https://circleci.com/docs/config-sample) definition to be "deployed" for a CI/CD scenario. Ideally this file should be pre-filled with the values that we already know for a specific setup or combination of containers chosen (gogs + jenkins + nexus, gogs + gerrit + jenkins + ...), plugins selected (for jenkins), webhooks, environment (integration, testing, ...) |
We could use one of this YAML Java Parser project & include it with a parent/abstract mojo class to process the YAML project config file & calls the different plugins in charge to configure the CD project |
BTW we already parse YAML with jackson in fabric8 in the kubernetes-api; we do the same to parse the I'm thinking the 2 main places we'll parse the YAML is
Its mostly the latter but a few things can be read in the former to help make things a little easier |
@jstrachan with the v0.6.1 release of Origin just come out there are some changes we need to be aware of, one being the path of the config file (changes to |
@jimmidyson ah thanks - raised #4184 to track that one |
…a project so that the fabric8:create-build-config will use it to override the default values such as chat room or issue tracker project name; also the mvn plugin is better at defaulting stuff from inside the project now (like the repo name or git url)
…mize what goes into the fabric8.yml file to help configure the devops options for a project
FWIW a fabric8.yml file is now created by default in the new project wizard if some devops options are selected |
…d code coverage too
…the new project wizard
folks could use a seed Jenkins DSL script to generate builds for all projects found in gogs; but folks may wish to configure things differently on a per project basis.
The
fabric8cd.groovy
file could be used to contain configuration properties and/or Jenkins DSL (or a pipeline DSL or whatnot).Some examples could be to:
["dev", "itest"]
but disable["staging", "production"]
)fabric8cd.groovy
fileThe generic Jenkins DSL Groovy script could then clone the source of the project; if the
fabric8cd.groovy
file is there; invoke it then take the results and use them in the logic to create the jobs for it. If its not there then just invoke the usual build process function.The text was updated successfully, but these errors were encountered: