Articles of jenkins

有没有办法改变一个Linux Jenkins服务器使用的Java JRE?

Jenkins服务器在Linux机器上运行在Java 1.7下,我需要将其更改为1.8,以便我可以运行特定的插件。 Linux机器安装了Java 1.8 JDK / JRE,但是我无法find告诉Jenkins服务器使用它的方法? 我在Windows服务器上find了关于如何做这件事的指南,但没有涉及到或转移到Linux Jenkins服务器上。 有没有办法改变在Linux上的Jenkins服务器使用的JRE? 就像这个linux版本: https : //dzone.com/articles/make-jenkins-windows-service

设置Github收到与私人Jenkins和私人回购的webhook

我试图build立一个私人的GitHub项目发送一个post-receive请求到一个私人的Jenkins实例来触发一个项目build立分支推。 使用最新的Jenkins和GitHub插件。 我相信我在Jenkins一方正确地设置了一切,因为当从一个公共服务器发送一个curl请求时: curl http://username:password@ipaddress:port/github-webhook/ 结果是: Stacktrace: net.sf.json.JSONException: null object 这很好,因为JSON有效负载丢失了。 在URI中发送错误的用户名和密码会导致: Exception: Failed to login as username 我把这个解释为一个正确的Jenkinsconfiguration。 这两个请求也会导致Jenkins日志中的条目。 但是,当从上面粘贴完全相同的URI到Github存储库Post-Receive URLs Service Hook中,并单击Test Hook时 ,我的服务器上绝对没有任何事情发生。 Jenkins日志和GitHub钩子在Jenkins项目中没有任何logging说Polling还没有运行。 我已经用尽了想法,不知道如何进一步发展。

自升级到Jenkins 1.502以来,远程UNIX从站上的“远程文件操作失败”

自升级到Jenkins 1.502以后,SSH启动的远程UNIX从服务器上使用git的任何作业都将失败 hudson.util.IOException2: remote file operation failed: /var/ciworkspaces/web/workspace/DFT.BA Live at hudson.remoting.Channel@14930f2a:web-pampas at hudson.FilePath.act(FilePath.java:861) at hudson.FilePath.act(FilePath.java:838) at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:956) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1123) at hudson.model.AbstractProject.checkout(AbstractProject.java:1342) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:683) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:588) at hudson.model.Run.execute(Run.java:1568) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:237) Caused by: java.io.IOException: Unable to serialize hudson.FilePath$FileCallableWrapper@3e2c693b at hudson.remoting.UserRequest.serialize(UserRequest.java:166) at hudson.remoting.UserRequest.<init>(UserRequest.java:62) at hudson.remoting.Channel.call(Channel.java:671) at hudson.FilePath.act(FilePath.java:854) … 11 more Caused by: […]

Jenkins的权限允许post-receive挂钩,但阻止匿名用户

我试图禁用匿名访问我们的Jenkins安装,但仍允许Codebase Git执行post-receive钩子发布到Jenkins,以允许它触发构build。 我们使用基于Matrix的安全性,并且只允许匿名用户使用以下权限: 总体>阅读 工作>阅读 工作>build立 这些都是我必须激活,以便获得Codebase发布的URL,否则我从Jenkins获得访问被拒绝的错误,问题是,它允许匿名用户浏览我们的项目? 有没有办法来掩盖这一点? 我认为jenkins需要“ 整体”>“读取”访问权限以允许“ 作业”>“构build”权限工作是非常愚蠢的。

让jenkins在apache2后面使用没有8080端口的子域

我没有redirect我的jenkins使用我的子域( build.core-network.us ),并不要求:8080端口拍在它后面。 我在Debian Wheezy上。 我使用Apache( proxy和proxy_http安装),这是我的/etc/apache2/sites-available/build.core-network.us文件: <VirtualHost *:80> ServerName build.core-network.us:80 ServerAlias www.build.core-network.us ServerAdmin [email protected] ProxyPass / http://localhost:8080/ ProxyPassReverse / http://localhost:8080/ ProxyRequests Off <Proxy http://localhost:8080/*> Order deny,allow Allow from all </Proxy> </VirtualHost> 我确定/etc/default/jenkins将–httpListenAddress=127.0.0.1 –httpPort=8080作为JENKINS_ARGS 当然build.core-network.us有正确的DNS条目(当我添加:8080端口时,它工作正常)。 我发现了4个其他类似的post,有4个不同的VirtualHostbuild议,要么他们不适合我,要么我没有正确使用它们。 更新1:我在error.log发现错误: [Fri Sep 26 17:33:59 2014] [notice] SIGUSR1 received. Doing graceful restart [Fri Sep 26 17:33:59 2014] [notice] Apache/2.2.22 […]

