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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/DB8PR01MB6156A8F569E89602288F1547F7DC0%40DB8PR01MB6156.eurprd01.prod.exchangelabs.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/1FDB7E46-771B-4018-A074-AF9702669F9A%40cloudbees.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/AM0PR01MB614743FCD3E901FD29D73165F7DF0%40AM0PR01MB6147.eurprd01.prod.exchangelabs.com.


Re: Windows 7 Agents (slaves) via SSH

2019-07-30 Thread Mark Waite
On Tue, Jul 30, 2019 at 4:35 PM Mark Waite 
wrote:

> I launch my Windows 10 ssh agents using the instructions from the
> ssh-slaves plugin page:
>
>
> https://github.com/jenkinsci/ssh-slaves-plugin/blob/master/doc/CONFIGURE.md#launch-windows-slaves-using-microsoft-openssh
>
> They use the Microsoft OpenSSH server on Windows 10.
>
> I launch JNLP Windows agents with the following batch script:
>

I launch *Windows agents* from the Windows Desktop (calling them JNLP in
that case seems like a misnomer).  They are not using "Java Web Start" to
launch.  They are launched from a batch file.


> @ECHO ON
> CD %HOME%\bin
> CALL clean-temp-dirs
> CD %TEMP%
> RMDIR /S/Q .
> C:
> CD C:\J
> ROBOCOPY %HOME%\bin . agent.jar
> SET JAVA_HOME=C:\Users\MarkE\tools\jdk8u222-b10
> SET PATH=%JAVA_HOME%\bin;%PATH%
> set SECRET=the-secret-has-been-removed-for-this-email
> java -jar agent.jar -jnlpUrl
> http://mark-pc2.markwaite.net:8080/computer/cb-pc/slave-agent.jnlp
> -secret %SECRET%
>
>
> On Tue, Jul 30, 2019 at 11:39 AM Steve K 
> wrote:
>
>>
>> Thanks once again Mark.
>> May I bug you for some more info?  I was really hoping to answer this on
>> my own, but I feel like I'm chasing my tail.  Whenever I do searches for
>> Jenkins agent launch methods, I'm predominantly directed to a description
>> of JNLP usage or, to a lesser extent, SSH; neither of which I want for the
>> Win 7 machines.
>> Could you please provide a sample script that you leverage?
>> That would be greatly 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/68d09b75-bd6f-4ec8-afdf-000efe443fdb%40googlegroups.com
>> 
>> .
>>
>
>
> --
> Thanks!
> Mark Waite
>


-- 
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/CAO49JtGGuPRFWWhCtdBqPFQJ7GVyh33xXXVnmqS-WROJcRM1Ww%40mail.gmail.com.


Re: Windows 7 Agents (slaves) via SSH

2019-07-30 Thread Mark Waite
I launch my Windows 10 ssh agents using the instructions from the
ssh-slaves plugin page:

https://github.com/jenkinsci/ssh-slaves-plugin/blob/master/doc/CONFIGURE.md#launch-windows-slaves-using-microsoft-openssh

They use the Microsoft OpenSSH server on Windows 10.

I launch JNLP Windows agents with the following batch script:

@ECHO ON
CD %HOME%\bin
CALL clean-temp-dirs
CD %TEMP%
RMDIR /S/Q .
C:
CD C:\J
ROBOCOPY %HOME%\bin . agent.jar
SET JAVA_HOME=C:\Users\MarkE\tools\jdk8u222-b10
SET PATH=%JAVA_HOME%\bin;%PATH%
set SECRET=the-secret-has-been-removed-for-this-email
java -jar agent.jar -jnlpUrl
http://mark-pc2.markwaite.net:8080/computer/cb-pc/slave-agent.jnlp -secret
%SECRET%


On Tue, Jul 30, 2019 at 11:39 AM Steve K 
wrote:

>
> Thanks once again Mark.
> May I bug you for some more info?  I was really hoping to answer this on
> my own, but I feel like I'm chasing my tail.  Whenever I do searches for
> Jenkins agent launch methods, I'm predominantly directed to a description
> of JNLP usage or, to a lesser extent, SSH; neither of which I want for the
> Win 7 machines.
> Could you please provide a sample script that you leverage?
> That would be greatly 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/68d09b75-bd6f-4ec8-afdf-000efe443fdb%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/CAO49JtEVOD_Dp3BnfYzRBv-_00dXjdLftptREcMnU669z0EHAw%40mail.gmail.com.


