问题:我正在使用脚本来确定某些工作是否处于SUCCESS状态.只要我没有使用cloudbees文件夹插件,它就可以正常工作.我可以很容易地获得项目列表并获得项目结果.但是,在将作业移动到cloudbee文件夹后,作业以及作业结果将不再可用!
问:现在有人如何通过位于Cloudbees文件夹中的作业的groovy获得作业结果?
import jenkins\n\njen = jenkins.Jenkins(url="https://us1****xhpu******************.com:9080/" ,username="sk******", password="00326aef7*******************15695")\n\nprint jen.get_whoami()\nRun Code Online (Sandbox Code Playgroud)\n\n笔记:密码是API令牌
\n\n错误:
\n\n\n\n\nrequests.exceptions.SSLError:\n HTTPSConnectionPool(host=\'************************\', port=9080): 超过最大\n 重试次数url: /crumbIssuer/api/json (由\n SSLError(SSLError(1, u\'[SSL: CERTIFICATE_VERIFY_FAILED] 证书\n 验证失败 (_ssl.c:590)\'),)) 引起
\n
我尝试了 https \xe2\x86\x92 http 但不起作用。
\n我正在查看Cloudbees 文档,该文档说:
正确的方法是始终将检查点步骤保持在任何节点块之外,不与代理或工作区相关联
给出的示例示例适用于脚本化管道。我试图在声明式管道中实现这一点,但不断出错。我可以让它工作的唯一方法是:
stage ('Promotion Checkpoint') {
steps {
checkpoint 'Ready for Manual intervention'
timeout(time: 60, unit: 'SECONDS') {
input message: 'Do you want to proceed?'
}
}
}
Run Code Online (Sandbox Code Playgroud)
我的理解是声明式管道中的一个阶段类似于脚本管道中的节点。我不能在阶段或步骤之外进行检查点工作,这似乎是我对 Cloudbees 建议的解释。有人可以帮助在检查站之外正确使用吗?
是否可以从Cloudbees中托管的jenkins构建中将grails应用程序部署到cloudfoundry?
我正在尝试在Cloudbees Paas上部署现有的Jboss 7 war应用程序,而我却陷入了数据源配置的困境.在这个专门的Cloudbees wiki条目和相关的线程之后,我最终在应用程序启动期间出现以下错误(线程中的其他人已经提到过):
javax.resource.ResourceException: Wrong driver class [class com.mysql.jdbc.Driver] for this connection URL [jdbc:cloudbees://cbdebate--1]
Run Code Online (Sandbox Code Playgroud)
我的配置文件如下:
CloudBees的-web.xml中
<?xml version="1.0" encoding="UTF-8"?>
<cloudbees-web-app xmlns="http://www.cloudbees.com/xml/webapp/1">
<!-- Application ID (formatted CB_ACCOUNT/APPNAME) -->
<appid>hck/debate</appid>
<!-- DataSources (use names refererenced via <resource-ref> in WEB-INF/web.xml) -->
<resource name="jdbc/debate" auth="Container" type="javax.sql.DataSource">
<param name="username" value="myuser" />
<param name="password" value="mypassword" />
<param name="url" value="jdbc:cloudbees://cbdebate--1" />
<!-- Connection Pool settings -->
<param name="maxActive" value="20" />
<param name="maxIdle" value="2" />
<param name="maxWait" value="10000" />
<param name="validationQuery" value="SELECT …Run Code Online (Sandbox Code Playgroud) 我正在部署我的Play!2.1 Cloudbees上的应用.
我在我的application.conf中:
# Database configuration
# ~~~~~
db.default.driver=com.mysql.jdbc.Driver
db.default.url=${MYSQL_URL_DB}
db.default.user=${MYSQL_USERNAME_DB}
db.default.password=${MYSQL_PASSWORD_DB}
Run Code Online (Sandbox Code Playgroud)
我在Cloudbees配置中定义了这些值:
$ bees config:list -a myself/my-app
Application Parameters:
proxyBuffering=false
MYSQL_URL_DB=jdbc:cloudbees://my-app
MYSQL_USERNAME_DB=my-app
MYSQL_PASSWORD_DB=yummy
Runtime Parameters:
java_version=1.7
Run Code Online (Sandbox Code Playgroud)
我使用git(git push cloudbees cloudbees:master)发布我的应用程序,触发Jenkins.但是在部署应用程序时,我会进入Jenkins日志:
[error](compile:compile)com.typesafe.config.ConfigException $ UnresolvedSubstitution:conf/application.conf:16:无法解析替换为值:$ {MYSQL_PASSWORD_DB}
还有什么可以让Jenkins知道配置吗?我误解了什么吗?
谢谢你的帮助!
阿尔班
我正在尝试在cloudbees上部署我的项目但是我遇到了以下错误(以前它已经正常工作了.)
所以在发布之前我尝试了几种解决方案,但似乎没有任何效果.我在新旧日志的比较中观察到的唯一一件事就是plexus-classworlds的版本发生了变化.以前它是plexus-classworlds-2.4.jar现在被视为plexus-classworlds-2.5.1.jar.这可能是个问题吗?
错误日志如下:
$ /opt/jdk/jdk1.7.latest/bin/java -cp /scratch/jenkins/maven3-agent.jar:/opt/maven/latest/boot/plexus-classworlds-2.5.1.jar org.jvnet.hudson.maven3.agent.Maven3Main /opt/maven/latest /scratch/jenkins/slave.jar /scratch/jenkins/maven3-interceptor.jar 51979
<===[JENKINS REMOTING CAPACITY]===>channel started
log4j:WARN No appenders could be found for logger (org.apache.commons.beanutils.converters.BooleanConverter).
log4j:WARN Please initialize the log4j system properly.
Executing Maven: -B -f /scratch/jenkins/workspace/sampleProj/sample-admin/pom.xml clean install -Pdevci,allTests
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:330)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:238)
at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:158)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:100)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:66)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:326)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用CloudBees Folder插件和Jenkins远程API创建嵌套目录和作业,以镜像我的SVN存储库的结构。
对于子目录(假设我已将config.xml复制到我的CWD中):
wget --no-proxy --auth-no-challenge --http-user=username --ask-password --header="Content-Type: application/xml" --post-file="dconfig.xml" 'http://ci.mycompany.com/jenkins/createItem?name=foo'
Run Code Online (Sandbox Code Playgroud)
作品。命令完成后,我在仪表板的顶层有了一个新创建的“ foo”文件夹。但是,当我尝试:
wget --no-proxy --auth-no-challenge --http-user=username --ask-password --header="Content-Type: application/xml" --post-file="dconfig.xml" 'http://ci.mycompany.com/jenkins/createItem?name=foo/bar'
Run Code Online (Sandbox Code Playgroud)
我收到“错误400:错误的请求”。我也尝试用“ name = / foo / bar”,“ name =%2Ffoo%2Fbar”和“ name = foo%2Fbar”代替,所有结果相同。
同样,当使用createItem / from / mode / name API复制内部文件夹时,也会得到类似的结果:
wget --no-proxy --auth-no-challenge --http-user=username --ask-password --header="Content-Type: application/xml" --post-file="dconfig.xml" 'http://ci.mycompany.com/jenkins/createItem?name=foo/bar&mode=copy&from=foo'
Run Code Online (Sandbox Code Playgroud)
我发现这很不寻常,因为通过Web界面,我可以轻松移动,复制和创建嵌套的目录和作业。
我正在将Jenkins 1.569与CloudBees Folders 4.7插件一起使用。
据推测,Jenkins工作流输入步骤中指定的参数可用于消费和条件逻辑?我们如何获得这些价值观?例如,我们如何在下面的checkbox参数中获取和引用true或false值:
input id: 'Proceed1', message: 'Proceed or abort?', parameters: [[$class: 'BooleanParameterDefinition', defaultValue: false, description: '', name: 'Please confirm you agree with this']]
Run Code Online (Sandbox Code Playgroud) 我试图设置jenkins使用docker容器作为构建环境,但我无法让它启动容器.我建立了一个可以将cloudbees/java-build-tools图像作为测试开始的工作
构建日志:
Started by user Esa Varemo
Building in workspace /var/jenkins_home/jobs/Test/workspace
$ /var/jenkins_home/tools/org.jenkinsci.plugins.docker.commons.tools.DockerTool/1.7.1/bin/docker -H tcp://192.168.0.193:4243 inspect cloudbees/java-build-tools
[
{
"Id": "c5feab23f7a79204fc66a1576b4348fad4f1535c879be005084d5db190cc88da",
"Parent": "608dd3644f8b9b229e59f511b641b226818bdaf97dbc208d34110be6bb87f57e",
"Comment": "",
"Created": "2015-10-28T14:04:00.338346675Z",
"Container": "a4f3a773576c05f4a42d9fc96b1bc5514265b7d777985a7430d703fc4ceeb98f",
"ContainerConfig": {
"Hostname": "d7ae1572c5cc",
"Domainname": "",
"User": "jenkins",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"PortSpecs": null,
"ExposedPorts": {
"4444/tcp": {}
},
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"MAVEN_VERSION=3.3.3",
"MAVEN_HOME=/usr/share/maven",
"SCREEN_WIDTH=1360",
"SCREEN_HEIGHT=1020",
"SCREEN_DEPTH=24",
"DISPLAY=:99.0"
],
"Cmd": [
"/bin/sh",
"-c",
"#(nop) EXPOSE 4444/tcp"
],
"Image": "608dd3644f8b9b229e59f511b641b226818bdaf97dbc208d34110be6bb87f57e",
"Volumes": null, …Run Code Online (Sandbox Code Playgroud) 我想使用 admin 来管理 Jenkins 中的用户。我计划通过配置全局设置选项中基于角色的策略来完成此操作。但即使 Cloudbees 基于角色的访问控制插件安装在我的插件列表中,我也看不到该选项。有什么建议么?
注意:由于我处于无法访问互联网的环境中,因此重新安装插件并重试非常困难。
谢谢吉万
我的应用([URL])没有响应.我已经完成了您网站上的建议步骤.
我已将此战争部署到我当地的tc-server,一切都在那里工作(/ people-server/rest/persons /).我希望从[URL]/people-server/rest/persons /中获取一些xml.
请指教
Darren Leung
这份文件不是很有用:
https://developer.cloudbees.com/bin/view/DEV/Bitbucket
我有:
但是如何实际使用(私人)Bitbucket repo进行Jenkins Build.