小编adr*_*lau的帖子

Jenkins Git userContent插件

我最近尝试在Jenkins 1.546上安装Git userContent插件.重新启动Jenkins后发生以下错误:

hudson.util.HudsonFailedToLoad: org.jvnet.hudson.reactor.ReactorException: java.lang.Error: java.lang.reflect.InvocationTargetException
    at hudson.WebAppMain$3.run(WebAppMain.java:234)
Caused by: org.jvnet.hudson.reactor.ReactorException: java.lang.Error: java.lang.reflect.InvocationTargetException
    at org.jvnet.hudson.reactor.Reactor.execute(Reactor.java:269)
    at jenkins.InitReactorRunner.run(InitReactorRunner.java:44)
    at jenkins.model.Jenkins.executeReactor(Jenkins.java:908)
    at jenkins.model.Jenkins.<init>(Jenkins.java:807)
    at hudson.model.Hudson.<init>(Hudson.java:82)
    at hudson.model.Hudson.<init>(Hudson.java:78)
    at hudson.WebAppMain$3.run(WebAppMain.java:222)
Caused by: java.lang.Error: java.lang.reflect.InvocationTargetException
    at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:109)
    at hudson.init.TaskMethodFinder$TaskImpl.run(TaskMethodFinder.java:169)
    at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282)
    at jenkins.model.Jenkins$7.runTask(Jenkins.java:897)
    at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210)
    at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:105)
    ... 8 more
Caused by: java.lang.NullPointerException
    at hudson.plugins.git.GitSCM.onLoaded(GitSCM.java:1389) …
Run Code Online (Sandbox Code Playgroud)

git jenkins jenkins-plugins

7
推荐指数
2
解决办法
5857
查看次数

zeromq w/Electron:找不到绑定文件

我使用的是Windows 7 x64,nodejs 5.1.0和Electron 0.35.我按照电子快速启动应用程序的说明,然后将行添加require("zmq")到main.js. 此时npm install zmq --save,electron main.js显示:

Error: Could not locate the bindings file. Tried:[ zmq.node路径列表]

尝试的路径之一实际上存在于系统中,即 node_modules/zmq/build/Release/zmq.node

如果我删除电子应用程序代码并require("zmq")在main.js中只保留行,我可以成功运行node main.js.我怎么能在使用Electron运行时摆脱错误?

javascript zeromq node.js npm electron

6
推荐指数
1
解决办法
1347
查看次数

OS X 替代 eventfd

eventfd是 Linux 特定的。我需要将在 Linux 上编写的库移植到 OS X 上,该库使用此事件通知系统。有没有办法实现这一点?

linux macos event-handling

5
推荐指数
0
解决办法
2986
查看次数

Jenkins userContent文件

我们有一个Jenkins主从模型.在从属服务器上运行的每个作业都需要一定数量的配置文件.必须在构建步骤之前将这些文件从主服务器复制到每个从服务器.到目前为止,我已经能够使用Config File Provider Plugin完成此任务.这个插件的缺点是它不支持文件夹,我希望能够将slave1的配置文件放在slave1文件夹中,依此类推.现在,在创建作业时,我在下拉菜单中有一个巨大的文件列表,并要求提供配置文件.

这个插件附带了一些方便的东西:配置文件可以通过Web界面进行编辑.

另一方面,Jenkins 在主服务器上提供了一个userContent文件夹,可通过http:// [jenkins-server]/userContent访问,解决了我对文件夹的需求,但我还没有找到从提供的Web界面编辑这些文件的方法.

我必须提到master是一台远程机器,每次我需要在那里修改文件时我都不想连接它.有没有办法编辑userContent文件夹中的文件,或者将上传到Config File Plugin的文件组织到文件夹中?

谢谢!

jenkins jenkins-plugins

3
推荐指数
1
解决办法
5058
查看次数

如何使用ctypes从Python中访问struct中的指针数据?

我有以下C结构:

typedef struct {
    uint8_t a;
    uint8_t b;
    uint32_t c;
    uint8_t* d;
}
Run Code Online (Sandbox Code Playgroud)

使用ctypes,通过回调,我能够在Python中获得指向这样一个结构的指针,让我们调用它ref.我可以这样轻松地获得a,b,c:

from ctypes import cast, c_uint8, c_uint32, POINTER

a = cast(ref, POINTER(c_uint8)).contents.value
b = cast(ref + 1, POINTER(c_uint8)).contents.value
c = cast(ref + 2, POINTER(c_uint32)).contents.value
Run Code Online (Sandbox Code Playgroud)

但我无法从d读取字节.我尝试了以下方法:

d_pointer = cast(ref + 6, POINTER(POINTER(c_uint8))).contents
first_byte_of_d = d_pointer.contents
print type(first_byte_of_d) # prints <class 'ctypes.c_ubyte'>
print first_byte_of_d
Run Code Online (Sandbox Code Playgroud)

在最后一行,我在使用gdb进行调试时遇到了SIGSEGV.所以问题是,如何从Python中的结构访问指针的第一个字节?

python ctypes pointers

3
推荐指数
1
解决办法
4294
查看次数