Re: Windows 7 Agents (slaves) via SSH

2019-07-30 Thread Steve K

Win 7 64 bit.

>
>>

-- 
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/6461127a-bf10-4c23-ab5c-3a99f280da45%40googlegroups.com.


Issue with cps-method-mismatches

2019-07-30 Thread Stefan.Rademacher
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/8bd802501e9543efbe44d36fbd8fbff1%40tk.de.


Re: Windows 7 Agents (slaves) via SSH

2019-07-30 Thread Slide
The Chocolatey package for OpenSSH says that it should work on Windows 7
64-bit. I may have missed an earlier email, are your systems 32 or 64-bit
systems?

On Tue, Jul 30, 2019, 10:39 Steve K  wrote:

>
> Thanks once again Mark.
> May I bug you for some more info?  I was really hoping to answer this on
> my own, but I feel like I'm chasing my tail.  Whenever I do searches for
> Jenkins agent launch methods, I'm predominantly directed to a description
> of JNLP usage or, to a lesser extent, SSH; neither of which I want for the
> Win 7 machines.
> Could you please provide a sample script that you leverage?
> That would be greatly 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/68d09b75-bd6f-4ec8-afdf-000efe443fdb%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/CAPiUgVcFKQx9XC0MVQ6YWokWaRuGUNCag%3DucrY3w1o4cTknWQg%40mail.gmail.com.


Re: Windows 7 Agents (slaves) via SSH

2019-07-30 Thread Steve K

Thanks once again Mark.
May I bug you for some more info?  I was really hoping to answer this on my 
own, but I feel like I'm chasing my tail.  Whenever I do searches for 
Jenkins agent launch methods, I'm predominantly directed to a description 
of JNLP usage or, to a lesser extent, SSH; neither of which I want for the 
Win 7 machines.
Could you please provide a sample script that you leverage?
That would be greatly 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/68d09b75-bd6f-4ec8-afdf-000efe443fdb%40googlegroups.com.


Re: Pipeline: Expected call wound up catching different method

2019-07-30 Thread Devin Nusbaum
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  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 
> .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jenkinsci-users/DB8PR01MB6156A8F569E89602288F1547F7DC0%40DB8PR01MB6156.eurprd01.prod.exchangelabs.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/1FDB7E46-771B-4018-A074-AF9702669F9A%40cloudbees.com.


Re: Create new item - Item name error 'Only alphanumerical characters allowed'

2019-07-30 Thread Laura López Senderos
Thank you very much Shaun, you've hit right!

There's an option in Jenkins management to restrict the job names: manage 
jenkins -> configure system -> restrict project naming.

We've a pattern to allow only alphanumerical characters, but with some 
jenkins or plugin upgrade this pattern has been ignored and we had jobs 
with spaces on its names. After others upgrades the pattern has worked 
again, and the error in job name has appeared because of the existing jobs 
with spaces.

So the solution is:
- disable the restriction in job names
- change the jobs' names with spaces to remove the spaces
- enable again the restriction in job names

Thanks to all people who has answered our post and try to help us!


