ploigos / ploigos-software-factory-operator

33 stars 22 forks source link

Scaffolding the Jenkinsfile? #169

Open garethahealy opened 3 years ago

garethahealy commented 3 years ago

Currently, when reading the docs on how to configure the Jenkinsfile, they are very much worded from the point of changing the reference app.

But what if I already have a git project and want to adopt ploigos? the docs don't really explain how I'd go about doing that (i.e.: where do I grab the example Jenkinsfile / config from? is the reference app the master source?)

It feels like another CR could automate some of this pain. The basic idea being:

  1. user provides the git URL (with username/pass or SSH key)
  2. Once the CR is created; a run-once job creates a branch and commits example Jenkinsfile/Config
  3. Then raises a PR if its a supported platform (i.e.: gitea), if not, tells the user in the .status to merge themselves

This CR could also handle creating the project in gitea/{source control} if its a new project and scaffolding everything automatically for the user - i.e.: Jenkinsfile / any mvn deps / etc

andykrohg commented 3 years ago

@garethahealy I created a README for starting from scratch here: https://github.com/andykrohg/ploigos-onboarding-demo. There's still much work to be done for making ploigos app/framework agnostic, but hopefully this should help 😄