Re: Most reliable way to get the build number of the build just executed using JS/jQuery

2016-07-28 Thread Markus Winter
If you have control over the jobs and job triggering, you could add a parameter to the job that contains a UUID. You can then obtain the uuid of the builds easily and identify the builds. Or write your own plugin that adds the UUID as build action on execution. Something like the Job Run UUID

Re: adding windows slave node through groovy script

2016-07-30 Thread Markus Winter
You have to use a system groovy script so you run in the JVM of the master. By running a plain groovy script you run in a separate JVM. No chance to add a slave this way. Regards Markus On 31.07.2016 00:08, Sumit Anurag wrote: hello, I am using groovy script to add window slave node as

Re: Jenkins windows service restarting by itself

2016-07-11 Thread Markus Winter
Hi, What we experienced is that the connection got lost between JNLP connected windows slaves and master on Linux under high load. With windows 50 slaves, builds running for 2 to 3 hours and on average between 1 and 2 slaves loosing connection per day this really hurts. After connecting

Re: Strange behaviour of Queue object

2017-02-04 Thread Markus Winter
yes it is a permission problem. I had security disabled on my local PC, while it was enabled in the VM. Problem solved On 05.02.2017 03:07, Markus Winter wrote: Hi, Actually, I create a job that sleeps for 30 seconds without concurrent execution and start it. Once running it start it again

Strange behaviour of Queue object

2017-02-04 Thread Markus Winter
Hi, I encounter a strange behaviour of the Queue object. The following code is a simple POC for the problem I have. import java.io.IOException; import java.util.List; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.logging.Logger; import

Re: Strange behaviour of Queue object

2017-02-04 Thread Markus Winter
the queue. Then it may easily have 0. BR, Oleg воскресенье, 5 февраля 2017 г., 1:19:24 UTC+1 пользователь Markus Winter написал: Hi, I encounter a strange behaviour of the Queue object. The following code is a simple POC for the problem I have. import java.io.IOException

Re: Error while updating Jenkins job config using Rest API

2016-12-20 Thread Markus Winter
Do you have cross site request forgery protection enabled? If yes you need to read a crumb first and include it in your request in the header. On 20.12.2016 13:40, Kruti Vyas wrote: I am trying to change the configuration of a job using Jenkins' rest api using my java code but my code is

Re: */api/json fails for a new Jenkins plugin

2017-08-10 Thread Markus Winter
you need a method getApi() that returns an Api [1] public Api getApi() { return new Api(this); } [1] http://javadoc.jenkins.io/hudson/model/Api.html On 10.08.2017 21:28, Daniel Mercier wrote: Hi everyone, I created a new Jenkins plugin and while everything seems to work. The

Re: Help with blocking job execution per node

2017-07-20 Thread Markus Winter
Another thing to consider: Someone might have configured 2 agents on the same machine. You could also make the wrapper block and wait until the other job is finished if the daemon is already running. Maybe combine with the proposal from Stephen. Another question, is this daemon specific to

Re: ConsoleLogFilter not working for builds on slaves

2018-01-19 Thread Markus Winter
Why is ConsoleLogFilter not supported in pipeline. Timestamper plugin is also using a ConsoleLogFilter to add the timestamps in pipeline (https://github.com/jenkinsci/timestamper-plugin/blob/master/src/main/java/hudson/plugins/timestamper/pipeline/TimestamperStep.java) Sure it has the

Re: FormValidation: Check for unique values between fields of repeatableProperty

2018-02-19 Thread Markus Winter
You could write some javascript to achieve this. I once did this though the repeatable property didn't have an own jelly file. I'm no javascript expert though there might be a better way to get the elements. The risk would be if there are other elements that have the same name, then you could

Re: Looking for details on Job, Node, and Computer

2018-04-16 Thread Markus Winter
I found the best way to understand is reading the javadoc and sometimes also looking into the code of Jenkins itself. On 15.04.2018 22:04, Joe Fair wrote: I'm working on changing a plugin to use pipeline syntax, but I'm not finding much detail around agent, node, and computer. Is there a

Re: Alternative directory implementation of ArtifactManager?

2018-11-30 Thread Markus Winter
Implementation is quite easy I would say. You need an ArtifactManager (look at the StandardArtifactManager, you can probably just copy and replace the getArtifactsDir() method) And an ArtifactManagerFactory where you can configure the root path for the artifacts On 30.11.2018 10:40, Staffan

Re: How to create projectAction

2019-05-15 Thread Markus Winter
Create your own TransientActionFactory to inject the action to all projects. On 15.05.2019 16:05, selva vignesh wrote: Hi All,   I have create Build Level Action and its successfully working. I want to create Project Level Action so that i have created ProjectAction and done what ever i want.

Re: [JENKINS 57012] Need help to get current ItemGroup in configuration

2019-05-24 Thread Markus Winter
Hi, I think you will need to extend your JiraFolderProperty. In the setSites methods you could call a method setOwner(folderprop.getOwner()) on JiraSite to inject the folder. Regards Markus On 24.05.2019 11:42, Mathieu Delrocq wrote: Hello, I want to add the possibility to configure a folder

Re: reading and writing from master to slave

2019-10-30 Thread Markus Winter
It makes only sense when the step following the shell step is running in the same node block. Once the node block is exited there is no guarantuee that the file in the workspace is still available (think of agents provided from a cloud that get destroyed directly after the node block finished, or

Re: Check if agent is running as a service

2019-12-05 Thread Markus Winter
as you said you write a plugin you could just check what kind of launcher is configured for the agent within your Java code Anyway it would help to understand why you need to know if it is running as Windows Service. A couple of years ago we made the experience that running Windows agents via

Aw: Plugin dev: how to replace environment variable's value before a build starts?

2020-03-04 Thread Markus Winter
The envinject plugin allows to configure groovy scripts that set environment variables.So why write another plugin?-- Diese Nachricht wurde von meinem Android Mobiltelefon mit GMX Mail gesendet.Am 04.03.20, 17:08 schrieb Orekaria N : Hello I

Re: Retrieve User permission to trigger Jenkins Project

2020-05-23 Thread Markus Winter
Just try to do a HEAD request on the project with the users credentials. If the user has access you should get a 200 return code. On 22.05.2020 14:28, varun vikas wrote: Hi, I want to check , if user has access rights to trigger Jenkins project before sending trigger request. is there any

Re: Remote access API

2020-05-23 Thread Markus Winter
I doubt that using the REST api is faster. Under the hood the getBuilds method is also called. But additionally you have to convert the result to XML, transfer the xml and read it back in. It is not possible to get the password of any user. That would be a big security issue if this would be

Re: Retrieve User permission to trigger Jenkins Project

2020-05-23 Thread Markus Winter
API call. Is it possible to get permission status of another user by making rest call through a single generic user which credential is known to me. Thanks, Varun On Sat, 23 May 2020, 16:30 Markus Winter, mailto:m_win...@gmx.de>> wrote: Just try to do a HEAD request on the p

Re: Retrieve User permission to trigger Jenkins Project

2020-05-23 Thread Markus Winter
want to get it triggered by only those users who have proper permission. I have one link ,but read permission API is not given in this link. https://support.cloudbees.com/hc/en-us/articles/11578091-How-do-I-use-RBAC-REST-API- Thanks & Regards, Varun On Sat, 23 May 2020, 16:57 Markus Wi

Re: Terminology Updates

2020-06-15 Thread Markus Winter
I think currently we use the term master for 2 different things. First we have Jenkins orchestrating the builds, here the term controller probably fits best but also server seems to fit for me Second the server is also just plain agent (more or less). For this we could use the term "main"  as the

Re: External logs storage for Pipeline/FreeStyle jobs

2021-05-15 Thread Markus Winter
The logstash plugin can forward logs to for both pipeline and freestyle to elastic search and others. But it doesn't support to read the logs from there to display in Jenkins, what it forwards is rather heavy weight and for pipeline jobs not the complete output is transferred (all the output from

Re: Jenkins on SQLite

2022-04-03 Thread Markus Winter
I like the idea. Questions: Is SQlite the best choice as it is platform dependent? Anyone that runs Jenkins not on one of the supported platforms would not benefit. So is H2 maybe the better choice (also from concurrency aspect)? plugin compatibility, can we be sure all plugins still work

Re: Something is killing my launcher after 90-100 seconds

2022-01-22 Thread Markus Winter
to set a timeout of 5 minutes in plain JUnit you can do @Test(timeout = 1000 * 300)  //in milliseconds When you have a JenkinsRule, the you need to use @WithTimeout(300)  // in seconds Am 22.01.2022 um 15:26 schrieb Ivan Fernandez Calvo: finally, I found my ghost, it is not related to the