El martes, 30 de julio de 2019, 12:24:50 (UTC+2), Shaun McArthur escribió:
>
> There is an option to restrict job naming…do you have it checked on?
>
> From: > on behalf of Laura 
> López Senderos >
> Reply-To: >
> Date: Tuesday, July 30, 2019 at 5:04 AM
> To: Jenkins Users >
> Subject: Re: Create new item - Item name error 'Only alphanumerical 
> characters allowed'
>
> Hi,
>
> Here i post our list of plugins with their versions:
>
> Active Directory Plugin - 2.16
> Android Emulator Plugin - 3.0
> Ant Plugin - 1.9
> Apache HttpComponents Client 4.x API Plugin - 4.5.5-3.0
> Authentication Tokens API Plugin - 1.3
> Authorize Project - 1.3.0
> bouncycastle API Plugin - 2.17
> Branch API - 2.5.3
> Build Timeout - 1.19
> CocoaPods Jenkins Integration - 0.2.0
> Command Agent Launcher Plugin - 1.3
> Credentials Binding Plugin - 1.19
> Credentials Plugin - 2.2.0
> Display URL API - 2.3.1
> Docker Commons Plugin - 1.15
> Docker Pipeline - 1.18
> Durable Task Plugin - 1.30
> Email Extension Plugin - 2.66
> External Monitor Job Type Plugin - 1.7
> Folders Plugin - 6.9
> Git - 3.10.1
> Git client plugin - 2.8.0
> GIT server Plugin - 1.7
> GitHub API Plugin - 1.95
> GitHub Branch Source - 2.5.4
> GitHub plugin - 1.29.4
> GitLab Plugin - 1.5.12
> Google Metadata plugin - 0.2
> Google OAuth Credentials plugin - 0.8
> Gradle Plugin - 1.33
> Jackson 2 API Plugin - 2.9.9.1
> Javadoc Plugin - 1.5
> JavaScript GUI Lib: ACE Editor bundle plugin - 1.1
> JavaScript GUI Lib: Handlebars bundle plugin - 1.1.1
> JavaScript GUI Lib: jQuery bundles (jQuery and jQuery UI) plugin - 1.2.1
> JavaScript GUI Lib: Moment.js bundle plugin - 1.1.1
> jQuery plugin - 1.12.4-0
> jQuery UI plugin - 1.0.2
> JSch dependency - 0.1.55
> JUnit Plugin - 1.28
> LDAP Plugin - 1.20
> Lockable Resources plugin - 2.5
> Mailer - 1.23
> MapDB API Plugin - 1.0.9.0
> Matrix Authorization Strategy Plugin - 2.4.2
> Matrix Project Plugin - 1.14
> OAuth Credentials plugin - 0.3
> Oracle Java SE Development Kit Installer Plugin - 1.3
> OWASP Markup Formatter Plugin - 1.5
> PAM Authentication plugin - 1.5.1
> Pipeline - 2.6
> Pipeline Graph Analysis Plugin - 1.10
> Pipeline: API - 2.35
> Pipeline: Basic Steps - 2.18
> Pipeline: Build Step - 2.9
> Pipeline: Declarative - 1.3.9
> Pipeline: Declarative Agent API - 1.1.1
> Pipeline: Declarative Extension Points API - 1.3.9
> Pipeline: GitHub Groovy Libraries - 1.0
> Pipeline: Groovy - 2.72
> Pipeline: Input Step - 2.10
> Pipeline: Job  - 2.33
> Pipeline: Milestone Step - 1.3.1
> Pipeline: Model API - 1.3.9
> Pipeline: Multibranch - 2.21
> Pipeline: Nodes and Processes - 2.32
> Pipeline: REST API Plugin - 2.11
> Pipeline: SCM Step - 2.9
> Pipeline: Shared Groovy Libraries - 2.14
> Pipeline: Stage Step - 2.3
> Pipeline: Stage Tags Metadata - 1.3.9
> Pipeline: Stage View Plugin - 2.11
> Pipeline: Step API - 2.20
> Pipeline: Supporting APIs - 3.3
> Plain Credentials Plugin - 1.5
> Port Allocator Plug-in - 1.8
> Resource Disposer Plugin - 0.13
> Role-based Authorization Strategy - 2.13
> SCM API Plugin - 2.6.3
> Script Security Plugin - 1.61
> SonarQube Scanner for Jenkins - 2.9
> SSH Credentials Plugin - 1.17.1
> SSH Slaves - 1.29.4
> Structs - 1.19
> Subversion Plug-in - 2.12.2
> Timestamper - 1.10
> Token Macro Plugin - 2.8
> Trilead API Plugin - 1.0.3
> WMI Windows Agents Plugin - 1.4
> Workspace Cleanup Plugin - 0.37
> Xcode integration - 2.0.12
> Xvfb plugin - 1.1.3
>
>
> We've restarted jenkins instance and the whole machine 3-4 times, but 
> nothing changes, the error persists
>
> Thank you!
> Laura
>
>
> El lunes, 29 de julio de 2019, 15:08:58 (UTC+2), slide escribió:
>>
>> Can you give a list of plugins and their versions that you have 
>> installed? Did you restart Jenkins after the upgrade of plugins?
>>
>> On Mon, Jul 29, 2019, 05:58 Laura López Senderos  
>> wrote:
>>
>>> Our current Jenkins version is 2.176.2. We're not sure when it has 
>>> started happening, because we've made some updates on plugins and Jenkins 
>>> instance since the last job creation.
>>>
>>> It's really strange because we've been able to create jobs with spaces, 
>>> hyphens, underscores, lowercase, uppercase and without problems.
>>>
>>> But now, we only type a letter, any letter, and the error message is 
>>> shown. We've 

