Jenkins

Jenkins stapler requests fail with no valid crumb

两盒软妹~` 提交于 2021-02-07 14:42:05
问题 I'm working on a Jenkins plugin and I'm now stuck at a point where I'm trying to get the return value of a method using a JavaScript proxy as described here. I simply want to call this kotlin method: @JavaScriptMethod fun getMonitoredJobsAsJSON(): JSONArray = toJSON(getObjectMapper().writeValueAsString(getMonitoredJobs())) as JSONArray From the jelly script using this: <script> var board = <st:bind value="${it}"/> board.getMonitoredJobsAsJSON(function(data) { // }) </script> This actually

Setting environment variables in Jenkins with a bat file?

浪子不回头ぞ 提交于 2021-02-07 14:20:55
问题 Currently I have a batch file that sets all the environment variables needed before starting the build process. It's a must to use the same bat for setting the env variables. I tried to use EnvInject Plugin, didn't have any success. Also tried "Execute Windows batch command" before running msbuild. e.g. start mybat.bat - this didn't seem to work either How can I integrate the same bat file to set the variables? 回答1: Each Jenkins "build step" has it's own environment, I explained this in

Jenkins re-run setup wizard

妖精的绣舞 提交于 2021-02-07 14:17:00
问题 Just installed latest Jenkins on Windows server. Changed it to run as a service and my login no longer works. No problems, disable security for now. But found out all my plug-ins are missing. How can I have it rerun the setup wizard? 回答1: As seen in issue 310, you need on the server side to remove: /usr/share/jenkins/ref/jenkins.install.UpgradeWizard.state /usr/share/jenkins/ref/jenkins.install.InstallUtil.lastExecVersion (Search those files on your Windows Jenkins installation folder, to

Automatically setup jenkins users with CLI

社会主义新天地 提交于 2021-02-07 12:27:20
问题 I did not find any reference to user related commands for the jenkins-cli tool. I need this to automate deployment. Any comeback? 回答1: Maybe you don't want to use Jenkins' internal user database at all. There are a host of "Authentication and User Management" plugins. If you like MySQL, there is a MySQL authenticator (it reads a table of users and passwords), and your "adduser" command could do an insert on that table. If you like flat files, there is a "Script Security Realm", where you can

Java memory leak, only Jenkins running, Jenkins .war analysis shows nothing strange

元气小坏坏 提交于 2021-02-07 11:16:34
问题 I'm currently running Jenkins on a mac mini with Xmx2048m set and a permgen space of 512, I have the 'Monitoring' plugin running and it shows Jenkins using ~200M memory (spiking at 400 during archives). This number is slowly creeping up as you can see below. http://i.imgur.com/vTuIyTz.png When I look at the java process using 'top' on the mac mini it is showing the memory at about 685M. This number creeps up quicker and, eventually, hits 2048 and Jenkins bombs out. http://i.imgur.com/TojBjhI

Java memory leak, only Jenkins running, Jenkins .war analysis shows nothing strange

喜欢而已 提交于 2021-02-07 11:14:39
问题 I'm currently running Jenkins on a mac mini with Xmx2048m set and a permgen space of 512, I have the 'Monitoring' plugin running and it shows Jenkins using ~200M memory (spiking at 400 during archives). This number is slowly creeping up as you can see below. http://i.imgur.com/vTuIyTz.png When I look at the java process using 'top' on the mac mini it is showing the memory at about 685M. This number creeps up quicker and, eventually, hits 2048 and Jenkins bombs out. http://i.imgur.com/TojBjhI

Java memory leak, only Jenkins running, Jenkins .war analysis shows nothing strange

吃可爱长大的小学妹 提交于 2021-02-07 11:14:33
问题 I'm currently running Jenkins on a mac mini with Xmx2048m set and a permgen space of 512, I have the 'Monitoring' plugin running and it shows Jenkins using ~200M memory (spiking at 400 during archives). This number is slowly creeping up as you can see below. http://i.imgur.com/vTuIyTz.png When I look at the java process using 'top' on the mac mini it is showing the memory at about 685M. This number creeps up quicker and, eventually, hits 2048 and Jenkins bombs out. http://i.imgur.com/TojBjhI

Java memory leak, only Jenkins running, Jenkins .war analysis shows nothing strange

梦想的初衷 提交于 2021-02-07 11:13:53
问题 I'm currently running Jenkins on a mac mini with Xmx2048m set and a permgen space of 512, I have the 'Monitoring' plugin running and it shows Jenkins using ~200M memory (spiking at 400 during archives). This number is slowly creeping up as you can see below. http://i.imgur.com/vTuIyTz.png When I look at the java process using 'top' on the mac mini it is showing the memory at about 685M. This number creeps up quicker and, eventually, hits 2048 and Jenkins bombs out. http://i.imgur.com/TojBjhI

Can I use git command in delivery pipeline if git is installed in different path on jenkins agent than on master

◇◆丶佛笑我妖孽 提交于 2021-02-07 10:20:31
问题 I have the following scenario. I tried a simple pipeline job that clones my remote repo. It works fine when i set it to execute on master. node { //stage 'Checkout' git([url: 'ssh://someusername@gerrit.mycompany.domain:29418/bla/bla.git', branch: 'mybranch']) } It uses the default git installation to run the command. I have configured git on a different pat for slave in jenkins configuration. when i try to run the same pipeline on a slave, it fails because it always tries to go the default

Can I use git command in delivery pipeline if git is installed in different path on jenkins agent than on master

梦想与她 提交于 2021-02-07 10:20:10
问题 I have the following scenario. I tried a simple pipeline job that clones my remote repo. It works fine when i set it to execute on master. node { //stage 'Checkout' git([url: 'ssh://someusername@gerrit.mycompany.domain:29418/bla/bla.git', branch: 'mybranch']) } It uses the default git installation to run the command. I have configured git on a different pat for slave in jenkins configuration. when i try to run the same pipeline on a slave, it fails because it always tries to go the default