使用Jenkins或Hudson我想用fork和join点创建一个构建管道,例如:
job A
/ \
job B job C
| |
job D |
\ /
job E
Run Code Online (Sandbox Code Playgroud)
我想创建这样的任意串并行图,并且只要有一个从器件,Jenkins就可以自由地并行执行B/D和C.
B 插件执行后,Join插件立即加入.Build Pipeline Plugin不支持fork/join点.不确定是否可以使用Throttle Concurrent Builds插件(或不推荐使用的Locks&Latches插件); 如果是这样我无法弄清楚如何.一种解决方案可能是使用Apache Ivy指定构建依赖项并使用Ivy插件.但是,我的作业都是Makefile C/C++/shell脚本作业,我没有使用Ivy来验证是否可行.
在Jenkins中指定并行作业及其依赖项的最佳方法是什么?
parallel-processing ivy hudson-plugins jenkins jenkins-plugins
我创建了一个很好的 python Twisted 应用程序,其中包含一个用于 Twisted 运行器的插件,如 Twisted 文档中所述:http : //twistedmatrix.com/documents/current/core/howto/tap.html。我在使用 PyInstaller 打包时遇到问题:在执行冻结的应用程序期间找不到我的 twistd 插件。
为了发布我的项目,我使用twisd runner 模块创建了我自己的顶级启动脚本,例如
#!/usr/bin/env python
from twisted.scripts.twistd import run
from sys import argv
argv[1:] = [
'--pidfile', '/var/run/myapp.pid',
'--logfile', '/var/run/myapp.log',
'myapp_plugin'
]
run()
Run Code Online (Sandbox Code Playgroud)
接下来,我使用 PyInstaller 将其冻结为单个目录部署。执行上面的冻结脚本失败,因为它找不到我的扭曲插件(为简洁而编辑):
~/pyinstall/dist/bin/mystartup?16632/twisted/python/modules.py:758:
UserWarning: ~/pyinstall/dist/mystartup?16632 (for module twisted.plugins)
not in path importer cache (PEP 302 violation - check your local configuration).
~/pyinstall/dist/bin/mystartup: Unknown command: myapp_plugin
Run Code Online (Sandbox Code Playgroud)
通常,Twistd 会检查 Python 系统路径以在 twined/plugins/myapp_plugin.py 中发现我的插件。如果我在启动脚本中打印了 twind 插件列表,则该列表在 PyInstaller 生成的可执行文件中为空,例如
from twisted.plugin import IPlugin, getPlugins …Run Code Online (Sandbox Code Playgroud)