fabric8io / fabric8-generator

a jboss forge add on for the fabric8 upstream and SaaS generator wizards

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fabric8-generator-addon

This addon provides the addons for the fabric8 forge generator wizards

Depends on

Addon Exported Optional

ui

yes

no

projects

yes

no

Setup

This Addon needs to be installed in the local maven repository before used in the backend.

    mvn clean install

Testing in development

First make sure you have connected to an OpenShift cluster so that you can do things like

oc get pod

You can now try out this addon in the Forge CLI as follows:

build fabric8-generator locally

git clone https://github.com/fabric8io/fabric8-generator.git
cd fabric8-generator
mvn install

install the addon into forge

  • download the latest distribution JBoss Forge

  • add the forge command to your $PATH

  • you could trash your ~/.forge folder to remove any old addons

  • install the addon into forge via:

forge
addon-install --coordinate io.fabric8.forge:fabric8-generator,1.0.0-SNAPSHOT
addon-watch-start
  • you can now rebuild the addon and forge will reload it on the fly!

setup your git account

  • setup your git repository credentials in a Secret in kubernetes/openshift (only required once per cluster)

fabric8-configure-git-account --git-provider github --git-user-name MYUSER --git-password MY_TOKEN --git-email MY_EMAIL

create a project!

  • if you are not running a jenkins service in your current openshift namespace you will need to disable the CI part by adding the following argument when you create a project:

  --add-ci-web-hooks false
  • now to create a project type the following then hit TAB

obsidian-new-quickstart --named demo131 --type rest_springboot-tomcat

Then hit return and enjoy the ride!!!

import a git repo

If you are running a jenkins service in your current openshift namespace which has the github organisation folder plugin installed like the fabric8 image you should be able to import one or more repositories from your github account or any other organisation via the following command:

fabric8-import-git --git-repository-pattern myprojectname

This command will create a pipeline for all matching repositories and all branches with a Jenkinsfile!

To import all projects use the pattern: .*

fabric8-import-git --git-repository-pattern ".*"

Debugging

To debug your local build of the forge addons exit forge then re-run it via:

forge --debug

You can then create a Remote Debug execution in your IDE to connect to the same debug port that Forge uses (5005 or 8000 etc) and then start debugging!

viewing logs

To view local forge logs

tail -f ~/.forge/log/forge.log

build obsidian-generator locally

git clone https://github.com/obsidian-toaster/obsidian-addon.git
cd obsidian-addon
mvn install

Then you can use it in the fabric8-generator via:

mvn install -Psnapshot

About

a jboss forge add on for the fabric8 upstream and SaaS generator wizards

License:Apache License 2.0


Languages

Language:Java 99.7%Language:Groovy 0.3%