jenkinsgithub拉请求build设者选错了提交

我正在使用插件的GitHub拉请求生成器jenkins。 然后,我build立了从GitHub的webhooks,当一个新的合并请求打开或提交时触发jenkins中的构build。 我用Jenkins DSLconfiguration了GHPRB插件: job("name") { properties { githubProjectUrl("https://github.com/org/${repo}") } scm { git { remote { name("origin") url("[email protected]:org/${repo}.git") credentials("jenkins-ssh-keyid") } branch("**") extensions { gitTagMessageExtension() } } } triggers { githubPullRequest{ admins(["github-username"]) orgWhitelist('org-name') cron("") triggerPhrase("build") extensions { commitStatus { context("unittest") } } useGitHubHooks() } } steps { shell("./run-unittests"); } } 我遇到的问题是Jenkins有时候会感到困惑,并select错误的提交方式来构build。 当发生这种情况时,jenkins输出如下所示: GitHub pull request #9 […]

自升级到Git客户端插件2.1.0以来,Jenkins无法读取Github密码

我目前在Windows 2012上使用Jenkins 1.650,并将Jenkins的testing实例(从我的生产服务器克隆)升级到2.25。 作为其中的一部分,Git客户端插件从1.19.6升级到2.1.0,现在无法进行身份validation。 如果我再次降级这个插件,我的工作就完美了,但是使用升级后的插件运行时,作业会失败。 所有的错误输出都是一样的: 08:18:40 Cloning the remote Git repository 08:18:40 Cloning repository https://github.com/mycompany/myrepo.git 08:18:40 > C:\Program Files\Git\cmd\git.exe init C:\Program Files (x86)\Jenkins\workspace\project # timeout=10 08:18:40 Fetching upstream changes from https://github.com/mycompany/myrepo.git 08:18:40 > C:\Program Files\Git\cmd\git.exe –version # timeout=10 08:18:40 using GIT_ASKPASS to set credentials 08:18:40 > C:\Program Files\Git\cmd\git.exe fetch –tags –progress https://github.com/mycompany/myrepo.git +refs/heads/*:refs/remotes/origin/* 08:18:41 […]

更改独立的Jenkins默认URL

运行Jenkins standalone(WAR文件, java -war ./jenkins.war或任何命令)在非标准端口上侦听。 我想让NGINX代理我们的HTTPS网站/ jenkins /这个独立的。 location /jenkins/ { proxy_pass http://axolotl.ecogeek.local:10112/; } 问题是,jenkins仍然是在根URL的东西,所以所有的请求都是相对的,所以当访问/jenkins/它redirect到/login但它需要去/jenkins/login ,有什么办法,通过jenkins或通过NGINX,改变根url,让它发挥不错? 编辑 连接到jenkins这是正常的端口我可以去pipe理jenkins – >configuration系统 – >jenkinsurl和改变,修复redirect,但所有的媒体正在请求/静态/(已尝试重新启动jenkins)

用Puppet安装Jenkins无法导入GPG密钥

我试图用下面的清单来安装Jenkins和Puppet。 # init.pp class jenkins { include jenkins::install, jenkins::service } # service.pp class jenkins::service { service { "jenkins": ensure => running, hasstatus => true, hasrestart => true, enable => true, require => Class["jenkins::install"], } } # install.pp class jenkins::install { include jenkins::install::repo include jenkins::install::java package { "jenkins": ensure => present, require => Class['jenkins::install::repo','jenkins::install::java'], } } […]

在jenkins中执行RSYNC命令

大家好,所以我想部署我的代码到远程服务器..到目前为止我已经尝试过 通过SSH插件发布:但问题是,我无法保持文件的权限 Rsync命令女巫我认为是更好的文件权限的原因,唯一的问题是,我不知道如何设置它的密码自动工作 这是我得到的 [JenkinsBuild] $ /bin/sh -xe /var/lib/jenkins/tmp/hudson4646064064846581974.sh + rsync -PSauve ssh –exclude=JenkinsBuild app bower.json config gruntfile.js karma.conf.js LICENSE.md Makefile node_modules package.json Procfile protractor.conf.js public README README.md server.js [email protected]:/srv/dp/prod Host key verification failed. rsync: connection unexpectedly closed (0 bytes received so far) [sender] rsync error: unexplained error (code 255) at io.c(600) [sender=3.0.6] 任何想法我在这里做错了吗?