我正在尝试添加对我的jenkins job dsl的调用,该调用将配置作业以授予其他构建复制工件的权限。但是,我无法在Jenkins Job DSL API中找到它的命令: https://jenkinsci.github.io/job-dsl-plugin/
此命令是否存在?反正有没有设置我的groovy如果它不这样做?
答案 0 :(得分:3)
没有内置DSL来设置该权限,但您可以使用Automatically Generated DSL:
job('example') {
properties {
copyArtifactPermissionProperty {
projectNames('one, two')
}
}
}
答案 1 :(得分:0)
这是one吗?
configure { project ->
project / 'properties' / 'hudson.plugins.copyartifact.CopyArtifactPermissionProperty' / 'projectNameList' {
'string' "*-foo"
}
}
EDIT 似乎这可能已在google group for job-dsl
中修复java.lang.RuntimeException: Unable to pause activity {com.aaron.waller.angelasoundboard/com.aaron.waller.angelasoundboard.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.media.MediaPlayer.pause()' on a null object reference
at android.app.ActivityThread.performPauseActivity(ActivityThread.java:4591)
at android.app.ActivityThread.performPauseActivity(ActivityThread.java:4550)
at android.app.ActivityThread.handlePauseActivity(ActivityThread.java:4525)
at android.app.ActivityThread.access$1300(ActivityThread.java:222)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1806)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:158)
at android.app.ActivityThread.main(ActivityThread.java:7229)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.media.MediaPlayer.pause()' on a null object reference
at com.aaron.waller.angelasoundboard.MainActivity.onPause(MainActivity.java:145)
at android.app.Activity.performPause(Activity.java:7033)
at android.app.Instrumentation.callActivityOnPause(Instrumentation.java:1339)
at android.app.ActivityThread.performPauseActivity(ActivityThread.java:4577)
... 10 more
我认为他们可能已经改变了界面,你现在需要提供明确的工作名称,但我没有插件所以我无法检查
答案 2 :(得分:0)
我刚遇到这个问题,这对我有用:
properties([
copyArtifactPermission('*')
])
应该用逗号分隔的项目列表代替野生之星,该项目列表需要复制该项目的人工制品。