Re: Create new item - Item name error 'Only alphanumerical characters allowed'

2019-07-30 Thread Shaun McArthur
There is an option to restrict job namingŠdo you have it checked on?

From:   on behalf of Laura López Senderos

Reply-To:  
Date:  Tuesday, July 30, 2019 at 5:04 AM
To:  Jenkins Users 
Subject:  Re: Create new item - Item name error 'Only alphanumerical
characters allowed'

Hi,

Here i post our list of plugins with their versions:

Active Directory Plugin - 2.16
Android Emulator Plugin - 3.0
Ant Plugin - 1.9
Apache HttpComponents Client 4.x API Plugin - 4.5.5-3.0
Authentication Tokens API Plugin - 1.3
Authorize Project - 1.3.0
bouncycastle API Plugin - 2.17
Branch API - 2.5.3
Build Timeout - 1.19
CocoaPods Jenkins Integration - 0.2.0
Command Agent Launcher Plugin - 1.3
Credentials Binding Plugin - 1.19
Credentials Plugin - 2.2.0
Display URL API - 2.3.1
Docker Commons Plugin - 1.15
Docker Pipeline - 1.18
Durable Task Plugin - 1.30
Email Extension Plugin - 2.66
External Monitor Job Type Plugin - 1.7
Folders Plugin - 6.9
Git - 3.10.1
Git client plugin - 2.8.0
GIT server Plugin - 1.7
GitHub API Plugin - 1.95
GitHub Branch Source - 2.5.4
GitHub plugin - 1.29.4
GitLab Plugin - 1.5.12
Google Metadata plugin - 0.2
Google OAuth Credentials plugin - 0.8
Gradle Plugin - 1.33
Jackson 2 API Plugin - 2.9.9.1
Javadoc Plugin - 1.5
JavaScript GUI Lib: ACE Editor bundle plugin - 1.1
JavaScript GUI Lib: Handlebars bundle plugin - 1.1.1
JavaScript GUI Lib: jQuery bundles (jQuery and jQuery UI) plugin - 1.2.1
JavaScript GUI Lib: Moment.js bundle plugin - 1.1.1
jQuery plugin - 1.12.4-0
jQuery UI plugin - 1.0.2
JSch dependency - 0.1.55
JUnit Plugin - 1.28
LDAP Plugin - 1.20
Lockable Resources plugin - 2.5
Mailer - 1.23
MapDB API Plugin - 1.0.9.0
Matrix Authorization Strategy Plugin - 2.4.2
Matrix Project Plugin - 1.14
OAuth Credentials plugin - 0.3
Oracle Java SE Development Kit Installer Plugin - 1.3
OWASP Markup Formatter Plugin - 1.5
PAM Authentication plugin - 1.5.1
Pipeline - 2.6
Pipeline Graph Analysis Plugin - 1.10
Pipeline: API - 2.35
Pipeline: Basic Steps - 2.18
Pipeline: Build Step - 2.9
Pipeline: Declarative - 1.3.9
Pipeline: Declarative Agent API - 1.1.1
Pipeline: Declarative Extension Points API - 1.3.9
Pipeline: GitHub Groovy Libraries - 1.0
Pipeline: Groovy - 2.72
Pipeline: Input Step - 2.10
Pipeline: Job  - 2.33
Pipeline: Milestone Step - 1.3.1
Pipeline: Model API - 1.3.9
Pipeline: Multibranch - 2.21
Pipeline: Nodes and Processes - 2.32
Pipeline: REST API Plugin - 2.11
Pipeline: SCM Step - 2.9
Pipeline: Shared Groovy Libraries - 2.14
Pipeline: Stage Step - 2.3
Pipeline: Stage Tags Metadata - 1.3.9
Pipeline: Stage View Plugin - 2.11
Pipeline: Step API - 2.20
Pipeline: Supporting APIs - 3.3
Plain Credentials Plugin - 1.5
Port Allocator Plug-in - 1.8
Resource Disposer Plugin - 0.13
Role-based Authorization Strategy - 2.13
SCM API Plugin - 2.6.3
Script Security Plugin - 1.61
SonarQube Scanner for Jenkins - 2.9
SSH Credentials Plugin - 1.17.1
SSH Slaves - 1.29.4
Structs - 1.19
Subversion Plug-in - 2.12.2
Timestamper - 1.10
Token Macro Plugin - 2.8
Trilead API Plugin - 1.0.3
WMI Windows Agents Plugin - 1.4
Workspace Cleanup Plugin - 0.37
Xcode integration - 2.0.12
Xvfb plugin - 1.1.3


We've restarted jenkins instance and the whole machine 3-4 times, but
nothing changes, the error persists

Thank you!
Laura


El lunes, 29 de julio de 2019, 15:08:58 (UTC+2), slide  escribió:
> Can you give a list of plugins and their versions that you have installed? Did
> you restart Jenkins after the upgrade of plugins?
> 
> On Mon, Jul 29, 2019, 05:58 Laura López Senderos   > wrote:
>> Our current Jenkins version is 2.176.2. We're not sure when it has started
>> happening, because we've made some updates on plugins and Jenkins instance
>> since the last job creation.
>> 
>> It's really strange because we've been able to create jobs with spaces,
>> hyphens, underscores, lowercase, uppercase and without problems.
>> 
>> But now, we only type a letter, any letter, and the error message is shown.
>> We've tried to follow the javascript code in browser developer console when
>> typping a letter, but finally there's an ajax request and we can't see
>> anything more.
>> 
>> I'm thinking on installing Jenkins CLI to try creating a Job from commands
>> and if the error persists. This isn't the solution I would like to use but if
>> it works we'll have to use it meanwhile.
>> 
>> Thanks.
>> 
>> 
>> El viernes, 26 de julio de 2019, 17:01:05 (UTC+2), Mark Waite  escribió:
>>> I've not seen any report of that issue from anyone other than you.
>>> 
>>> When I asked if a folder containing the job included an unexpected
>>> character, I was thinking of a Jenkins folder more than a directory on the
>>> file system.  The directory on the file system which represents that Jenkins
>>> folder would be inside a subdirectory or series of subdirectories of
>>> /var/lib/jenkins/jobs/.
>>> 
>>> If you don't use Jenkins folders to organize your jobs, then that is not the
>>> issue.
>>> 
>>> What version of Jenkins are you running that is broken?  

Re: Create new item - Item name error 'Only alphanumerical characters allowed'

2019-07-30 Thread Laura López Senderos
Hi,

Here i post our list of plugins with their versions:

Active Directory Plugin - 2.16
Android Emulator Plugin - 3.0
Ant Plugin - 1.9
Apache HttpComponents Client 4.x API Plugin - 4.5.5-3.0
Authentication Tokens API Plugin - 1.3
Authorize Project - 1.3.0
bouncycastle API Plugin - 2.17
Branch API - 2.5.3
Build Timeout - 1.19
CocoaPods Jenkins Integration - 0.2.0
Command Agent Launcher Plugin - 1.3
Credentials Binding Plugin - 1.19
Credentials Plugin - 2.2.0
Display URL API - 2.3.1
Docker Commons Plugin - 1.15
Docker Pipeline - 1.18
Durable Task Plugin - 1.30
Email Extension Plugin - 2.66
External Monitor Job Type Plugin - 1.7
Folders Plugin - 6.9
Git - 3.10.1
Git client plugin - 2.8.0
GIT server Plugin - 1.7
GitHub API Plugin - 1.95
GitHub Branch Source - 2.5.4
GitHub plugin - 1.29.4
GitLab Plugin - 1.5.12
Google Metadata plugin - 0.2
Google OAuth Credentials plugin - 0.8
Gradle Plugin - 1.33
Jackson 2 API Plugin - 2.9.9.1
Javadoc Plugin - 1.5
JavaScript GUI Lib: ACE Editor bundle plugin - 1.1
JavaScript GUI Lib: Handlebars bundle plugin - 1.1.1
JavaScript GUI Lib: jQuery bundles (jQuery and jQuery UI) plugin - 1.2.1
JavaScript GUI Lib: Moment.js bundle plugin - 1.1.1
jQuery plugin - 1.12.4-0
jQuery UI plugin - 1.0.2
JSch dependency - 0.1.55
JUnit Plugin - 1.28
LDAP Plugin - 1.20
Lockable Resources plugin - 2.5
Mailer - 1.23
MapDB API Plugin - 1.0.9.0
Matrix Authorization Strategy Plugin - 2.4.2
Matrix Project Plugin - 1.14
OAuth Credentials plugin - 0.3
Oracle Java SE Development Kit Installer Plugin - 1.3
OWASP Markup Formatter Plugin - 1.5
PAM Authentication plugin - 1.5.1
Pipeline - 2.6
Pipeline Graph Analysis Plugin - 1.10
Pipeline: API - 2.35
Pipeline: Basic Steps - 2.18
Pipeline: Build Step - 2.9
Pipeline: Declarative - 1.3.9
Pipeline: Declarative Agent API - 1.1.1
Pipeline: Declarative Extension Points API - 1.3.9
Pipeline: GitHub Groovy Libraries - 1.0
Pipeline: Groovy - 2.72
Pipeline: Input Step - 2.10
Pipeline: Job  - 2.33
Pipeline: Milestone Step - 1.3.1
Pipeline: Model API - 1.3.9
Pipeline: Multibranch - 2.21
Pipeline: Nodes and Processes - 2.32
Pipeline: REST API Plugin - 2.11
Pipeline: SCM Step - 2.9
Pipeline: Shared Groovy Libraries - 2.14
Pipeline: Stage Step - 2.3
Pipeline: Stage Tags Metadata - 1.3.9
Pipeline: Stage View Plugin - 2.11
Pipeline: Step API - 2.20
Pipeline: Supporting APIs - 3.3
Plain Credentials Plugin - 1.5
Port Allocator Plug-in - 1.8
Resource Disposer Plugin - 0.13
Role-based Authorization Strategy - 2.13
SCM API Plugin - 2.6.3
Script Security Plugin - 1.61
SonarQube Scanner for Jenkins - 2.9
SSH Credentials Plugin - 1.17.1
SSH Slaves - 1.29.4
Structs - 1.19
Subversion Plug-in - 2.12.2
Timestamper - 1.10
Token Macro Plugin - 2.8
Trilead API Plugin - 1.0.3
WMI Windows Agents Plugin - 1.4
Workspace Cleanup Plugin - 0.37
Xcode integration - 2.0.12
Xvfb plugin - 1.1.3


