简体   繁体   English

可以将Drools 6 Workbench推送到远程git存储库吗?

[英]Can Drools 6 Workbench push to a remote git repository?

I wanted to set up Workbench to use a git daemon shared by other developers who are using the Eclipse plugin. 我想设置Workbench以使用由其他使用Eclipse插件的开发人员共享的git守护程序。

I can clone the repository into Workbench, but it will not push changes back to that repository. 我可以将存储库克隆到Workbench中,但它不会将更改推送回该存储库。 It seems to use that clone to set up its own local repository. 它似乎使用该克隆来设置自己的本地存储库。

Is this a limitation with Workbench? 这是Workbench的限制吗? If we want to use Workbench and the Eclipse plugin in a mixed environment, do we have to use Workbench as the git daemon? 如果我们想在混合环境中使用Workbench和Eclipse插件,我们是否必须使用Workbench作为git守护进程?

As far as I am aware, there is no functionality in KIE Workbench as yet to push to a remote repo. 据我所知,KIE Workbench尚未推出远程仓库的功能。 However, you can still achieve your goal of having an upstream repository rather than letting all developers using the git repo inside the KIE Workbench. 但是,您仍然可以实现拥有上游存储库的目标,而不是让所有开发人员在KIE Workbench中使用git repo。 You can test it with the existing jbpm-playground repo. 您可以使用现有的jbpm-playground repo进行测试。 Let's assume you have created a fork on Github - 假设你在Github上创建了一个fork -

    git@github.com:yourGithubUsername/jbpm-playground.git.  

and that you and your developers want to work primarily from the forked Github repo on a branch called "devBranch", but non-developers want to work primarily on the KIE Workbench. 并且您和您的开发人员希望主要从名为“devBranch”的分支上的分叉Github仓库开始工作,但非开发人员希望主要在KIE Workbench上工作。

You could manage that relationship between the Workbench's git repo and the upstream repo like this: 您可以像下面这样管理Workbench的git repo和上游repo之间的关系:

  1. Initial setup 最初设定

     git clone git@github.com:yourGithubUsername/jbpm-playground.git cd jbpm-playground git branch devBranch git checkout devBranch git push origin devBranch git remote add git-in-kiewb ssh://krisv@your-jbpm-server:8001/jbpm-playground 
  2. Getting changes by your non-developers from the git repo in KIE Workbench into your Github repo: 非开发人员从KIE Workbench中的git repo获取更改到您的Github仓库:

     git pull git-in-kiewb master git push origin devBranch 
  3. Getting changes by your developers from your Github repo into the git repo in KIE Workbench: 您的开发人员将您的Github仓库更改为KIE Workbench中的git仓库:

     git pull origin devBranch git push git-in-kiewb master 

for using master branch 用于使用主分支

git clone git@github.com:tenkyu/drools-flow-order.git
cd drools-flow-order
git remote add git-in-kiewb ssh://admin@0.0.0.0:8002/saglik

->github
git pull git-in-kiewb master
git push origin master

->local
git pull origin master
git push git-in-kiewb master

You can use git hooks to do this as explained here: 您可以使用git hooks执行此操作,如下所述:

https://access.redhat.com/documentation/en-us/red_hat_jboss_bpm_suite/6.4/html/administration_and_configuration_guide/chap_repository_hooks https://access.redhat.com/documentation/en-us/red_hat_jboss_bpm_suite/6.4/html/administration_and_configuration_guide/chap_repository_hooks

Basically create on your git repo on jboss, and there add a hook on post-commit, that could do git push origin. 基本上在jboss上创建git repo,并在post-commit上添加一个钩子,可以执行git push origin。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM