RE: Subversion Plugin - version in workspace?

2021-09-21 Thread Reinhold Füreder
Hi Rick,

Yes, this is configurable, e.g. via JCasC:
  subversionSCM:
workspaceFormat: 31

Or in manual work-of-art in global settings: configure system > Subversion > 
Subversion Workspace Format

HTH Reinhold

From: jenkinsci-users@googlegroups.com  On 
Behalf Of Richard Frank
Sent: Sonntag, 19. September 2021 20:35
To: Jenkins Users 
Subject: Subversion Plugin - version in workspace?

What determines what version of the svn workspace is checked out on the local 
drive?

When I use Tortoise SVN, I get (.svn/format) 12.

When I use a fresh install of the Subversion Plugin, I get version 8.

Is this configurable? I need to use the tortoise command line tools and it 
things version 8
is too old.

Thanks

Rick

--
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/5c0c9d16-044e-4c77-b841-73d9d19e3671n%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/VI1PR01MB66381888A1BFFE47CA580F9FF7A19%40VI1PR01MB6638.eurprd01.prod.exchangelabs.com.


RE: LTS 2.303.1 and JCasC / RBAC - startup failure

2021-08-26 Thread Reinhold Füreder
Just for the sake of slightly more details:

  *   Without RBAC, but exact these versions of LDAP and JCasC (and actually 
many many more plugins) this works fine with 2.303.1

Cheers,
Reinhold

From: jenkinsci-users@googlegroups.com  On 
Behalf Of Alan Sparks
Sent: Mittwoch, 25. August 2021 22:11
To: Jenkins Users 
Subject: LTS 2.303.1 and JCasC / RBAC - startup failure

I’ve been using JCasC to configure Jenkins LTS and the role-based auth plugin 
for a long time, and today I tested starting a new server running LTS 2.303.1.  
 All else remaining the same (Java version, plugin versions), 2.289.3 starts 
fine, but 2.303.1 crashes on startup in the JCasC configuration.

I bundle the plugins for JCasC, RBAC, LDAP in the deployment:

ldap 2.7
rbac 3.2.0
jcasc 1.5.2
Java – OpenJDK Runtime Environment (build 
1.8.0_292-8u292-b10-0ubuntu1~18.04-b10)

Does this have anything to do with the unbundling of the LDAP plugin?   If so, 
how to I add this to the initial deployment, other than putting the .hpi file 
in the Jenkins/plugins directory?

I ran a test where I started a new deployment of 2.303.1, with my JCasC 
configuration of LDAP and RBAC.  It failed as below.  But a test where I 
launched with 2.298.3, and then upgraded to 2.303.1 worked with the same 
configuration file.

How are we supposed to do this, how to compensate for the unbundled plugins?


java.lang.IllegalStateException: Cannot resolve permission for ID: View/Create
at 
org.jenkinsci.plugins.rolestrategy.casc.RoleDefinition.getRole(RoleDefinition.java:52)
at 
org.jenkinsci.plugins.rolestrategy.casc.RoleDefinition.(RoleDefinition.java:41)
Caused: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at 
io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator.tryConstructor(DataBoundConfigurator.java:173)
Caused: io.jenkins.plugins.casc.ConfiguratorException: roleDefinition: Failed 
to construct instance of class 
org.jenkinsci.plugins.rolestrategy.casc.RoleDefinition.
Constructor: public 
org.jenkinsci.plugins.rolestrategy.casc.RoleDefinition(java.lang.String,java.lang.String,java.lang.String,java.util.Collection,java.util.Collection).
Arguments: [java.lang.String, null, java.lang.String, java.util.ArrayList, 
java.util.ArrayList].
Expected Parameters: name java.lang.String, description java.lang.String, 
pattern java.lang.String, permissions java.util.Collection, 
assignments java.util.Collection


--
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/DM6PR18MB3306E6C1E3ABA12A5E4732BCC5C69%40DM6PR18MB3306.namprd18.prod.outlook.com.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/VI1PR01MB66381255931839331B90AA97F7C79%40VI1PR01MB6638.eurprd01.prod.exchangelabs.com.


RE: Console logs of parallel stages

2021-07-06 Thread Reinhold Füreder
Please have a look at it in BlueOcean UI

HTH Reinhold

From: jenkinsci-users@googlegroups.com  On 
Behalf Of Jenkinsuser
Sent: Montag, 5. Juli 2021 16:29
To: Jenkins Users 
Subject: Console logs of parallel stages


Hello,
I Hope you are doing well.

 I am facing some difficulties related to parallel stage console logs.

If we run parallel stages in jenkins then in console output we are getting miss 
ordered logs for all parallel stages.

Please refer to the attached document.



  some logs of stage1 will print after stage2 and some after stage3 but I want 
all logs of stage 1 to print one by  one in the same place.


 Is there any way that we get logs of each stage one by one not in distributed 
form?

Any help will be appreciated
 Thanks in advance.
--
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/8a5bbfa2-95b0-43fe-91e3-d33e39ad9d1dn%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/VI1PR01MB6638F723F08DCEC0FAE3E1F8F71B9%40VI1PR01MB6638.eurprd01.prod.exchangelabs.com.


RE: Using withEnv with withCredentials

2021-03-09 Thread Reinhold Füreder
Sorry, Björn, but I think I didn’t get it:

  *   Is your suggestion to use?
 *   
withEnv([“http_proxy=https://${PROXY_CREDENTIALS}@proxy-endpoint.com:3128”]) {
  *   But isn’t that what kelvSYC also tried and “gets flagged as unsafe by 
Jenkins”
 *   
withCredentials([usernameColonPassword(credentialsId:’proxy-credentials’, 
variable: ‘PROXY_CREDENTIALS')]) {
def url = 
“https://${env.PROXY_CREDENTIALS}@proxy-endpoint.com:3128”
withEnv([“http_proxy=${url}”]) {

I think the (ugly) workaround would be (1) to not use “withEnv” step and (2) 
assemble the “http_proxy” env variable (=> shell variable) only later in the 
shell? Something like:

http_proxy=https://${env.PROXY_CREDENTIALS}@proxy-endpoint.com:3128
 

☹

Cu Reinhold


From: 'Björn Pedersen' via Jenkins Users 
Sent: Dienstag, 9. März 2021 08:10
To: Jenkins Users 
Subject: Re: Using withEnv with withCredentials

Used : 
withEnv([‘http_proxy=https://${PROXY_CREDENTIALS}@proxy-endpoint.com:3128']) {

Note the single quotes, this needs to be double-quoted for the replacement to 
happen.

Björn


kelvSYC schrieb am Montag, 8. März 2021 um 22:29:00 UTC+1:
Suppose I have a username and password credential that I use with a 
withCredentials step, and I wish to use it to construct a URL for use with the 
http_proxy environment variable. Currently I have this:

withCredentials([usernameColonPassword(credentialsId:’proxy-credentials’, 
variable: ‘PROXY_CREDENTIALS')]) {
def url = 
“https://${env.PROXY_CREDENTIALS}@proxy-endpoint.com:3128”
withEnv([“http_proxy=${url}”]) {
// Do something
}
}

This gets flagged as unsafe by Jenkins (likely rightly), so I’m wondering what 
safe way there is to do the same thing.

Something like the following doesn’t work for me:

withCredentials([usernameColonPassword(credentialsId:’proxy-credentials’, 
variable: ‘PROXY_CREDENTIALS')]) {
withEnv([‘http_proxy=https://${PROXY_CREDENTIALS}@proxy-endpoint.com:3128']) {
// Do something
}
}

All it does is that the http_proxy variable is populated with the literal 
${PROXY_CREDENTIALS} string instead of the value therein.

Any assistance in this would be appreciated.
--
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/2e09f1ff-d7d7-4ba3-a84d-2455dfe1d5acn%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/VI1PR01MB66388D2B93134A56C68D6331F7929%40VI1PR01MB6638.eurprd01.prod.exchangelabs.com.


RE: [JCasC] job parameters lost when re-starting docker container / reloading existing configuration

2021-02-18 Thread Reinhold Füreder
Hi Danny et al,

I think, I just stumbled over the same problem:

  *   parameterized pipeline + Jenkins Docker container restart + JCasC + 
JobDSL (that is re-generating the parameterized scripted pipeline – pipeline 
from SCM -- during Jenkins startup via 
“j.j.plugin.JenkinsJobManagement#createOrUpdateConfig: createOrUpdateConfig for 
...”)
 *   Problem is (again and again) the first run of pipeline after Jenkins 
Docker container restart
*   Note: I think I am OK with the (missing parameterization) problem 
in any very first pipeline run ever, or after changing the pipeline 
parameterization
*   => JCasC or JobDSL might need to address this issue, I guess/think?
 *   I personally think that these open Jenkins bugs/issues are not 
necessarily correctly specified, or let’s say they or their title might be too 
generic?
*   https://issues.jenkins-ci.org/browse/JENKINS-41929 “Offer "Build 
with Parameters" on first build when declarative Jenkinsfile found”
   *   => No, my problem is also for scripted
*   https://issues.jenkins.io/browse/JENKINS-43758 “Parameters 
disappear from pipeline job after running the job”
   *   => No, normally parameters stay; it is only gone after Jenkins 
Docker container restart
   *   Actually the comment by Falko Modler in 
https://issues.jenkins.io/browse/JENKINS-43758?focusedCommentId=380158=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-380158
 describes it perfectly, I think!


One possible workaround – that might be OK if there are very few affected 
parameterized pipelines, or the parameterization is fairly stable, or there are 
just very few different paramaterizations – seems to be duplicating the 
parameterization into the JobDSL specification of the pipeline, for example:


  *   In the pipeline code:

properties([
parameters([
string(name: 'targetHost', defaultValue: 'my.host.com', description: 
'IP/Hostname of target server', trim: true)
])
])


  *   In the JobDSL code:

pipelineJob(" My pipeline JobName") {
  // Workaround for 
https://issues.jenkins.io/browse/JENKINS-43758?focusedCommentId=380158=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-380158
  parameters {
stringParam('targetHost', 'my.host.com', 'IP/Hostname of target server')
  }
  definition {
cpsScm {
  ...


Are there any updates on this problem?
Or are there open Jenkins (plugin) issues that really address this problem? Or 
should we file a new one specific for this problem? (If so, I am not even sure 
for which Jenkins plugin, to be perfectly honest.)
Or is there a better workaround?

Thanks,
   Reinhold


From: jenkinsci-users@googlegroups.com  On 
Behalf Of Danny Trunk
Sent: Freitag, 16. Oktober 2020 18:43
To: jenkinsci-users@googlegroups.com
Subject: [JCasC] job parameters lost when re-starting docker container / 
reloading existing configuration

Hello everyone,

I've set up a container with jenkins.yaml file in $JENKINS_HOME which is 
loading a parameterized pipeline job:

jobs:
  - script: >
  pipelineJob('lineage') {
definition {
  cpsScm {
scriptPath 'Jenkinsfile'
scm {
  git {
configure { git ->
  git / 'extensions' / 
'hudson.plugins.git.extensions.impl.SparseCheckoutPaths' / 
'sparseCheckoutPaths' {
'hudson.plugins.git.extensions.impl.SparseCheckoutPath' {
  path('Jenkinsfile')
}
  }
}
extensions {}
remote {
  url 'https://github.com/dtrunk90/jenkins-lineage-docker.git'
}
  }
}
  }
}
  }

In order to retrieve the parameters defined in the Jenkinsfile it needs to be 
initially run.
There's a known issue which described that behaviour: 
https://issues.jenkins-ci.org/browse/JENKINS-41929

But now, everytime i restart the container or reload existing configuration 
through UI parameters are gone again and my workaround to abort the first build 
doesn't work anymore because it checks for the build number 1:

script {
   if ('1'.equals(env.BUILD_NUMBER) && 
currentBuild.getBuildCauses('hudson.model.Cause$UserIdCause') != null) {
  currentBuild.displayName = 'Parameter loading'
  currentBuild.description = 'Please restart 
pipeline'
  currentBuild.result = 'ABORTED'

  error 'Stopping initial manually triggered build 
as we only want to get the parameters'
   }
}

Any ideas on how I can extend my workaround or better how to avoid removing 
existing job parameters when reloading existing configuration?
I don't know if this can be considered a bug or an enhancement request for 
JCasC to not remove those job parameters.
Any 

RE: jiraComment pipeline step throwing groovy.lang.MissingMethodException

2021-01-13 Thread Reinhold Füreder
Hi Stefan,

I am really sorry for my bad naïve guess:

  *   Actually your call should really work, or at least it worked for me (even 
if I have neither JIRA, nor a Jenkins JIRA configuration), thus at least the 
pipeline code seems OK.
  *   (Admittedly rather sadly is that under this conditions -- missing JIRA 
and Jenkins JIRA configuration -- I would expect the pipeline to fail, but it 
did not; and there was not even an error log!)

Please note that I used the example from “COMPATIBILITY.md”:
jiraComment(issueKey: "EX-111", body: "Job '${env.JOB_NAME}' 
(${env.BUILD_NUMBER}) builded. Please go to ${env.BUILD_URL}.")
… as well as your call as-is…

Maybe Arnauds hint points into the right direction: are the JIRA plugin and all 
its (transitive) dependencies installed correctly?

HTH Reinhold


From: jenkinsci-users@googlegroups.com  On 
Behalf Of ST
Sent: Mittwoch, 13. Jänner 2021 22:39
To: Jenkins Users 
Subject: Re: jiraComment pipeline step throwing 
groovy.lang.MissingMethodException

Hi Reinhold,

Thanks for your suggestion! I just tried to use non-named arguments:
jiraComment('FREF-363', 'My super jira comment')
But that did not work either, it threw this exception:

[Pipeline] End of Pipeline
java.lang.IllegalArgumentException: Expected named arguments but got [FREF-363, 
My super jira comment]
at org.jenkinsci.plugins.workflow.cps.DSL.parseArgs(DSL.java:708)
at org.jenkinsci.plugins.workflow.cps.DSL.parseArgs(DSL.java:640)
at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:234)
at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:193)
at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:122)
at jdk.internal.reflect.GeneratedMethodAccessor264.invoke(Unknown Source)
at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1213)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022)
at 
org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:42)
at 
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at 
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:163)
at 
org.kohsuke.groovy.sandbox.GroovyInterceptor.onMethodCall(GroovyInterceptor.java:23)
at 
org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:157)
at 
org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:142)
at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:161)
at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:165)
at 
com.cloudbees.groovy.cps.sandbox.SandboxInvoker.methodCall(SandboxInvoker.java:17)
at WorkflowScript.notifyIssueTrackerIfApplicable(WorkflowScript:239)
at WorkflowScript.run(WorkflowScript:62)
at ___cps.transform___(Native Method)
[...]

On Tue, Jan 12, 2021 at 4:14 PM Reinhold Füreder 
mailto:r.fuere...@xortex.com>> wrote:
Hello Stefan,

I think the documentation of the plugin is slightly outdated (or maybe only 
“COMPATIBILITY.md”):

  *   
https://www.jenkins.io/doc/pipeline/steps/jira/#jiracomment-jira-add-a-comment-to-issues
  *   
https://github.com/jenkinsci/jira-plugin/blob/1dacc167a9b21fc4d9256866a5f67ef741af7805/src/main/java/hudson/plugins/jira/pipeline/CommentStep.java#L30


  *   I think this should work:
jiraComment('FREF-363', 'My super jira comment')

HTH Reinhold

P.S.: Not sure if “COMPATIBILITY.md” is supposed to be the pipeline step 
documentation. If so, you may want to make a little PR with the updated usage?


From: jenkinsci-users@googlegroups.com<mailto:jenkinsci-users@googlegroups.com> 
mailto:jenkinsci-users@googlegroups.com>> On 
Behalf Of ST
Sent: Montag, 4. Jänner 2021 22:17
To: Jenkins Users 
mailto:jenkinsci-users@googlegroups.com>>
Subject: Re: jiraComment pipeline step throwing 
groovy.lang.MissingMethodException

Yes, we have installed latest version of jira plugin 3.1.3. Also I am 
successfully calling jiraSearch() method from the same plugin a few lines above 
in the same scripted pipeline.

FYI Here is the documentation of the Pipeline API of the jira plugin: 
https://github.com/jenkinsci/jira-plugin/blob/master/COMPATIBILITY.md

For the reference here is the exception again from my first email that I'm 
getting - any other ideas what could be the reason for getting this groovy 
exception?
Caught exception (exception: 'groovy.lang.MissingMethodException: No signature 
of method: java.lang.String.call() is applicable for argument types: 
(java.util.LinkedHashMap) values: [[iss

RE: how to avoid cps error using XmlSlurper() method in jenkins pipeline

2021-01-13 Thread Reinhold Füreder
Hi jfernandez,

Naïve guess(es):

  *   Are you maybe missing this:
import com.cloudbees.groovy.cps.NonCPS

 *   though not sure if the annotation would/should not then lead to an 
error instead already?
  *   Or is this a declarative pipeline and you are missing the script { … } 
step based wrapping of calling your findCommitter() method (assuming that 
calling it when being declared in the declarative pipeline is even allowed like 
this)?
steps {
  script {
findComitter()
  }
}

HTH Reinhold


From: jenkinsci-users@googlegroups.com  On 
Behalf Of jfern...@forgottenempires.net
Sent: Mittwoch, 13. Jänner 2021 10:22
To: Jenkins Users 
Subject: how to avoid cps error using XmlSlurper() method in jenkins pipeline


I am using a simple test pipeline to get a username out of a xml file, I have 
written a simple function using the XmlSlurper method and I have included the 
@NonCPS annotation at the beginning of the function but I keep getting an 
error, even though the function seems to work as it prints out in the console 
the username I am trying to find but it finishes the build with failure status. 
This is the pipeline:

```

import groovy.xml.*

import jenkins.model.Jenkins





@NonCPS

def findComitter(){

committer = ""

found = false

file = new 
XmlSlurper().parse("C:/Users/User/.jenkins/jobs/Phoenix_pipeline/builds/288/changelog6429015253614530280.xml")

file.entry.each { entry ->

entry.changenumber.each { changenumber ->

changenumber.children().each { tag ->

if(tag.name() == "changeUser" && found != true){

committer = tag.text()

found = true

}

}

}

}

println committer

//return committer.toString()

}



pipeline {

agent any



stages {

stage('test') {

steps {

findComitter()

}

}

}

}



```



this is the output I get, as you can see the function call seems to work as it 
get to the ```println commiter``` step but then I get an error and failure 
build status:

```

00:00:00.021 [Pipeline] Start of Pipeline

00:00:00.121 [Pipeline] node

00:00:00.129 Running on Jenkins in C:\Users\User\.jenkins\workspace\test

00:00:00.140 [Pipeline] {

00:00:00.157 [Pipeline] stage

00:00:00.161 [Pipeline] { (Hello)

00:00:00.180 [Pipeline] echo

00:00:00.182 Hello World

00:00:00.202 [Pipeline] echo

00:00:00.204 jaydenm

00:00:00.207 [Pipeline] }

00:00:00.220 [Pipeline] // stage

00:00:00.230 [Pipeline] }

00:00:00.242 [Pipeline] // node

00:00:00.264 [Pipeline] End of Pipeline

00:00:00.293 an exception which occurred:

00:00:00.293 in field 
org.jenkinsci.plugins.pipeline.modeldefinition.withscript.WithScriptScript.script

00:00:00.293 in object 
org.jenkinsci.plugins.pipeline.modeldefinition.agent.impl.LabelScript@49af372

00:00:00.293 in field groovy.lang.Closure.delegate

00:00:00.293 in object 
org.jenkinsci.plugins.workflow.cps.CpsClosure2@18d98e8e

00:00:00.293 in field groovy.lang.Closure.delegate

00:00:00.293 in object 
org.jenkinsci.plugins.workflow.cps.CpsClosure2@43324839

00:00:00.293 in field org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.closures

00:00:00.293 in object 
org.jenkinsci.plugins.workflow.cps.CpsThreadGroup@76d386ff

00:00:00.293 in object 
org.jenkinsci.plugins.workflow.cps.CpsThreadGroup@76d386ff

00:00:00.293 Caused: java.io.NotSerializableException: 
groovy.util.slurpersupport.NodeChild

```



I have been looking through the SO threads and all the info I got is to use the 
@NonCPS annotation to use any non-serializable objects, which I have done.
--
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/3764c601-8250-44f8-875a-ea0ec35321aan%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/VI1PR01MB6638803BE2DD41B3A438F6F0F7A90%40VI1PR01MB6638.eurprd01.prod.exchangelabs.com.


RE: jiraComment pipeline step throwing groovy.lang.MissingMethodException

2021-01-12 Thread Reinhold Füreder
Hello Stefan,

I think the documentation of the plugin is slightly outdated (or maybe only 
“COMPATIBILITY.md”):

  *   
https://www.jenkins.io/doc/pipeline/steps/jira/#jiracomment-jira-add-a-comment-to-issues
  *   
https://github.com/jenkinsci/jira-plugin/blob/1dacc167a9b21fc4d9256866a5f67ef741af7805/src/main/java/hudson/plugins/jira/pipeline/CommentStep.java#L30


  *   I think this should work:
jiraComment('FREF-363', 'My super jira comment')

HTH Reinhold

P.S.: Not sure if “COMPATIBILITY.md” is supposed to be the pipeline step 
documentation. If so, you may want to make a little PR with the updated usage?


From: jenkinsci-users@googlegroups.com  On 
Behalf Of ST
Sent: Montag, 4. Jänner 2021 22:17
To: Jenkins Users 
Subject: Re: jiraComment pipeline step throwing 
groovy.lang.MissingMethodException

Yes, we have installed latest version of jira plugin 3.1.3. Also I am 
successfully calling jiraSearch() method from the same plugin a few lines above 
in the same scripted pipeline.

FYI Here is the documentation of the Pipeline API of the jira plugin: 
https://github.com/jenkinsci/jira-plugin/blob/master/COMPATIBILITY.md

For the reference here is the exception again from my first email that I'm 
getting - any other ideas what could be the reason for getting this groovy 
exception?
Caught exception (exception: 'groovy.lang.MissingMethodException: No signature 
of method: java.lang.String.call() is applicable for argument types: 
(java.util.LinkedHashMap) values: [[issueKey:FREF-363, body: My super jira 
comment]]

On Mon, Jan 4, 2021 at 11:17 AM Arnaud bourree 
mailto:arnaud.bour...@gmail.com>> wrote:
Did you chek if you have Jira plugin installed?

Arnaud

Le dim. 3 janv. 2021 à 22:06, ST 
mailto:st.mailingli...@gmail.com>> a écrit :
Anyone has any idea why jiraComment(issueKey, body) is not working for us in 
scripted pipeline, see below for exception message?

Anyone that can confirm that it works fine in a scripted pipeline with latest 
version of Jenkins and jira plugin? Otherwise I will file a bug issue in the 
next days.

Thanks,
 Stefan.
On Wed, 23 Dec 2020, 17:24 ST, 
mailto:st.mailingli...@gmail.com>> wrote:
I am trying to add a comment to a jira issue from my scripted pipeline with 
this command:
jiraComment(issueKey: 'FREF-363', body: 'My super jira comment')

And I'm getting the following error:
17:07:25  Caught exception (exception: 'groovy.lang.MissingMethodException: No 
signature of method: java.lang.String.call() is applicable for argument types: 
(java.util.LinkedHashMap) values: [[issueKey:FREF-363, body: My super jira 
comment]]
17:07:25  Possible solutions: wait(), chars(), any(), wait(long), 
any(groovy.lang.Closure), each(groovy.lang.Closure)', message: 'No signature of 
method: java.lang.String.call() is applicable for argument types: 
(java.util.LinkedHashMap) values: [[issueKey:FREF-363, body:My super jira 
comment]]
17:07:25  Possible solutions: wait(), chars(), any(), wait(long), 
any(groovy.lang.Closure), each(groovy.lang.Closure)') during build, current 
build result is null.
[Pipeline] node
I am inside a node{} declaration, and I am not inside a @NonCPS method. What is 
wrong with my pipeline code?

Documentation for the step is here, I have basically copy'd from here:
https://github.com/jenkinsci/jira-plugin/blob/master/COMPATIBILITY.md#commentstep

Also these other jira commands work just fine from the same scripted pipeline:
* jiraSearch
* step([$class: 'hudson.plugins.jira.JiraIssueUpdateBuilder', jqlSearch: … ])

And we are using Jenkins v2.271 and jira-plugin v3.1.3 (latest).

Any help much appreciated, I have the feelign I am missing something very 
simple here ;-)
 stefan.

--
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CABwQARtjA5%2Bv3WmCX%3DP4JmsNSpgvXWE%2BD_hmY0EaSJ4XEWavgQ%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAESUf_A7TKXSgcj%3DbEaAWBSQOaTZTSf1%2BsL2RkMgtKaEm3SC%2Bg%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" 

RE: Where are jekins logs?

2020-11-12 Thread Reinhold Füreder
Sorry, I could not resist: https://lmgtfy.app/?q=where+are+docker+logs+stored


From: jenkinsci-users@googlegroups.com  On 
Behalf Of zil...@gmail.com
Sent: Donnerstag, 12. November 2020 16:45
To: Jenkins Users 
Subject: Re: Where are jekins logs?

Thanks Reinhold, I get that. But WHERE are they? What file either on the host 
or container?
On Thursday, November 12, 2020 at 1:24:06 AM UTC-5 r.fuereder wrote:
Hi Chris,

$ docker logs 

https://www.jenkins.io/doc/book/installing/docker/#accessing-the-jenkins-console-log-through-docker-logs

HTH Reinhold

From: jenkins...@googlegroups.com  On Behalf Of 
zil...@gmail.com
Sent: Mittwoch, 11. November 2020 22:26
To: Jenkins Users 
Subject: Where are jekins logs?

I'm getting an HTTP 504 error the very first time I log in to a newly set up 
Jenkins server (v2.249.3) running as a Docker container inside a Linux host. 
After several tries, I can eventually log in. Any restart after that works fine 
too. It's just during the very first login attempl.

Where are the logs? They're not in /var/jenkins_logs/* or var/log/jenkins.

Chris
--
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/87e9a5ea-6559-4d21-82a2-6b8ec9e808b3n%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/6030dc37-6c30-437a-a93d-e594aad340adn%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/VI1PR01MB663873AB1A30F964A18E4CBAF7E70%40VI1PR01MB6638.eurprd01.prod.exchangelabs.com.


RE: Where are jekins logs?

2020-11-11 Thread Reinhold Füreder
Hi Chris,

$ docker logs 

https://www.jenkins.io/doc/book/installing/docker/#accessing-the-jenkins-console-log-through-docker-logs

HTH Reinhold

From: jenkinsci-users@googlegroups.com  On 
Behalf Of zil...@gmail.com
Sent: Mittwoch, 11. November 2020 22:26
To: Jenkins Users 
Subject: Where are jekins logs?

I'm getting an HTTP 504 error the very first time I log in to a newly set up 
Jenkins server (v2.249.3) running as a Docker container inside a Linux host. 
After several tries, I can eventually log in. Any restart after that works fine 
too. It's just during the very first login attempl.

Where are the logs? They're not in /var/jenkins_logs/* or var/log/jenkins.

Chris
--
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/87e9a5ea-6559-4d21-82a2-6b8ec9e808b3n%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/VI1PR01MB6638CBD7258205605909A84DF7E70%40VI1PR01MB6638.eurprd01.prod.exchangelabs.com.


RE: one downstream with multiple upstreams(all upstreams should be success)

2020-09-02 Thread Reinhold Füreder
Hi Keshav,

sorry for interfering, but I think Gianluca’s pseudo code and hint should 
actually help you:

  *   Job A will wait for both job B and job C to be finished
  *   and only if both were successful, then and only then continue with 
triggering job D in the next stage

HTH Reinhold


From: jenkinsci-users@googlegroups.com  On 
Behalf Of chenna kesavulu
Sent: Dienstag, 1. September 2020 22:23
To: jenkinsci-users@googlegroups.com
Subject: Re: one downstream with multiple upstreams(all upstreams should be 
success)

Hi Gianluca,

I can't trigger Job D directly from Job A. Actually in my project we are 
running integration tests in Job B and UI tests in Job C. So if both the builds 
are green then only  i can merge the code to master in Job D. But thanks for 
your answer I will try it.

Thanks,
Keshav.


On Wed, Sep 2, 2020 at 1:26 AM Gianluca 
mailto:gmax...@gmail.com>> wrote:
Hi,
why not triggering Job D directly from job A ? In this way, if you put that in 
a stage after job B and job C is triggered ... it will only be triggered if 
both succedded:

stage("Run B and C") {
  steps {
parallel(
  "job B": { buildJob ... },
  "job C:" { build Job ... },
}

stage("Run D") {
  steps {
   // this will run only if both Job B and C succeed
buildJob
  }
}

Cheers,
Gianluca.

Il giorno martedì 1 settembre 2020 alle 19:52:49 UTC+1 chenna keshav ha scritto:
Hi,

i have stuck with a small issue... i have a job A which triggers job B and job 
C. for job B and job C downstream job is job D i need this job D is to be 
triggered when job B and job C both are success. i have tried with "Build after 
other projects are build" with "trigger only if build is stable" option. its 
not working for me... the job is getting triggered even one of jobs is success. 
can some one please help me on this..

Thanks,
Keshav.
--
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/d4839902-97c8-4eb5-baa2-a080a400cfdbn%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CABgMPaGxNu_fgFgFytBvZ72vZBKoLBqwj7XEN%3DzaQBMGW1%2BKYw%40mail.gmail.com.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/DBAPR01MB6631ABF8C17E930FD2B78295F72F0%40DBAPR01MB6631.eurprd01.prod.exchangelabs.com.


RE: The pipeline emailextrecipients step takes too long time

2020-04-29 Thread Reinhold Füreder
Ad LDAP: we are also using another configuration element, but again, this may 
not be kriegs-entscheidend
userSearchBase: "CN=Users"

If you know that it is the emailextrecipients step and it is really that slow, 
then you could maybe find the problem when remote debugging into Jenkins?

But I guess that email-ext insider Slide might have much better hints…

HTH Reinhold

From: jenkinsci-users@googlegroups.com  On 
Behalf Of Sverre Moe
Sent: Mittwoch, 29. April 2020 10:44
To: Jenkins Users 
Subject: Re: The pipeline emailextrecipients step takes too long time

This had no or very little impact on the time used by emailextrecipient.

Disbled email resolver against LDAP
Enabled LDAP cache

Checked a build that was built in Jenkins after changing these settings.
The emailextrecipients took 98274 milliseconds, almost 2 minutes, for 2 authors 
in the change sets.

/Sverre

tirsdag 28. april 2020 22.52.06 UTC+2 skrev Sverre Moe følgende:

Found this setting in Configure Global Security for LDAP:
Disable Ldap Email Resolver
I ticked it, now I will see if that can help the issue.


LDAP Caching:
I had not enabled cache.
Enabled it, and set Size=100, TTL=1 hour
Does this mean that the cache only lives for 1 hour? That seems a little.

/Sverre

--
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/172bfdd6-f04e-4011-b0c0-5062585c80a2%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/VI1PR01MB66387789EA63B9253817954CF7AD0%40VI1PR01MB6638.eurprd01.prod.exchangelabs.com.


RE: The pipeline emailextrecipients step takes too long time

2020-04-28 Thread Reinhold Füreder
Sorry for the following potentially too naïve hint:

In addition try to also play around with the LDAP caching, if not yet activated 
– because that may also reduce load on LDAP server (in case that is a problem); 
of course, other LDAP clients in your company should do the same!

(I remember that in our company a single badly configured server tool doing too 
many LDAP requests managed to led to quite interesting follow-up failure 
symptoms for other systems…)

HTH Reinhold

From: jenkinsci-users@googlegroups.com  On 
Behalf Of Slide
Sent: Dienstag, 28. April 2020 17:07
To: Jenkins User Mailing List 
Subject: Re: The pipeline emailextrecipients step takes too long time

How would emails get to the correct user if their email address can't be 
resolved from the username? I don't know of a way to disable the username -> 
email resolution. Did you try changing the search criteria for the LDAP plugin 
as related in one of your other posts?

On Tue, Apr 28, 2020 at 4:58 AM Sverre Moe 
mailto:sverre@gmail.com>> wrote:
Any idea how to workaround this?

Any way to disable the resolving of email adresses?
Using Git SCM checkout in Pipeline

/Sverre

mandag 27. april 2020 21.16.25 UTC+2 skrev slide følgende:
Sorry, I misspoke about this. The email-ext plugin uses 
ChangeSet.Entry.getAuthor(), depending on the SCM plugin you are using, it can 
do lookups like I mentioned. The Git plugin will try and do the resolution of 
username -> email using the mail resolver from the Mailer plugin (which is 
where the extension point lives). I was confusing where the resolver was in the 
infrastructure. The TL;DR is that it is still the MailResolver feature that is 
taking the time, but the sequence was different than I remembered.

On Mon, Apr 27, 2020 at 10:42 AM Slide 
mailto:slid...@gmail.com>> wrote:
That sounds like the culprit to me. Email-ext has to resolve usernames from the 
changeset so an email address. It provides an extension point for this that 
other plugins can implement to provide that service. If you are having long 
delays accessing LDAP, that would definitely point to that as a culprit for the 
length of time.

On Mon, Apr 27, 2020 at 7:37 AM Sverre Moe 
mailto:sver...@gmail.com>> wrote:
Our Jenkins have enabled Login with LDAP.

We do occasionally experience LDAP timeout also. 60 seconds timeout.
Perhaps there is a relation to that, considering that each author found by 
emailextrecipients also takes 60 seconds each.

mandag 27. april 2020 16.25.37 UTC+2 skrev slide følgende:
There is no lookup until the email is sent. There may be a call to resolve a 
username to the email address though. Are you using ldap or AD?

On Mon, Apr 27, 2020, 01:39 Sverre Moe 
mailto:sver...@gmail.com>> wrote:
Well at this point I am not sending any email, yet.
I am looking up recipients from change set, so I can use that later when/if I 
send email for failed builds.

Does emailextrecipients do the lookup itself, or is it done when calling mail 
step?

mandag 27. april 2020 01.12.48 UTC+2 skrev Jeremy Mordkoff følgende:
sending email always involves a forward lookup and many mail servers do a 
reverse lookup on the sender's IP.


---
Jeremy Mordkoff
Director of Engineering Services
[https://groups.google.com/group/jenkinsci-users/attach/171464492505e/Outlook-mxuj2cog.png?part=0.1=1=0]
RIFT, inc
900 Chelmsford Street,  4th floor, tower 3
Lowell, MA 01851
1.978.257.2183 (cell)
www.riftio.com

From: jenkins...@googlegroups.com 
mailto:jenkins...@googlegroups.com>> on behalf of 
Sverre Moe mailto:sver...@gmail.com>>
Sent: Sunday, April 26, 2020 3:32 PM
To: Jenkins Users 
mailto:jenkins...@googlegroups.com>>
Subject: Re: The pipeline emailextrecipients step takes too long time

How so?

Does emailextrecipient do a DNS lookup on each author it can find?

søndag 26. april 2020 20.12.03 UTC+2 skrev jeremy mordkoff følgende:
check that DNS is working. I've seen huge delays on basic ops when DNS lookups 
are timing out. Check forward and reverse lookups.



On Sunday, April 26, 2020 at 12:30:59 PM UTC-4, slide wrote:
Can you add timestamps? It's hard to tell from what you posted when things are 
occurring.
On Sun, Apr 26, 2020, 01:16 Sverre Moe 
mailto:sver...@gmail.com>> wrote:
Yes it did.

Just one simple little commit, and Checkout took a little over 1 minute


[Pipeline] emailextrecipients

  Collecting change authors...

build: 168

  adding author: Sverre Moe

Adding Sverre Moe with address sve...@company.com

Analyzing: sve...@company.com

Looking for: sve...@company.com

   starting at: 0

   firstFoundIdx: 0

   firstFoundIdx-substring: sve...@company.com

   => found type: 0

Analyzing: sve...@company.com

Looking for: 

RE: BackgroundGlobalBuildDiscarder error on jenkins home NFS

2020-04-08 Thread Reinhold Füreder
Hi Alan,

I think there is an additional LogRotater exception stack trace below and it is 
the same issue as: https://issues.jenkins-ci.org/browse/JENKINS-61687

For possible workarounds (and related bugs ) please see comments from 
https://issues.jenkins-ci.org/browse/JENKINS-61256

HTH Reinhold

From: jenkinsci-users@googlegroups.com  On 
Behalf Of Alan Sparks
Sent: Dienstag, 7. April 2020 22:35
To: Jenkins Users 
Subject: BackgroundGlobalBuildDiscarder error on jenkins home NFS

I've been seeing a lot of errors similar to the following on my Jenkins masters 
which mount /var/lib/jenkins from an NFS (specifically, AWS EFS) file system:

2020-04-07 19:54:27.051+ [id=4740]  WARNING 
j.m.BackgroundGlobalBuildDiscarder#lambda$processJob$0: An exception occurred 
when executing Project Build Discarder
Also:   java.nio.file.NoSuchFileException: 
/var/lib/jenkins/jobs/Administration/jobs/Jobs Report/builds/65 -> 
/var/lib/jenkins/jobs/Administration/jobs/Jobs Report/builds/.65
at 
sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
at 
sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
at sun.nio.fs.UnixCopyFile.move(UnixCopyFile.java:396)
at 
sun.nio.fs.UnixFileSystemProvider.move(UnixFileSystemProvider.java:262)
at java.nio.file.Files.move(Files.java:1395)
at hudson.model.Run.delete(Run.java:1621)
at hudson.tasks.LogRotator.perform(LogRotator.java:166)
[rest elided]

It doesn't seem to be leaving any cruft behind (including dotfiles), but am 
wondering if this can be fixed in my configuration to stop the error.  It 
actually seems to be at least similar to JENKINS-22205, which has been 
closed... but there's no resolution there except it "went away".

Any advice would be appreciated.  Thanks in advance.
-Alan

Jira: https://issues.jenkins-ci.org/browse/JENKINS-22205
--
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/d26c6387-80f8-4c8c-a0a0-25a9f2368954%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/PR3PR01MB64415B2205E2E855D7C0F7C00%40PR3PR01MB6441.eurprd01.prod.exchangelabs.com.


RE: shared library - hashmap error

2020-02-18 Thread Reinhold Füreder
Hi „judaondo“,


  1.  Ad “but it doesn’t do anything”: in @NonCPS annotated methods you must 
not call pipeline steps like “checkout” => seemingly this is skipped (?) rather 
silently
  2.  However, in addition the warning log “expected to call 
WorkflowScript.gitCheckoutMultipleRepositories but wound up catching 
com.mycom.Logger.info; see: 
https://jenkins.io/redirect/pipeline-cps-method-mismatches/” also sounds very 
suspicious…
  3.  I guess the iteration over “repositories” parameter is the original 
culprit: from Jenkins CPS/pipeline point of view using a non-serializable 
LinkedHashMap$Entry
 *   See 
https://jenkins.io/blog/2017/02/01/pipeline-scalability-best-practice#appendix-serializable-vs.-non-serializable-types
 *   => Use a different way to iterate

HTH Reinhold


From: jenkinsci-users@googlegroups.com  On 
Behalf Of judaondo
Sent: Dienstag, 18. Februar 2020 08:50
To: Jenkins Users 
Subject: Re: shared library - hashmap error

Thanks Ram,

it fixed that issue, but now I get the following (the status is SUCCESS but it 
doesn´t do anything):

[Pipeline] { (Checkout)
[Pipeline] echo
00:00:00.799  /var/lib/jenkins/staticfiles/cip-environmens-local-cloud/
expected to call WorkflowScript.gitCheckoutMultipleRepositories but wound up 
catching com.mycom.Logger.info; see: 
https://jenkins.io/redirect/pipeline-cps-method-mismatches/
[Pipeline] echo
00:00:00.852  INFO: Clonning 'htpp://myrepo1.git - (branch1 branch)' repository.
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // ansiColor
[Pipeline] }
[Pipeline] // timestamps
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
Finished: SUCCESS




El martes, 18 de febrero de 2020, 4:44:19 (UTC+1), Ramanathan Muthaiah escribió:

On Monday, February 17, 2020 at 8:06:57 PM UTC+5:30, judaondo wrote:
Hello I have the following Shared Library:

#!/usr/bin/env groovy

import com.mycom.Logger

/**
 * Clone the selected git repository.
 *
 * Example usage within a declarative pipeline:
 *
 *steps {
 *gitCheckout (["htpp://myrepo1.git": "branch1", "htpp://myrepo2.git": 
"branch2"])
 *}
 *
 * @param repositories (HashMap) git url and branch of the git project to be 
downloaded.
 */
def call(repositories = ["htpp://myrepo1.git": "branch1", "htpp://myrepo2.git": 
"branch2"]) {
def logger = new Logger()
for (repo in repositories) {
def repository = repo.key
def branch = repo.value
def foldername = repository.tokenize('/')[-1].toLowerCase()
logger.info("Clonning '${repository} - (${branch} 
branch)' repository.")
println("Foldername: " + foldername)
println("Repository: " + repository)
println("Branch: " + branch)
checkout([$class: 'GitSCM', branches: [[name: branch]],
doGenerateSubmoduleConfigurations: false,
extensions: [
[$class: 'CloneOption', depth: 1, noTags: false, 
reference: '', shallow: true],
[$class: 'RelativeTargetDirectory', relativeTargetDir: 
foldername]
],
submoduleCfg: [],
userRemoteConfigs: [[credentialsId: 'gittfscredentials',
url: repository]]])
} // endfor

}


When using it in Jenkins pipeline

#!/usr/bin/env groovy

@Library('mylib')

import com.mycom.*

pipeline {
agent { label 'master' }

options {
timestamps ()
disableConcurrentBuilds()
}

stages {
stage('Checkout') {
steps {
gitCheckoutMultipleRepositories()
}
}
}

}



I get the following error:





00:00:00.963  INFO: Clonning 'htpp://myrepo1.git - (branch1 branch)' repository.

[Pipeline] echo

00:00:00.972  Foldername: myrepo1.git

[Pipeline] echo

00:00:00.980  Repository: htpp://myrepo1.git

[Pipeline] echo

00:00:00.987  Branch: branch1

[Pipeline] checkout

00:00:00.998  using credential gittfscredentials

00:00:01.002   > git rev-parse --is-inside-work-tree # timeout=10

00:00:01.010  Fetching changes from the remote Git repository

00:00:01.010   > git config remote.origin.url htpp://myrepo1.git # timeout=10
00:00:01.018  Using shallow fetch with depth 1

00:00:01.018  Fetching upstream changes from htpp://myrepo1.git

00:00:01.018   > git --version # timeout=10

[Pipeline] }

[Pipeline] // stage

[Pipeline] }

[Pipeline] // ansiColor

[Pipeline] }

[Pipeline] // timestamps

[Pipeline] }

[Pipeline] // node

[Pipeline] End of Pipeline

an exception which occurred:

in field com.cloudbees.groovy.cps.impl.BlockScopeEnv.locals

in object 
com.cloudbees.groovy.cps.impl.LoopBlockScopeEnv@469abe44

in field com.cloudbees.groovy.cps.impl.ProxyEnv.parent

in object 
com.cloudbees.groovy.cps.impl.BlockScopeEnv@71325a45

in 

RE: Shared library function cannot call other shared library function in separate file if called function uses "writeFile"

2020-02-10 Thread Reinhold Füreder
Weird. And sorry for misunderstanding you.

There might be a stacktrace in the Jenkins log file (hopefully). Or you could 
try catch all exceptions in your scripted pipeline to get some more details…

I just tried to reproduce your problem (or the one I now think you are 
describing), but unfortunately it works like a charm 

Cu Reinhold


From: jenkinsci-users@googlegroups.com  On 
Behalf Of David Karr
Sent: Sonntag, 9. Februar 2020 02:17
To: Jenkins Users 
Subject: Re: Shared library function cannot call other shared library function 
in separate file if called function uses "writeFile"

I think you've both misunderstood what I'm saying, or I'm not being clear 
enough.

I'm not writing to write a function named "writeFile", I'm just calling that 
pipeline step from the function.  All of the function names I'm creating are 
definitely unique.  If I call the "vars" function that calls "writeFile", I get 
the seemingly generic error with no other information.  If I instead call the 
inline function with contents identical to the "vars" function, it works fine.

On Friday, February 7, 2020 at 12:51:42 PM UTC-8, David Karr wrote:
The statement I make in the subject doesn't make sense, but I don't know how 
else to describe it.

I'm working on a set of builds using scripted pipelines.  Our Jenkinsfiles are 
very short, all of the build logic is in the shared library.  In the "main" 
shared library function, I'm trying to call another function defined in another 
"vars" class.  We have many of these already.  In this called function, I have 
a call to the "writeFile" pipeline step to create a temporary file used by a 
shell script called immediately after that.  This is the only place anywhere in 
our builds that we call "writeFile".

When I run the build, I get this very unhelpful message:


Jenkins Job Failed due to Exception : org.codehaus.groovy.control.ErrorCollector

There is literally no other information provided, except for the log lines that 
come before it.  I found that an echo statement that is called before this 
suspect function is called is emitted in the log.  An echo statement as the 
first line of the "call()" method of the function being called is NOT emitted 
in the log. Somehow the act of calling the function makes it die, with no 
explanation.

So, I tried a workaround.  In the calling script file, I added a "def" at the 
end of the file, to define an "inline function" with almost the same name as 
the "vars" function name.  I copied the entire body of the "call()" method of 
the vars function into that inline function.  I replaced the call to the vars 
function with the call to the inline function.  It worked on the first try.

Any ideas what might cause this?
--
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/6ff2f989-046b-4d56-9d3d-d1d69487e97c%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/AM0PR01MB61470ACBCC11F888EA32B03CF7180%40AM0PR01MB6147.eurprd01.prod.exchangelabs.com.


AW: Shared library function cannot call other shared library function in separate file if called function uses "writeFile"

2020-02-08 Thread Reinhold Füreder
Hi David,

I think that could be related to 
https://issues.jenkins-ci.org/browse/JENKINS-50736, because there is a pipeline 
basic step called 'writeFile' (see 
https://jenkins.io/doc/pipeline/steps/workflow-basic-steps/#writefile-write-file-to-workspace),
 but maybe Jesse Glick or Andrew Bayer can shed some more light on this issue...

HTH Reinhold


Von: jenkinsci-users@googlegroups.com  im 
Auftrag von David Karr 
Gesendet: Freitag, 7. Februar 2020 21:51
An: Jenkins Users 
Betreff: Shared library function cannot call other shared library function in 
separate file if called function uses "writeFile"

The statement I make in the subject doesn't make sense, but I don't know how 
else to describe it.

I'm working on a set of builds using scripted pipelines.  Our Jenkinsfiles are 
very short, all of the build logic is in the shared library.  In the "main" 
shared library function, I'm trying to call another function defined in another 
"vars" class.  We have many of these already.  In this called function, I have 
a call to the "writeFile" pipeline step to create a temporary file used by a 
shell script called immediately after that.  This is the only place anywhere in 
our builds that we call "writeFile".

When I run the build, I get this very unhelpful message:


Jenkins Job Failed due to Exception : org.codehaus.groovy.control.ErrorCollector

There is literally no other information provided, except for the log lines that 
come before it.  I found that an echo statement that is called before this 
suspect function is called is emitted in the log.  An echo statement as the 
first line of the "call()" method of the function being called is NOT emitted 
in the log. Somehow the act of calling the function makes it die, with no 
explanation.

So, I tried a workaround.  In the calling script file, I added a "def" at the 
end of the file, to define an "inline function" with almost the same name as 
the "vars" function name.  I copied the entire body of the "call()" method of 
the vars function into that inline function.  I replaced the call to the vars 
function with the call to the inline function.  It worked on the first try.

Any ideas what might cause this?

--
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/3119e9f3-e6a8-4fa6-861a-76c9358ab300%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/AM0PR01MB6147F74252A8BD51D29E9A77F71F0%40AM0PR01MB6147.eurprd01.prod.exchangelabs.com.


RE: Issue with cps-method-mismatches

2019-10-23 Thread Reinhold Füreder
Hi Stefan,

Just a naïve guess: This might be a little bug in Jenkins pipeline, but you 
should be able to work around it…

“action” in pipeline file is named argument map element for custom “someStep” 
step

Therefore in custom “someStep” step:

additionalActions.action …  might still work
but additionalActions.action() doesn’t work (anymore since about mid July 2019)


  *   Try:
additionalActions.action.call()

HTH Reinhold


From: jenkinsci-users@googlegroups.com  On 
Behalf Of stefan.rademac...@tk.de
Sent: Mittwoch, 23. Oktober 2019 15:07
To: jenkinsci-users@googlegroups.com
Subject: WG: Issue with cps-method-mismatches

Hi everyone,

it's been a while, since I asked the question below. I still couldn't figure 
out, what 'm doing wrong.
Is there anyone, who has a hint?

Thanks!
Stefan

_
Von: Rademacher, Stefan
Gesendet: Dienstag, 30. Juli 2019 14:04
An: jenkinsci-users@googlegroups.com
Betreff: Issue with cps-method-mismatches


Hi everyone,

my Jenkins Pipeline prints the following message:
expected to call java.util.LinkedHashMap.action but wound up catching 
org.jenkinsci.plugins.workflow.cps.CpsClosure2.call

The Jenkinsfile is
pipeline {
  agent { label "Linux-Agent" }
  stages {
stage("Stage") {
  steps {
someStep(
  action: { sh "echo FOO" }
)
  }
}
  }
}

This ist he custom step 'someStep.groovy':
def call(additionalActions) {
  if (additionalActions.action) additionalActions.action()
}

Console output:
Running on Linux-Test (rdev40v59) in 
/data/jenkins-agent/workspace/Jenkins-Shared-Libs/testjob
[Pipeline] {
[Pipeline] stage
[Pipeline] { (Stage)
expected to call java.util.LinkedHashMap.action but wound up catching 
org.jenkinsci.plugins.workflow.cps.CpsClosure2.call; see: 
https://jenkins.io/redirect/pipeline-cps-method-mismatches/
[Pipeline] sh
+ echo FOO
FOO
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
Finished: SUCCESS

I have read https://jenkins.io/redirect/pipeline-cps-method-mismatches/, but 
can't figure out, why this error message occurs in my case.
Can anyone help me to find a solution?

Best regards
Stefan


--
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/9fbfb50b0e6447649044dd69d43ac6b4%40tk.de.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/AM0PR01MB6147305B7F0F1D2AC8B19F42F76B0%40AM0PR01MB6147.eurprd01.prod.exchangelabs.com.


RE: pipelines: how to store script output into a variable?

2019-10-23 Thread Reinhold Füreder
Hi,

the „funny“ answer is:
„java -version” prints the version information to stderr…

HTH Reinhold


From: jenkinsci-users@googlegroups.com  On 
Behalf Of Pa Y
Sent: Mittwoch, 23. Oktober 2019 13:40
To: Jenkins Users 
Subject: pipelines: how to store script output into a variable?

Hi,
I looked extensively and the standard solution found in SO or other places 
doesn't work for me.. do you know what is the problem and how to fix it?

thanks for any help in advance!

a sample pipeline:
---
pipeline {
agent any
environment {
JAVA_INFO= ""
}
stages {
stage('test read info') {
steps {
script {
JAVA_INFO = sh(returnStdout: true, script: "java -version")
sh("echo this is java: ${JAVA_INFO}")
}
}
}
}
}
---

EXPECTED OUTPUT:

this is java: openjdk version "11.0.4" 2019-07-16


... (more lines)

CURRENT OUTPUT:  (echo is empty)

[Pipeline] sh

+ java -version

openjdk version "11.0.4" 2019-07-16

OpenJDK Runtime Environment (build 11.0.4+11-post-Debian-1deb10u1)

OpenJDK 64-Bit Server VM (build 11.0.4+11-post-Debian-1deb10u1, mixed mode, 
sharing)

[Pipeline] sh

+ echo this is java:

this is java:

[Pipeline] }

[Pipeline] // script
Regards,
Pablo


--
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/383d7586-8a5c-4d57-82c3-56ba9ce71ece%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/AM0PR01MB6147036C9582529076C95F18F76B0%40AM0PR01MB6147.eurprd01.prod.exchangelabs.com.


RE: Whats is the format for custom pipeline library help files?

2019-10-22 Thread Reinhold Füreder
Hi Martin,

This (markup rendering) works fine for me (with HTML markup used in 
“vars/foo.txt”); of course only once the build succeeds; but I guess you have a 
different problem (than non-successful builds), because otherwise it does not 
change at all or is rendered at all.

Maybe it also depends on markup formatter setting? E.g. via JCasC:
Jenkins:
 …
  markupFormatter:
rawHtml:
  disableSyntaxHighlighting: false
  …

HTH Reinhold


From: jenkinsci-users@googlegroups.com  On 
Behalf Of Martin d'Anjou
Sent: Samstag, 19. Oktober 2019 01:00
To: Jenkins Users 
Subject: Re: Whats is the format for custom pipeline library help files?

Thank you Mark, this is a good set of examples.

But :-( it does not work. The markup is rendered verbatim, that is, it is 
treated as a plain text file.
And even when I add the jenkins-infra/pipeline-library to my jenkins instance, 
it shows the help files as text, there is no rendering of the markup.

It is not a critical thing.

Best,
Martin

On Friday, October 18, 2019 at 6:23:08 PM UTC-4, Mark Waite wrote:
https://github.com/jenkins-infra/pipeline-library/tree/master/vars  seems to 
include HTML markup in the txt file.  For example, runATH.txt starts with:


Runs the Acceptance Test 
Harness in a configurable way



On Fri, Oct 18, 2019 at 4:03 PM Martin d'Anjou 
> wrote:
Hello,

We can write documentation for pipeline library in files like vars/foo.txt and 
resource/org/foo/bar.json, but I would like to know what format and markups are 
supported.

I found the help for the docker pipeline plugin, but it's written in 
jelly
 and after trying, jelly is not a supported format for the help files.

Thanks,
Martin
--
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkins...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/73becfdb-b513-450b-af2d-5822ef259e86%40googlegroups.com.


--
Thanks!
Mark Waite
--
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/e7e88232-fcb2-4145-96a3-5c22ffc995a8%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/AM0PR01MB6147A9A8A1D5CE76E27C3EC5F7680%40AM0PR01MB6147.eurprd01.prod.exchangelabs.com.


RE: declarative pipeline and gitlab

2019-10-22 Thread Reinhold Füreder
Hi Pablo,

which Links? I am seeing Links to GitLab “Commits” in “Changes” section 
(scripted pipeline; only “Push Events” is enabled for GitLab Triggers; Git 
checkout has configured “gitlab” as repository browser; this requires Git 
plugin in beta version IIRC; in addition the pipeline finally calls 
“updateGitlabCommitStatus” step, but this is another story)

HTH Reinhold


From: jenkinsci-users@googlegroups.com  On 
Behalf Of Pa Y
Sent: Montag, 21. Oktober 2019 23:56
To: Jenkins Users 
Subject: Re: declarative pipeline and gitlab

Hi Gabriele,
yes, you are right,thanks. The issue was the URL used (I need to RTFM 
carefully)...  as it seems you have experience with this: by using pipeline so 
far I get in Jenkins only a note like "Started ​by ​GitLab ​push ​by.." without 
any link to gitlab merg request.. by using freestyle job, the links are overall 
there. did you manage to get this?

Best Regards,
Pablo

On Monday, October 21, 2019 at 1:48:03 PM UTC+2, Gabriele Bonetti wrote:
Hi,

Maybe it's a "mister obvious" answer but have you set up the build trigger on 
the receiving pipeline? In the pipeline configuration you should have an option 
"Build when a change is pushed to gitlab" that you can enable and select the 
set of the events that would trigger the pipeline.
Also from here you can confirm that the webhook you are using is correct.



On Tuesday, October 15, 2019 at 10:47:12 AM UTC+2, Pa Y wrote:
Hello,
has somebody managed successfully to use declarative pipeline and gitlab?

I followed the instructions listed here: 
https://docs.gitlab.com/ee/integration/jenkins.html and this works for 
freestyle jobs. we use this already without problems.

Now, I try to move to pipelines to have more options in general.

So far, we get gitlab hook sent succcessfully but for this we need to disable 
in Jenkins : Prevent Cross Site Request Forgery exploits , what I don't really 
want...

And anyway after hook was sent, Jenkins job can't be triggered

can maybe somebody share a running example?

Thanks for any help in advance!

Pablo


--
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/708e7ee8-1651-40fb-b0c8-6f7a6368bef5%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/AM0PR01MB6147350520E0BD3356C968B2F7680%40AM0PR01MB6147.eurprd01.prod.exchangelabs.com.


RE: Marking of skipped stages in blue ocean

2019-08-28 Thread Reinhold Füreder
Hi Marek,

First of all please also note 
https://issues.jenkins-ci.org/browse/JENKINS-47286?focusedCommentId=360479=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-360479
 -- in the meantime https://issues.jenkins-ci.org/browse/JENKINS-47286 has been 
therefore (?) resolved with “Postponed”…

Secondly the currently possible workaround is admittedly a bit hidden in the 
rather longish issue (with the many comments) and maybe even only found in some 
of its links: 
https://comquent.de/en/skipped-stages-in-jenkins-scripted-pipeline/ looks good 
though

HTH Reinhold


From: jenkinsci-users@googlegroups.com  On 
Behalf Of Marogo Ytcutc
Sent: Montag, 26. August 2019 00:19
To: Jenkins Users 
Subject: Marking of skipped stages in blue ocean

Hi,

I noticed that since version 1.11.0 of the "Blue Ocean" plugin is possibility 
to mark skipping of selected stages:

https://wiki.jenkins.io/display/JENKINS/Blue+Ocean+Plugin
"JENKINS-47286 Support skipping stages in scripted pipelines for nice 
visualization in blue ocean and classic UI stage view."

 but I did not find example, how to do it in the scripted pipeline. Please show 
me some example.

Best regards,
Marek




--
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/56df6e37-2fc7-4f27-be46-bad901cf743d%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/AM0PR01MB61470E8EDD2E7FF9B06724E0F7A30%40AM0PR01MB6147.eurprd01.prod.exchangelabs.com.


RE: Jenkins Overwriting JobDSL Configured Job

2019-08-08 Thread Reinhold Füreder
Hi Chris,

after re-reading also your initial email I have the feeling my pipeline 
focused/related answer is not helpful at all, as you are not using pipeline 
jobs, but presumably freestyle jobs?

Another very naïve guess:

  *   Could it be that using the JobDSL configure { } block changes the 
“config.xml” as you think is expected (because you “just” look at the 
“config.xml”), but in fact it is invalid and during opening the job 
configuration via Jenkins UI (via “Configure” button) it reads in the invalid 
“config.xml” and then detects and removes the invalid elements (that were added 
via JobDSL configure { } block)?

Please note that I have no idea about JobDSL implementation, so this 2nd naïve 
guess could be even less helpful than the first one :-o

Reinhold


From: jenkinsci-users@googlegroups.com  On 
Behalf Of Chris McIntosh
Sent: Donnerstag, 8. August 2019 14:59
To: jenkinsci-users@googlegroups.com
Subject: Re: Jenkins Overwriting JobDSL Configured Job

Thanks Reinhold,

Any way you could think of to get the job to load first before it executes?
I tried reloading all the config from disk which didn't work.  I didn't have a 
chance to try restarting it yet.

Thanks,

Chris

On Wed, 7 Aug 2019 at 23:54, Reinhold Füreder 
mailto:r.fuere...@xortex.com>> wrote:
Hi Chris,

just a very naive guess:

  *   there are certain pipeline options or also called pipeline job properties 
(e.g. build discarder policy or pipeline triggers or pipeline parameters) that 
lead to updates of the pipeline job config once the corresponding “properties” 
step (of scripted) pipeline is executed

HTH Reinhold


From: jenkinsci-users@googlegroups.com<mailto:jenkinsci-users@googlegroups.com> 
mailto:jenkinsci-users@googlegroups.com>> On 
Behalf Of Chris McIntosh
Sent: Mittwoch, 7. August 2019 22:25
To: jenkinsci-users@googlegroups.com<mailto:jenkinsci-users@googlegroups.com>
Subject: Jenkins Overwriting JobDSL Configured Job

Hey All,

Hoping somebody can shed some light on this.

I am using the jobDsl plugin with a seed job to configure a job.
The job is using a configure {} block to configure some aspect of the job for a 
plugin that doesn't have a jobDsl extension (Office365Connector).

When I run the seed job, the config.xml file for the job is updated as expected 
with the plugin configuration.

When i go to open the job in the Jenkins UI the plugin is not configured.  When 
I open the config.xml file for the job on the Jenkins Master filesystem, the 
config has been reverted somehow to remove the config block my jobDsl job has 
defined.

I configured auditd to watch the config file and I see two log entries done by 
the jenkins user within a few seconds of each other indicating to me that 
something in Jenkins is causing the job config to get overwritten after my seed 
job has defined the job.

Anybody have any clue how I can go about debugging this?

Jenkins master is running on Ubuntu 18.04.  I can provide any other info needed.
Thanks,

Chris
--
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
jenkinsci-users+unsubscr...@googlegroups.com<mailto:jenkinsci-users+unsubscr...@googlegroups.com>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAJq9cAoMLWof5Y9nrQ5Ee0WxDVVqs8QP8NfKQ5r5c1WiuM2pdA%40mail.gmail.com<https://groups.google.com/d/msgid/jenkinsci-users/CAJq9cAoMLWof5Y9nrQ5Ee0WxDVVqs8QP8NfKQ5r5c1WiuM2pdA%40mail.gmail.com?utm_medium=email_source=footer>.
--
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
jenkinsci-users+unsubscr...@googlegroups.com<mailto:jenkinsci-users+unsubscr...@googlegroups.com>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/AM0PR01MB61478359E40DF5C9521DE825F7D70%40AM0PR01MB6147.eurprd01.prod.exchangelabs.com<https://groups.google.com/d/msgid/jenkinsci-users/AM0PR01MB61478359E40DF5C9521DE825F7D70%40AM0PR01MB6147.eurprd01.prod.exchangelabs.com?utm_medium=email_source=footer>.


--
Touch not the Cat bot a Glove
--
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
jenkinsci-users+unsubscr...@googlegroups.com<mailto:jenkinsci-users+unsubscr...@googlegroups.com>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAJq9cApTn-zJbWKPEd3AzPjVR5Poh6FetjwQpng7GE--jAX6_Q%40mail.gmail.com<https://groups.google.com/d/msgid/jenkinsci-users/CAJq9cApTn-zJbWKPEd3AzPjVR5Poh6FetjwQpng7GE--jAX6_Q%40mail.gmail.com?utm_medium=email_source=footer>.

-- 
You received this message because you are subsc

RE: Jenkins Overwriting JobDSL Configured Job

2019-08-07 Thread Reinhold Füreder
Hi Chris,

just a very naive guess:

  *   there are certain pipeline options or also called pipeline job properties 
(e.g. build discarder policy or pipeline triggers or pipeline parameters) that 
lead to updates of the pipeline job config once the corresponding “properties” 
step (of scripted) pipeline is executed

HTH Reinhold


From: jenkinsci-users@googlegroups.com  On 
Behalf Of Chris McIntosh
Sent: Mittwoch, 7. August 2019 22:25
To: jenkinsci-users@googlegroups.com
Subject: Jenkins Overwriting JobDSL Configured Job

Hey All,

Hoping somebody can shed some light on this.

I am using the jobDsl plugin with a seed job to configure a job.
The job is using a configure {} block to configure some aspect of the job for a 
plugin that doesn't have a jobDsl extension (Office365Connector).

When I run the seed job, the config.xml file for the job is updated as expected 
with the plugin configuration.

When i go to open the job in the Jenkins UI the plugin is not configured.  When 
I open the config.xml file for the job on the Jenkins Master filesystem, the 
config has been reverted somehow to remove the config block my jobDsl job has 
defined.

I configured auditd to watch the config file and I see two log entries done by 
the jenkins user within a few seconds of each other indicating to me that 
something in Jenkins is causing the job config to get overwritten after my seed 
job has defined the job.

Anybody have any clue how I can go about debugging this?

Jenkins master is running on Ubuntu 18.04.  I can provide any other info needed.
Thanks,

Chris
--
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAJq9cAoMLWof5Y9nrQ5Ee0WxDVVqs8QP8NfKQ5r5c1WiuM2pdA%40mail.gmail.com.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/AM0PR01MB61478359E40DF5C9521DE825F7D70%40AM0PR01MB6147.eurprd01.prod.exchangelabs.com.


RE: emailext using groovy-html.template with environment variables issue

2019-08-07 Thread Reinhold Füreder
Hi Amit,

(a) in your code/screenshot example the problem:
to: '${GERRIT_CHANGE_OWNER_EMAIL}',
[…]

in the to: section i want to use the env variable "GERRIT_CHANGE_OWNER_EMAIL" 
but it not passing the value  ( i tried also with env.GERRIT_CHANGE_OWNER_EMAIL 
and also /${env.GERRIT_CHANGE_OWNER_EMAIL}
… the problem is a Groovy one:

  *   Please replace the single quotes with double quotes to allow string 
interpolation


(b) And in the groovy html template code there are IMHO only certain variables 
explicitly injected:

  *   Based upon http://stackoverflow.com/a/9983405 and 
https://github.com/jenkinsci/email-ext-plugin/blob/master/src/main/java/hudson/plugins/emailext/plugins/content/ScriptContent.java
 please note the “binding.put(...)” calls, e.g.:
 *   build ... 
org.jenkinsci.plugins.workflow.job.WorkflowRun
 for Pipeline jobs
 *   project == 
build.getParent()
 ... 
org.jenkinsci.plugins.workflow.job.WorkflowJob
 - the job/project instance for this build
 *   it ... 
ScriptContentBuildWrapper(build)
 (internal ExtEmail class)
 *   rootUrl … Jenkins URL as set in your Jenkins configuration

HTH Reinhold

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/AM0PR01MB6147232554C60333C07B17DDF7D70%40AM0PR01MB6147.eurprd01.prod.exchangelabs.com.


RE: Pipeline: Expected call wound up catching different method

2019-07-30 Thread Reinhold Füreder
Thanks a lot for the clarification/enlightenment, Devin!


From: jenkinsci-users@googlegroups.com  On 
Behalf Of Devin Nusbaum
Sent: Dienstag, 30. Juli 2019 16:49
To: jenkinsci-users@googlegroups.com
Subject: Re: Pipeline: Expected call wound up catching different method

Sverre mentioned that checkUpstream and checkDownstream call “build” and 
“println”. Since “build” can be an async step if you pass "wait: true”, and I 
wasn’t sure exactly how they were using it, I recommended removing @NonCPS from 
those methods.

If checkUpstream and checkDownstream only use “build" in non-async mode, and 
“releaseUtility.getReleaseBranch” does not call any async Pipeline steps or 
other CPS-transformed code, then I think you should be able to annotate that 
method with @NonCPS in "vars/releaseUtility.groovy" and have everything work 
correctly.

I don’t think either solution is clearly best. I would avoid using @NonCPS 
unless you have a clear need for it (perhaps because of a bug with some Groovy 
feature specific to the CPS transformation, or because the overhead of the CPS 
transformation is causing problems), and even though steps like “echo” work 
fine inside of an @NonCPS method I think it’s a lot easier to just avoid using 
Pipeline steps inside of @NonCPS entirely.

Thanks,
Devin


On Jul 30, 2019, at 03:15, Reinhold Füreder 
mailto:r.fuere...@xortex.com>> wrote:

Sorry to bring this up again, but I am just curious:

Sverre wrote (a) „Both these methods [(checkUpstream and checkDownstream)] 
make[s] a call toreleaseUtility.getReleaseBranch.” and (b) that both are 
annotated with “@NonCPS” and (c) that the latter 
(releaseUtility.getReleaseBranch) is defined in “vars/releaseUtility.groovy“

And he also asks “I guess then getReleaseBranch needs to also be annotated with 
NonCPS.”

@Devin:

  *   Is annotating getReleaseBranch() with @NonCPS in 
“vars/releaseUtility.groovy“ section (1) allowed and (2) therefore the best 
solution?
  *   Or is getReleaseBranch()in “vars/releaseUtility.groovy“ section actually 
a proper pipeline step and so annotating with@NonCPS actually wrong, and so 
@NonCPS must also be removed from checkUpstream and checkDownstream as you 
suggested?

Thanks,
Reinhold


--
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
jenkinsci-users+unsubscr...@googlegroups.com<mailto:jenkinsci-users+unsubscr...@googlegroups.com>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/DB8PR01MB6156A8F569E89602288F1547F7DC0%40DB8PR01MB6156.eurprd01.prod.exchangelabs.com<https://groups.google.com/d/msgid/jenkinsci-users/DB8PR01MB6156A8F569E89602288F1547F7DC0%40DB8PR01MB6156.eurprd01.prod.exchangelabs.com?utm_medium=email_source=footer>.

--
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
jenkinsci-users+unsubscr...@googlegroups.com<mailto:jenkinsci-users+unsubscr...@googlegroups.com>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/1FDB7E46-771B-4018-A074-AF9702669F9A%40cloudbees.com<https://groups.google.com/d/msgid/jenkinsci-users/1FDB7E46-771B-4018-A074-AF9702669F9A%40cloudbees.com?utm_medium=email_source=footer>.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/AM0PR01MB614743FCD3E901FD29D73165F7DF0%40AM0PR01MB6147.eurprd01.prod.exchangelabs.com.


RE: Pipeline: Expected call wound up catching different method

2019-07-30 Thread Reinhold Füreder
Sorry to bring this up again, but I am just curious:

Sverre wrote (a) „Both these methods [(checkUpstream and checkDownstream)] 
make[s] a call to releaseUtility.getReleaseBranch.” and (b) that both are 
annotated with “@NonCPS” and (c) that the latter 
(releaseUtility.getReleaseBranch) is defined in “vars/releaseUtility.groovy“

And he also asks “I guess then getReleaseBranch needs to also be annotated with 
NonCPS.”

@Devin:

  *   Is annotating getReleaseBranch() with @NonCPS in 
“vars/releaseUtility.groovy“ section (1) allowed and (2) therefore the best 
solution?
  *   Or is getReleaseBranch()in “vars/releaseUtility.groovy“ section actually 
a proper pipeline step and so annotating with @NonCPS actually wrong, and so 
@NonCPS must also be removed from checkUpstream and checkDownstream as you 
suggested?

Thanks,
Reinhold

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/DB8PR01MB6156A8F569E89602288F1547F7DC0%40DB8PR01MB6156.eurprd01.prod.exchangelabs.com.


RE: Is pipeline timeout suppose to work?

2019-04-11 Thread Reinhold Füreder
Hi Kevin,

I have used “timeout” step in the past and as far as I can remember it worked 
as expected.

Note, however, that I may not have put the “node(…)” step inside the “timeout” 
step; not sure if that is of any relevance though…

HTH Reinhold


From: jenkinsci-users@googlegroups.com  On 
Behalf Of Kevin Chow
Sent: Mittwoch, 10. April 2019 20:17
To: Jenkins Users 
Subject: Re: Is pipeline timeout suppose to work?

Hi Jer,

I'd like to followup if you figured out how to do timeout with Jenkins Scripted 
Pipeline. I'm looking into a solution to resolve it.

I have something like but it doesn't work out for me.

timeout(5) {
node("docker") {
sh"""
//do something
"""
}
}


Thanks,

Kevin

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/VI1P190MB035763094F6CAA424C57F72F0%40VI1P190MB0111.EURP190.PROD.OUTLOOK.COM.
For more options, visit https://groups.google.com/d/optout.


RE: A pipeline throws random java.io.NotSerializableException

2019-04-05 Thread Reinhold Füreder
Hi Ivan,

Yep! I guess you are somewhere in your shared Jenkins pipeline library using 
sun.net.www.protocol.https.HttpsURLConnectionImpl – most likely because you are 
doing an URL request for e.g. a REST API call
=> extract that encapsulated logic into a dedicated method that returns 
something serializable (or primitive object) and annotate this method with 
@NonCPS

HTH Reinhold

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/VI1P190MB0111C4AB2409F465E1CF68A4F7510%40VI1P190MB0111.EURP190.PROD.OUTLOOK.COM.
For more options, visit https://groups.google.com/d/optout.


RE: Jenkins Pipeline: Variable expansion issues

2019-03-12 Thread Reinhold Füreder
Hi Mike,

it looks like the variables are actually strings with a line break at the end, 
and not integers?

HTH Reinhold

From: jenkinsci-users@googlegroups.com  On 
Behalf Of Mike Craig
Sent: Montag, 11. März 2019 23:33
To: Jenkins Users 
Subject: Jenkins Pipeline: Variable expansion issues

Hello,

The following snippet from my pipeline is acting very strangely, the values 
from the print statements are correct

  print "asgName: $asgName"
 print "asgMax: $asgMax"
 print "asgMin: $asgMin"
 asgIncrease = (asgMax * 2)
 print "Setting ASG size to ${asgIncrease}"
 sh ("aws autoscaling update-auto-scaling-group --min-size 
${asgMin} --max-size ${asgMax} --region ${region} --auto-scaling-group-name 
${asgName} ")

output


15:27:13  ecs_service_name: lab-us-west-2-lab-rat

[Pipeline] sh

15:27:14  + aws autoscaling describe-auto-scaling-groups --region us-west-2

15:27:14  + jq .AutoScalingGroupName

15:27:14  + jq '.AutoScalingGroups[]'

15:27:14  + jq 'select (.AutoScalingGroupName | contains 
("lab-us-west-2-lab-rat"))'

[Pipeline] sh

15:27:18  + aws autoscaling describe-auto-scaling-groups --region us-west-2

15:27:18  + jq 'select (.AutoScalingGroupName | contains 
("lab-us-west-2-lab-rat"))'

15:27:18  + jq .MaxSize

15:27:18  + jq '.AutoScalingGroups[]'

[Pipeline] sh

15:27:22  + jq 'select (.AutoScalingGroupName | contains 
("lab-us-west-2-lab-rat"))'

15:27:22  + jq .MinSize

15:27:22  + jq '.AutoScalingGroups[]'

15:27:22  + aws autoscaling describe-auto-scaling-groups --region us-west-2

[Pipeline] echo

15:27:26  asgName: "lab-us-west-2-lab-rat-serviceInstanceAutoscalingGroup"

15:27:26

[Pipeline] echo

15:27:26  asgMax: 1

15:27:26

[Pipeline] echo

15:27:26  asgMin: 1

15:27:26

[Pipeline] echo

15:27:26  Setting ASG size to 1

15:27:26  1

15:27:26

[Pipeline] sh

15:27:26  + aws autoscaling update-auto-scaling-group --min-size 1

15:27:27  usage: aws [options]   [ ...] 
[parameters]

15:27:27  To see help text, you can run:

15:27:27

15:27:27aws help

15:27:27aws  help

15:27:27aws   help

15:27:27  aws: error: argument --auto-scaling-group-name is required

2 things here,
1. the asgIncrease variable should evaluate to 2, as I'm doubling the original 
variable.
2 The line where the "aws autoscaling" command is executed does not expand and 
execute the entire line. I have tried hardcoding values here, and that seems to 
work, but how to use variables??


What am I doing wrong?

Thank you!




--
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/f6560954-54e3-4afd-a8cf-f76bd9de11c8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/VI1P190MB0111F889B7E1A8AF55D5EFACF7490%40VI1P190MB0111.EURP190.PROD.OUTLOOK.COM.
For more options, visit https://groups.google.com/d/optout.


RE: MissingMethodException while using shared libraries

2019-03-01 Thread Reinhold Füreder
Hi,

a naive quick guess is that you are using too much groovy, but Jenkins pipeline 
code is -- well -- not fully groovy…

=> Maybe try to replace the fields like:

 @Field final BitbucketBuildOperationsHandler bitbucketUtilities = new 
BitbucketBuildOperationsHandler(this,env)
… in “bitbucketUtilities.groovy” with explicitly instantiating it in each 
method, e.g.:

@NonCPS

def notifyBuildFail(String message, String displayName) {



//Remove

println "bitbucketUtilities global vars, env: "+env



validateCall(this, message, displayName)



BitbucketBuildOperationsHandler bitbucketUtilities = new 
BitbucketBuildOperationsHandler(this,env)

bitbucketUtilities.notifyBuildFail(message, displayName)

}

Please also note that in @NonCPS annotated methods you may not call pipeline 
steps AFAIK, “echo” step being a bit of an exception maybe?

HTH Reinhold

From: jenkinsci-users@googlegroups.com  On 
Behalf Of Kaliyug Antagonist
Sent: Freitag, 1. März 2019 08:51
To: Jenkins Users 
Subject: MissingMethodException while using shared libraries


Cloudbees 2.121.3.1



Partial Jenkinsfile of the main component that is failing viz. Alfaclient:

properties([parameters([string(defaultValue: "", description: "List of 
components", name: 'componentsToUpdate'),

string(defaultValue: 
"refs%2Fheads%2Fproject%2Fintegration", description: "BuildInfo CommitID", 
name: 'commitId'),

string(defaultValue: "", description: "Tag to release, 
e.g. 1.1.0-integration", name: 'releaseTag'),

string(defaultValue: "", description: "Forked buildInfo 
repo. Be aware right commit ID!!!", name: 'fork')]),

[$class: 'BuildDiscarderProperty', strategy: [$class: 
'LogRotator', artifactDaysToKeepStr: '', artifactNumToKeepStr: '', 
daysToKeepStr: '7', numToKeepStr: '5']],

disableConcurrentBuilds()])



@Library(['jenkins-shared-utilities@integration/CICD-344-refactor-bitbucket-notify-handler','jenkins-shared-stages@integration/CICD-344-refactor-bitbucket-notify-handler','jenkins-shared-pipelines@integration/CICD-344-refactor-bitbucket-notify-handler'])
 _

.

.

.

returnValue = componentPipeline {

componentsToUpdate = rewriteDependencies

commitId = buildInfoCommitId

runOnForkedRepo = forkedRepo

}



The componentPipeline in the above code is a scripted pipeline located in vars 
of jenkins-shared-pipelines The partial Jenkinsfile(which doesn't do much!) of 
jenkins-shared-pipelines

#!groovy



@Library(['jenkins-shared-utilities@integration/CICD-344-refactor-bitbucket-notify-handler','jenkins-shared-stages@integration/CICD-344-refactor-bitbucket-notify-handler'])
 _



Partial code for componentPipeline:

def call(body) {

def config = [:]

body.resolveStrategy = Closure.DELEGATE_FIRST

def componentName = null

body.delegate = config

body()

def rewriteDependency = config.componentsToUpdate

def buildInfoCommitId = config.commitId

def forkedBuildInfo = config.runOnForkedRepo



def PIPELINE_NAME = "Component Pipeline"

.

.

.

setupSharedUtils(callingScript: this)

.

.

.

def build_status = "ok"

stage(CLEAN_STAGE) {

.

.

.

bitbucketUtilities.notifyBuildStart("Build ${env.BUILD_ID} started 
at ${env.BUILD_TIMESTAMP}", PIPELINE_NAME)



}

stage(GET_BUILD_INFO) {

.

.

.

build_status = "${COMPILE_STAGE} failed in build ${env.BUILD_ID} 
with exit code ${exit_code}"

bitbucketUtilities.notifyBuildFail(build_status, PIPELINE_NAME)



}



}



Now comes the main library viz. jenkins-shared-utilities. It has the following 
structure:



vars containing scripts that would act as global variables for components like 
Alfaclient.

bitbucketUtilities.groovy

import groovy.transform.Field

import com.jenkins.utilities.bitbucket.*

import com.cloudbees.groovy.cps.NonCPS



@Field final String STEP_NAME = getClass().getName()

@Field final BitbucketBuildOperationsHandler bitbucketUtilities = new 
BitbucketBuildOperationsHandler(this,env)



@NonCPS

def notifyBuildStart(String message, String displayName) {



//Remove

println "bitbucketUtilities global vars, env: "+env

validateCall(this, message, displayName)



bitbucketUtilities.notifyBuildStart(message, displayName)

}



@NonCPS

def notifyBuildSuccess(String message, String displayName) {



//Remove

println "bitbucketUtilities global vars, env: "+env



 validateCall(this, message, displayName)



bitbucketUtilities.notifyBuildSuccess(message, displayName)

}



@NonCPS

def notifyBuildFail(String message, String displayName) {



//Remove

println "bitbucketUtilities global vars, env: "+env



validateCall(this, message, displayName)




RE: How to call jenkins custom plugin from Pipeline

2019-02-08 Thread Reinhold Füreder
Hi Prasad,

look at the stacktrace:
at WorkflowScript.run(WorkflowScript:2)
then you see why:

  *   On line #2
checkout filesystem(clearWorkspace: false, copyHidden: false, path: 
'C:\\java-junit-sample-master\\java-junit-sample-master')

  *   … is maybe completely wrong, or in wrong scope, but definitely also not 
within a node{ … } block

HTH Reinhold

From: prasad.pofali via Jenkins Users 
Sent: Freitag, 8. Februar 2019 11:57
To: Jenkins Users 
Subject: How to call jenkins custom plugin from Pipeline

I am referring a custom Jenkins plugin from here 
(https://github.com/pritic/testExample)

This plugin is working fine with the traditional approach of building jenkins 
jobs.

When I tried to call this plugin using a declarative pipeline, it caused an 
exception. The following is the pipeline code.

import hudson.model.*
checkout filesystem(clearWorkspace: false, copyHidden: false, path: 
'C:\\java-junit-sample-master\\java-junit-sample-master')

pipeline {
agent any
stages {
stage('Build and Run Tests') {
steps {
  node {
  step([$class : 'TestExamplePublisher', applications:[name: 
'PrasadP']])
  }
}
}
}
}

Below is the exception stacktrace:

[Pipeline] End of Pipeline
org.jenkinsci.plugins.workflow.steps.MissingContextVariableException: Required 
context class hudson.FilePath is missing
at 
org.jenkinsci.plugins.workflow.steps.StepDescriptor.checkContextAvailability(StepDescriptor.java:260)
at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:262)
at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:178)
at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:122)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1213)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022)
at 
org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:42)
at 
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at 
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:157)
at 
org.kohsuke.groovy.sandbox.GroovyInterceptor.onMethodCall(GroovyInterceptor.java:23)
at 
org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:155)
at 
org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:142)
at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:155)
at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:159)
at 
com.cloudbees.groovy.cps.sandbox.SandboxInvoker.methodCall(SandboxInvoker.java:17)
at WorkflowScript.run(WorkflowScript:2)
at ___cps.transform___(Native Method)
at 
com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:57)
at 
com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:109)
at 
com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:82)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at 
com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
at 
com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:60)
at 
com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:109)
at 
com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:82)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at 
com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
at 
com.cloudbees.groovy.cps.impl.CollectionLiteralBlock$ContinuationImpl.dispatch(CollectionLiteralBlock.java:55)
at 
com.cloudbees.groovy.cps.impl.CollectionLiteralBlock$ContinuationImpl.item(CollectionLiteralBlock.java:45)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at 

RE: Pipeline: Stage View has wrong build status

2018-12-19 Thread Reinhold Füreder
I also remember to have seen this symptom very few times in the last months; 
IIRC a jenkins (master) restart actually “fixed” the bad visualization, but of 
course that is by no means a fix…

Reinhold

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/AM4P190MB00337C8F54629CC32F31B6AAF7BF0%40AM4P190MB0033.EURP190.PROD.OUTLOOK.COM.
For more options, visit https://groups.google.com/d/optout.


RE: Console full log is truncated

2018-12-11 Thread Reinhold Füreder
Hello,

just a naive guess: it might be due to 
https://issues.jenkins-ci.org/browse/JENKINS-54752 or Ansi-Color plugin 
v0.6.0?

HTH Reinhold

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/DB6P190MB04856A831E1CE8644779108CF7A60%40DB6P190MB0485.EURP190.PROD.OUTLOOK.COM.
For more options, visit https://groups.google.com/d/optout.


RE: Blank HTML report in Jenkin's left hand side bar for Performance Center Reports

2018-09-04 Thread Reinhold Füreder
Hi Mukesh,

I guess according to e.g. https://jenkins.io/doc/pipeline/steps/htmlpublisher/

  *   “reportDir” should not be an empty string and be relative to workspace
  *   “reportFiles” should not be an absolute path, but relative to “reportDir”

So maybe try this:
publishHTML([…, reportDir: 'archive/performanceTestsReports/pcRun ', 
reportFiles: 'Report.html', …])

HTH Reinhold


From: jenkinsci-users@googlegroups.com  On 
Behalf Of Mukesh Dhingra
Sent: Sonntag, 2. September 2018 19:48
To: Jenkins Users 
Subject: Blank HTML report in Jenkin's left hand side bar for Performance 
Center Reports

Hi

I am using a pipeline to connect Performance center from Jenkins. I am able to 
run the tests successfully, however unable to view the report on left hand side 
console in Jenkins. Its appearing blank. Please suggest if someone has any clue 
about this.

Jenkin version:- 2.107.3
Microfocus Automation Plugin: 5.3

Pipeline Job:-
stage('RunPCTESTS'){ // The stage name

node('master'){ //  The name of the node in which to run the test.
def perfResultPath
def currentBuildNo = env.BUILD_NUMBER
println currentBuildNo

pcBuild HTTPSProtocol: false, addRunToTrendReport: 'NO_TREND', almDomain: 
'DEFAULT', almPassword: 'x', almProject: 'Test', almUserName: 'temp1', 
autoTestInstanceID: 'MANUAL', description: '', pcServerName: 
'nclpwnqwebx.cmp.aon.net', postRunAction: 'COLLATE_AND_ANALYZE', 
proxyOutPassword: '', proxyOutURL: '', proxyOutUser: '', serverAndPort: 
'http://localhost:8080', statusBySLA: false, testId: '46', testInstanceId: 
'24', timeslotDurationHours: '0', timeslotDurationMinutes: '30', trendReportId: 
'', vudsMode: false

  perfResultPath= 'C:\\Program Files 
(x86)\\Jenkins\\jobs\\RAF_PT_Pipeline\\builds\\'+currentBuildNo+'\\archive\\performanceTestsReports\\pcRun'

println perfResultPath

publishHTML([allowMissing: false, alwaysLinkToLastBuild: false, keepAll: true, 
reportDir: '', reportFiles: perfResultPath+'\\Report.html', reportName: 
'Performance Report', reportTitles: 'HTML Performance Report'])


}
}
--
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/b9315515-45cd-49b4-80e2-208a958f1573%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/AM4P190MB006538C5FE36D332B5B02E67F7020%40AM4P190MB0065.EURP190.PROD.OUTLOOK.COM.
For more options, visit https://groups.google.com/d/optout.


RE: Pipeline - missing arg causes error: java.io.NotSerializableException: org.codehaus.groovy.util.FastArray

2018-05-25 Thread Reinhold Füreder
Hello Connor,

maybe this gives you some more background on the problem:

  *   https://github.com/jenkinsci/workflow-cps-plugin/blob/master/README.md
  *   https://github.com/jenkinsci/pipeline-plugin/blob/master/TUTORIAL.md

Hints: @NonCPS annotation vs. using other (by groovy CPS) supported data types

HTH Reinhold


-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/VI1P190MB0047D37941BF5A9408F920BEF7690%40VI1P190MB0047.EURP190.PROD.OUTLOOK.COM.
For more options, visit https://groups.google.com/d/optout.


RE: 'Project name' field missing

2018-05-15 Thread Reinhold Füreder
Hi Ewelina,

I think quite recently an explicit “Rename” link (below “Configure” link on the 
left) was introduced instead.

HTH Reinhold

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/VI1P190MB0047ECADA96CC33246F41FBDF7930%40VI1P190MB0047.EURP190.PROD.OUTLOOK.COM.
For more options, visit https://groups.google.com/d/optout.


RE: How to trigger nightly build via blue ocean?

2018-05-08 Thread Reinhold Füreder
Hi Zack,

I think “cron” trigger according to 
https://jenkins.io/doc/book/pipeline/syntax/#triggers might be what you are 
looking for?

Please note that the jenkins pipeline documentation is really helpful => just 
try to use it…

HTH Reinhold

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/VI1P190MB0255305A1652CAD13BD8D2D1F79A0%40VI1P190MB0255.EURP190.PROD.OUTLOOK.COM.
For more options, visit https://groups.google.com/d/optout.


RE: How to use Folder-level Shared Libraries in Declarative Jenkinsfile

2018-04-27 Thread Reinhold Füreder
Hi Michael,

I think “folder-level shared libraries” mean that you can configure shared 
pipeline libraries specific to folders, so a Jenkins folder has in its 
configuration a section called “Pipeline Libraries” with the hint “Sharable 
libraries available to any Pipeline jobs inside this folder. These libraries 
will be untrusted, meaning their code runs in the Groovy sandbox.”

HTH Reinhold

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/VI1P190MB02551511C124DEDADC0B6456F78D0%40VI1P190MB0255.EURP190.PROD.OUTLOOK.COM.
For more options, visit https://groups.google.com/d/optout.


RE: RemoteInvocationHandler statistics and an exception

2018-04-17 Thread Reinhold Füreder
Hi David,

I think the exception is due to 
https://issues.jenkins-ci.org/browse/JENKINS-50748 and is  allegedly fixed in 
Jenkins 2.117 (https://jenkins.io/changelog/).

HTH Reinhold

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/VI1P190MB025595BA3A0D32F14C0A73F0F7B70%40VI1P190MB0255.EURP190.PROD.OUTLOOK.COM.
For more options, visit https://groups.google.com/d/optout.


RE: "Replay" button availability

2018-04-12 Thread Reinhold Füreder
Hi (and replying to myself),

I am very, very, very sure (but admittedly still not certain) now that this is 
a new behavior – and I dare to call it a bug: any other opinions?

Can it be that it can only “replay” builds anymore (?) that were triggered 
after the last Jenkins (master) restart?

Thanks,
Reinhold

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/VI1P190MB0255DC0D3BDD3383DCE53F85F7BC0%40VI1P190MB0255.EURP190.PROD.OUTLOOK.COM.
For more options, visit https://groups.google.com/d/optout.


RE: BlueOcean observations from user

2018-04-12 Thread Reinhold Füreder
Perfect timing: Blue Ocean 1.5.0 is shown as available in plugin manager since 
a few hours or minutes…

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/VI1P190MB0255F1226BF79CE24F9BD5DDF7BC0%40VI1P190MB0255.EURP190.PROD.OUTLOOK.COM.
For more options, visit https://groups.google.com/d/optout.


RE: [DISCUSS] Change Jenkins default logging format

2018-04-12 Thread Reinhold Füreder
Hi Baptiste,

Definitely +1! That is I wish to see the default logging format changed to a 
one-liner.


This is more or less what in our Ansible based provisioning of Jenkins setup is 
already done:

# See 
http://stackoverflow.com/questions/194765/how-do-i-get-java-logging-output-to-appear-on-a-single-line
- name: setup | Configure log output format
  lineinfile: dest=/etc/default/jenkins
  insertafter='^JAVA_ARGS=.*'
  regexp='^JAVA_ARGS.*java.util.logging.*'
  line="JAVA_ARGS=\"$JAVA_ARGS 
-Djava.util.logging.SimpleFormatter.format='%1\$tY-%1\$tm-%1\$td 
%1\$tH:%1\$tM:%1\$tS %4\$4s [%2\$s]   %5\$s%6\$s%n'\""


Regards,
Reinhold

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/VI1P190MB0255607BD409E578C2CCB3D1F7BC0%40VI1P190MB0255.EURP190.PROD.OUTLOOK.COM.
For more options, visit https://groups.google.com/d/optout.


"Replay" button availability

2018-04-12 Thread Reinhold Füreder
Hi,

Since (felt) very recently the "Replay" button is not shown anymore for 
slightly older (pipeline) builds. What does it depend on? It does not seem to 
be available based on (a) work day, or (jenkins log inspired suspicions) (b) 
jobAnalytics or (c) Workspace clean-up.

Maybe it always behaved like this and I have really never ever tried to replay 
a slightly older build. Which I doubt (at the moment).

Thanks,
Reinhold

P.S.: Experienced when using Jenkins core 2.115 and most other plugins being 
up-to-date (e.g. workflow-job updated from 2.17 => 2.18, and workflow-cps 
updated from 2.45 => 2.47)
P.P.S.: sorry for kind of cross-posting due to being impatient after getting no 
response from http://webchat.freenode.net/?channels=jenkins

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/VI1P190MB0255030307B2E6C09A3FCE98F7BC0%40VI1P190MB0255.EURP190.PROD.OUTLOOK.COM.
For more options, visit https://groups.google.com/d/optout.


RE: Extension points for declarative pipeline in shared library

2018-04-10 Thread Reinhold Füreder
@Francois: Thanks for sharing your approach (that did not come to my mind to be 
honest).

Just for the sake of completeness and kind of praising Jenkins development 
listening to the needs of us users, please have a look at some of the new 
features for declarative pipelines just published/announced yesterday: 
https://jenkins.io/blog/2018/04/09/whats-in-declarative/ might make such 
(real-world) ideas easier or more straight forward to implement, I think.

HTH Reinhold

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/VI1P190MB0255613D73931F028A0E795FF7BE0%40VI1P190MB0255.EURP190.PROD.OUTLOOK.COM.
For more options, visit https://groups.google.com/d/optout.


RE: Extension points for declarative pipeline in shared library

2018-03-20 Thread Reinhold Füreder
Hello Francois,

I think this -- still rather small amount of additional flexibility -- already 
asks for scripted pipelines instead of declarative ones (cf. 
https://issues.jenkins-ci.org/browse/JENKINS-46547).

At least for now, but I guess/assume not just for now… (Although I just 
stumbled over https://issues.jenkins-ci.org/browse/JENKINS-42224 “Need ability 
to create reusable chunks of Declarative Pipeline”…)

Of course, scripted pipelines within shared pipelines allow for even more fancy 
and flexible stuff whilst providing the same API for usage in Jenkinsfile, so 
from the perspective of the users it may not make any difference.

Regards,
Reinhold

P.S.: Nonetheless I therefore hope that (really) all cool features from 
declarative pipelines will be available to scripted ones too: hm, admittedly at 
the moment only https://issues.jenkins-ci.org/browse/JENKINS-47286 “Support 
skipping stages in scripted pipelines for nice visualization in blue ocean and 
classic UI stage view” comes to my mind…

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/VI1P190MB0255CB3410257449E6D3666AF7AB0%40VI1P190MB0255.EURP190.PROD.OUTLOOK.COM.
For more options, visit https://groups.google.com/d/optout.


RE: Pipeline: Resource Locking Plugin hangs

2018-03-08 Thread Reinhold Füreder
Very naïve thought(s):

While “Do not know why nodeName1 acquired the lock before nodeName released.“ 
might be just a matter of output flushing/buffering, “The entire build hangs 
and goes no further.” sounds really frightening to me.

Maybe it is the usage of lock inside parallel step and/or some CPS 
transformation reason, or some little resource misconfiguration issue!?

Ignoring CPS transformations (due to parallel step) I assume/hope the lock 
plugin does unit testing the “normal” parallelization usage of locking 
resources?

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/VI1P190MB025507E38826DF5579877B8CF7DF0%40VI1P190MB0255.EURP190.PROD.OUTLOOK.COM.
For more options, visit https://groups.google.com/d/optout.


RE: How to keep a running docker container after a build fails?

2018-02-13 Thread Reinhold Füreder
Hi aps,

Just in case the problem is still there and to avoid a misunderstanding:

Based on (a) Victor’s hint “tr[y] with the docker.inside syntax […] It might 
give you the chance to debug it somehow.” and (b) your own comment “I'm really 
surprised you can't pause the build”:

docker.image(…).inside(…) {
  sh ‘’

  // And now “workaround” to pause the build to allow connecting to the still 
running Docker container:
  input(message: "Continue?")
}

Due to the “input” step the pipeline is then pausing and allows you to e.g.:

...@jenkins:...$ docker ps -a
CONTAINER IDIMAGE   COMMAND CREATED 
STATUS  PORTS   NAMES
51c00502c727acme/...:5"cat"   20 seconds ago  Up 20 
seconds   zealous_thompson
...@jenkins:...$ docker exec -it 51c00502c727 /bin/bash
jenkins@51c00502c727:$ # Now you are in the running Docker 
container…

HTH Reinhold

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/VI1P190MB0255001969FC97F8F4285795F7F60%40VI1P190MB0255.EURP190.PROD.OUTLOOK.COM.
For more options, visit https://groups.google.com/d/optout.


RE: Resuming of pipelines vs. docker.image(...).inside(...)?

2018-02-05 Thread Reinhold Füreder
I now dared to file https://issues.jenkins-ci.org/browse/JENKINS-49365

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/AM4P190MB0067C5ED6DF10CB83DC92A70F7FE0%40AM4P190MB0067.EURP190.PROD.OUTLOOK.COM.
For more options, visit https://groups.google.com/d/optout.


RE: Release notes for Blue Ocean 1.4??

2018-01-25 Thread Reinhold Füreder
I am with David and dare to stress that problem too…

(sorry for being cheeky)


From: jenkinsci-users@googlegroups.com 
[mailto:jenkinsci-users@googlegroups.com] On Behalf Of David Aldrich
Sent: Donnerstag, 25. Jänner 2018 14:03
To: jenkinsci-users@googlegroups.com
Subject: RE: Release notes for Blue Ocean 1.4??


> The Jira links are known to be broken due to the caching layer in front on

> Confluence (uncached page access works). You can still click them, but it just

> won't show the summary.



This does make release notes very hard to read. The Blue Ocean 1.4.0 change log 
has many issues and there is no text to help identify which ones may be 
interesting.



[cid:image002.png@01D395E8.9660E480]
--
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/577a93584a7743a6a89ee617034984ab%40EUX13SRV1.EU.NEC.COM.
For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/AM4P190MB0067E345A0D05C8275692FA4F7E10%40AM4P190MB0067.EURP190.PROD.OUTLOOK.COM.
For more options, visit https://groups.google.com/d/optout.


Resuming of pipelines vs. docker.image(...).inside(...)?

2018-01-24 Thread Reinhold Füreder
.plugins.docker.workflow.Docker$Image.inside(jar:file:/var/lib/jenkins/plugins/docker-workflow/WEB-INF/lib/docker-workflow.jar!/org/jenkinsci/plugins/docker/workflow/Docker.groovy:129)
  at DSL.withDockerContainer(Native Method)
  at 
org.jenkinsci.plugins.docker.workflow.Docker$Image.inside(jar:file:/var/lib/jenkins/plugins/docker-workflow/WEB-INF/lib/docker-workflow.jar!/org/jenkinsci/plugins/docker/workflow/Docker.groovy:128)
  at 
org.jenkinsci.plugins.docker.workflow.Docker.node(jar:file:/var/lib/jenkins/plugins/docker-workflow/WEB-INF/lib/docker-workflow.jar!/org/jenkinsci/plugins/docker/workflow/Docker.groovy:63)
  at 
org.jenkinsci.plugins.docker.workflow.Docker$Image.inside(jar:file:/var/lib/jenkins/plugins/docker-workflow/WEB-INF/lib/docker-workflow.jar!/org/jenkinsci/plugins/docker/workflow/Docker.groovy:116)
  at 
com.ACME.php.PHPUnitViaGradle.execute(file:/var/lib/jenkins/jobs/ACME-Pipeline%20(Branch)/builds/660/libs/ACME-shared-library/src/com/ACME/php/PHPUnitViaGradle.groovy:26)
  at ACME.executePHPUnitTests(/var/lib/jenkins/jobs/ACME-Pipeline 
(Branch)/builds/660/libs/ACME-shared-library/vars/ACME.groovy:191)
  at WorkflowScript.run(WorkflowScript:65)
  at 
com.ACME.Workspace.prepare(file:/var/lib/jenkins/jobs/ACME-Pipeline%20(Branch)/builds/660/libs/ACME-shared-library/src/com/ACME/Workspace.groovy:53)
  at DSL.ws(Native Method)
  at 
com.ACME.Workspace.prepare(file:/var/lib/jenkins/jobs/ACME-Pipeline%20(Branch)/builds/660/libs/ACME-shared-library/src/com/ACME/Workspace.groovy:30)
  at ACME.wsWithArtifacts(/var/lib/jenkins/jobs/ACME-Pipeline 
(Branch)/builds/660/libs/ACME-shared-library/vars/ACME.groovy:164)
  at WorkflowScript.run(WorkflowScript:64)
  at DSL.node(running on )
  at WorkflowScript.run(WorkflowScript:55)
  at ACME.skipableStage(/var/lib/jenkins/jobs/ACME-Pipeline 
(Branch)/builds/660/libs/ACME-shared-library/vars/ACME.groovy:76)
  at DSL.stage(Native Method)
  at ACME.skipableStage(/var/lib/jenkins/jobs/ACME-Pipeline 
(Branch)/builds/660/libs/ACME-shared-library/vars/ACME.groovy:67)
  at ACME.skipableStage(/var/lib/jenkins/jobs/ACME-Pipeline 
(Branch)/builds/660/libs/ACME-shared-library/vars/ACME.groovy:57)
  at ACME.skipableStage(/var/lib/jenkins/jobs/ACME-Pipeline 
(Branch)/builds/660/libs/ACME-shared-library/vars/ACME.groovy:52)
  at WorkflowScript.run(WorkflowScript:53)
  at 
com.ACME.Build.build(file:/var/lib/jenkins/jobs/ACME-Pipeline%20(Branch)/builds/660/libs/ACME-shared-library/src/com/ACME/Build.groovy:42)
  at ACME.build(/var/lib/jenkins/jobs/ACME-Pipeline 
(Branch)/builds/660/libs/ACME-shared-library/vars/ACME.groovy:48)
  at WorkflowScript.run(WorkflowScript:19)


Not sure if it is relevant, but the Jenkins setup is very up to date: Jenins 
v2.103 with very recent update of these plugins (
---> Plugins installed:
...
workflow-api:2.25
workflow-cps:2.43
workflow-durable-task-step:2.18
workflow-job:2.17
workflow-multibranch:2.17
workflow-support:2.17
..., and thus this output at the top of the build log:

Running in Durability level: MAX_SURVIVABILITY


Is this supposed to work? If so, what am I missing?
Or can it work at all?

Thanks,
    Reinhold


[balken_print]
Reinhold Füreder - XORTEX eBusiness GmbH
Testautomatisierung und Qualitätssicherung
Veldner Str. 29 | A-4120 Neufelden
Tel: +43 7282 20797 4425 | Fax: +43 7282 20797 4490
Mail: r.fuere...@xortex.com<mailto:r.fuere...@xortex.com>
Web: https://xortex.com

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/AM4P190MB00672EC82104B88110422482F7E20%40AM4P190MB0067.EURP190.PROD.OUTLOOK.COM.
For more options, visit https://groups.google.com/d/optout.


RE: "ERROR: missing workspace" and chaining builds

2017-12-19 Thread Reinhold Füreder
Hi Vincent,

does it work most of the times? If so, could it be related to 
https://issues.jenkins-ci.org/browse/JENKINS-27329 “WorkspaceCleanupThread may 
delete workspaces of running jobs”?

HTH Reinhold

From: jenkinsci-users@googlegroups.com 
[mailto:jenkinsci-users@googlegroups.com] On Behalf Of Vincent Massol
Sent: Dienstag, 19. Dezember 2017 14:07
To: Jenkins Users 
Subject: Re: "ERROR: missing workspace" and chaining builds

Could it be that the workspace is deleted once the node() ends and that it 
happens that some other node() calls happen to run on the same node and that 
Jenkins would allocate a workspace only once per job? That would be strange 
though.

Thanks
-Vincent

On Tuesday, December 19, 2017 at 2:01:32 PM UTC+1, Vincent Massol wrote:
Hi guys,

I regularly get the following errors in our Jenkins pipeline on XWiki:

ERROR: missing workspace 
/home/hudsonagent/jenkins_root/workspace/XWiki_xwiki-platform_master-ZGNMAWOYB6APYNMYWF7HH475RM4M6C6RE2U76Y5M5RWNQJWOLFGA
 on agent-2-1

[main] Caused by: java.io.IOException: 
/home/hudsonagent/jenkins_root/workspace/XWiki_xwiki-platform_master-ZGNMAWOYB6APYNMYWF7HH475RM4M6C6RE2U76Y5M5RWNQJWOLFGA/xwiki-platform-core/xwiki-platform-flamingo/xwiki-platform-flamingo-themes/xwiki-platform-flamingo-theme-test/xwiki-platform-flamingo-theme-test-tests/target/xwiki
 doesn't exist.

Our Jenkins file does this:

stage ('Platform Builds') {
  parallel(
'main': {
  build(
name: 'Main',
goals: 'clean deploy',
profiles: 'legacy,integration-tests,office-tests,snapshotModules',
properties: '-Dxwiki.checkstyle.skip=true 
-Dxwiki.surefire.captureconsole.skip=true -Dxwiki.revapi.skip=true'
  )
  build(
name: 'Distribution',
goals: 'clean deploy',
profiles: 'legacy,integration-tests,office-tests,snapshotModules',
pom: 'xwiki-platform-distribution/pom.xml'
  )
  build(), ...
  }, ...

(Full file here: 
https://github.com/xwiki/xwiki-platform/blob/40cf4cf65e73728d53ee30ffcabd1534640dc9c5/Jenkinsfile#L26
 )

And build() is running Maven on a node() (xwikiBuild() is pipeline library 
running Maven):

def build(map)
{
  node {
xwikiBuild(map.name) {
...
}

  }
}

In this situation, do you see any reason for Jenkins to delete a workspace on 
"main" and a reason for each node() call to not request a new workspace? So in 
short I guess I'm asking for some clarification on when workspaces are 
initialized.

Thanks!
-Vincent


--
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/e9c23914-c1cc-43db-86b2-e30c06d70583%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/AM4P190MB00678115CADD952751D58990F70F0%40AM4P190MB0067.EURP190.PROD.OUTLOOK.COM.
For more options, visit https://groups.google.com/d/optout.


RE: Jenkins init.groovy compilation

2017-12-18 Thread Reinhold Füreder
Hi Jason,

yes, I remember stumbling over this as well.

Partially I have actually uses a workaround for that compilation failure: 
However, I am not sure it is worth it – because it is based on using 
reflection, e.g.:

def instance = Jenkins.getInstance()
…
// LDAPSecurityRealm class depends on "LDAP" plugin => use reflection for 
creation:
def ldapSecurityRealmClass = 
this.class.classLoader.loadClass('hudson.security.LDAPSecurityRealm')
SecurityRealm ldapRealm = ldapSecurityRealmClass.newInstance(server, 
rootDN, userSearchBase, userSearch, groupSearchBase, managerDN, 
managerPassword, inhibitInferRootDN)
instance.setSecurityRealm(ldapRealm)
instance.save()


And later on, IIRC, I mostly “only” relied on the init scripts (one for each 
responsibility “area”) checking whether or not a restart due to plugin 
installation/updates is still pending based on a kind of marker file (and 
ignoring compilation failures):

def restartFile = new File(instance.getRootDir(), "JenkinsRestartByInitScript")
if (restartFile.exists()) {
  println "--> Jenkins restart is pending: skipping this hook script"
  return
}
// Here follows the logic like setting up the LDAP security realm…


HTH -- although this is not a real solution,
Reinhold

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/AM4P190MB00677F1A1C76C862343A189EF70F0%40AM4P190MB0067.EURP190.PROD.OUTLOOK.COM.
For more options, visit https://groups.google.com/d/optout.