We've restarted jenkins instance and the whole machine 3-4 times, but 
nothing changes, the error persists

Thank you!
Laura


El lunes, 29 de julio de 2019, 15:08:58 (UTC+2), slide escribió:
>
> Can you give a list of plugins and their versions that you have installed? 
> Did you restart Jenkins after the upgrade of plugins?
>
> On Mon, Jul 29, 2019, 05:58 Laura López Senderos  > wrote:
>
>> Our current Jenkins version is 2.176.2. We're not sure when it has 
>> started happening, because we've made some updates on plugins and Jenkins 
>> instance since the last job creation.
>>
>> It's really strange because we've been able to create jobs with spaces, 
>> hyphens, underscores, lowercase, uppercase and without problems.
>>
>> But now, we only type a letter, any letter, and the error message is 
>> shown. We've tried to follow the javascript code in browser developer 
>> console when typping a letter, but finally there's an ajax request and we 
>> can't see anything more.
>>
>> I'm thinking on installing Jenkins CLI to try creating a Job from 
>> commands and if the error persists. This isn't the solution I would like to 
>> use but if it works we'll have to use it meanwhile.
>>
>> Thanks.
>>
>>
>> El viernes, 26 de julio de 2019, 17:01:05 (UTC+2), Mark Waite escribió:
>>>
>>> I've not seen any report of that issue from anyone other than you.
>>>
>>> When I asked if a folder containing the job included an unexpected 
>>> character, I was thinking of a Jenkins folder more than a directory on the 
>>> file system.  The directory on the file system which represents that 
>>> Jenkins folder would be inside a subdirectory or series of subdirectories 
>>> of /var/lib/jenkins/jobs/.
>>>
>>> If you don't use Jenkins folders to organize your jobs, then that is not 
>>> the issue.
>>>
>>> What version of Jenkins are you running that is broken?  What version of 
>>> Jenkins were you running when it was working?  
>>>
>>>
>>>
>>> On Fri, Jul 26, 2019 at 7:05 AM Laura López Senderos <
>>> laurap...@gmail.com> wrote:
>>>
 Hi Mark,

 The folder where every jobs are created is '/var/lib/jenkins/jobs'. 

Re: Converting to pipeline questions

2019-07-30 Thread Jordan Sokolic
Louis,

To answer your last question, if you decide to use declarative pipelines in 
the end you can use the built-in tools like the declarative directive 
generator and snippet generator. They will provide much the same UI as a 
classic freestyle project which you configure according to your needs, 
spitting out the relevant section which you can then copy/paste into your 
pipeline script. You can read more about how to use these tools at 
https://jenkins.io/doc/book/pipeline/getting-started/#built-in-documentation. 
I've found them to be indispensable when starting out.

To expand on Jeremy's answer, it's possible to embed a scripted section 
into a declarative pipeline. We do this fairly frequently, for example, to 
define custom variables that can be used later in a pipeline. This example 
parses some Git information and saves some variables for later:

stage('Init') {
  steps {
buildName "${params.branch} @${params.commit[0..9]}"
checkout([...])
  
script {
  dir(repo_subdir) {
commit_before_merge = params.commit
author_name  = sh(script: "git log -n 1 ${params.commit} 
--format='%an'", returnStdout: true).trim()
author_email = sh(script: "git log -n 1 ${params.commit} 
--format='%ae'", returnStdout: true).trim()
commit_message  = sh(script: "git log -n 1 ${params.commit} 
--format='%B'",  returnStdout: true)
commit_date = sh(script: "git log -n 1 ${params.commit} 
--format='%ci'", returnStdout: true).trim()
addShortText text: author_email, border: 0, background: 
'lightBlue'
  }
}
  }
}

 Jordan

On Monday, July 29, 2019 at 6:40:56 PM UTC+3, Louis Elston wrote:
>
> 07/17/19 – wrote this…
>
> We are currently using Windows \ Jenkins 2.107.1 (no pipeline), and I am 
> researching going to pipeline. We have a nightly build job, that fetches 
> from repositories, and submits and waits on other jobs. I see 9 jobs 
> running on the same Master node (we only have a master), at the same time. 
> I am not clear on if we should have one Jenkinsfile or multiple 
> Jenkinsfiles. It will not be a multibranch pipeline, as we do not create 
> test branches and then merge back to a master. In the repository we have 
> product1.0 branch, product2.0 branch etc., and build only one branch (the 
> latest one). While I do like the Blue Ocean editor, it is only for 
> MultiBranch pipelines.
>
> Looking for directions and\or examples on how to convert existing Jenkins 
> non-pipeline systems, to pipeline.  I did find this…
> https://wiki.jenkins.io/display/JENKINS/Convert+To+Pipeline+Plugin. It 
> does help a little in that it gives you some converted steps, but cannot 
> convert all the steps, and will give comments in the pipeline script 
> "//Unable to convert a build step referring to...please verify and convert 
> manually if required." There is an option "Recursively convert downstream 
> jobs if any" and if you select that, it appears to add all the downstream 
> jobs to the same pipeline script, and really confuses the job parameters. 
> There is also an option to "Commit JenkinsFile" (if doing declarative). I 
> will play with this some more, but it is not the be all and end all of 
> converting to pipeline, and I still am not sure of whether I should be have 
> one or more scripts.
>
> Added 07/26/19 - Let’s see if I have my research to date correct…
>
> A Declarative pipeline (Pipeline Script from SCM), is stored in a 
> Jenkinsfile in the repository. Every time that this Jenkins job is 
> executed, a fetch from the repository is done (to get the latest version of 
> the Jenkinsfile).
>
> A Pipeline script is stored as part of the config.xml file in the 
> Jenkins\Jobs folder (it is not stored in the repository, or in a separate 
> Jenkinsfile in the jobs folder). There is a fetch from the repository only 
> if you put it in (you do not need to do a repository fetch to get the 
> Pipeline script).
>
> Besides our nightly product build, we also have other jobs. I could create 
> a separate Declarative Jenkinsfile for each of them (JenkinsfileA, 
> JenkinsfileB, etc.) for each of the other jobs and store then in the 
> repository also (in the same branch as the main Jenkinsfile), but that 
> would mean that every one of those additional jobs, to get the particular 
> Jenkinsfile for that job, would also need to do a repository fetch 
> (basically fetching\cloning the repository branch for each job, and have 
> multiple versions of the repository branch unnecessarily downloaded to the 
> workspace of each job).
>
> That does not make sense to me (unless my understanding of things to date 
> is incorrect). Because the main product build does require a fetch every 
> time it is run (to get any possible developer check-ins), I do not see a 
> problem doing Declarative Jenkinsfile for that job. For the other jobs (if 
> we do not leave then for the time being in the 

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.