Re: Can pipelines and stages be nested in a dependency graph? Or is there a better alternative.

2021-02-12 Thread 'Martin Schmude' via Jenkins Users
No, pipeline scripts cannot be nested.


Anil schrieb am Donnerstag, 11. Februar 2021 um 16:58:20 UTC+1:

> I have a number of tasks and some are dependent on others for completion.
> If task A is dependent on tasks B and C completing, then B and C will be 
> child tasks of A.
> It is also possible that task D is dependent on task B and then we have a 
> DAG.
> So they will form a dependency graph (Directed Acyclic Graph)
> Can I have a pipeline script with nested pipelines and jobs?
> Or is there a better alternative.
>

-- 
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/f507a1bc-26c0-46a3-956b-19bbd8c9af0cn%40googlegroups.com.


Re: Issue with master-agent communication over ssh

2021-02-12 Thread Jigar Rathod


Sent from my iPhone

> On Feb 12, 2021, at 1:09 PM, Iván Fernández Calvo  
> wrote:
> 
> Looks like an abrupt disconnect, this point to the resources you give to the 
> remote process and the resources you have in the agent. The resource 
> management on a JVM is tricky, the JDK gives a 75% of the memory resources if 
> you do not pass Xmx and Xms settings. So I wonder how much memory you have on 
> those agents and if you set those limits. Based on my experience less than 
> 4GB  for sunfire tasks use to be tight.
> 
> Un Saludo 
> Ivan Fernandez Calvo
I am using -Xmx2048m -Xms2048m. I will increase it to 4096 and see what 
happens. 

Thanks, 
Jigar R

> 
>>> El 12 feb 2021, a las 17:32, Jigar R  escribió:
>>> 
>> 
>> 
>>> On Wednesday, February 10, 2021 at 9:30:28 AM UTC-5 kuisat...@gmail.com 
>>> wrote:
>>> you attached the Jenkins build log and the Agent log, should be also an 
>>> exception in the Jenkins log, Is the same you posted before `invalid type 
>>> code: 6D`?
>>> 
>> This is all I see in jenkins.err log
>> 
>> 2021-02-11 21:44:00.121+ [id=67650] INFO
>> h.r.SynchronousCommandTransport$ReaderThread#run: I/O error in channel 
>> ssh_agent
>> java.io.EOFException
>> at 
>> java.io.ObjectInputStream$BlockDataInputStream.readFully(ObjectInputStream.java:3106)
>> at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1956)
>> at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1567)
>> at 
>> java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2287)
>> at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2211)
>> at 
>> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2069)
>> at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1573)
>> at 
>> java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2287)
>> at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2211)
>> at 
>> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2069)
>> at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1573)
>> at java.io.ObjectInputStream.readObject(ObjectInputStream.java:431)
>> at hudson.remoting.Command.readFromObjectStream(Command.java:155)
>> at hudson.remoting.Command.readFrom(Command.java:142)
>> at hudson.remoting.Command.readFrom(Command.java:128)
>> at 
>> hudson.remoting.AbstractSynchronousByteArrayCommandTransport.read(AbstractSynchronousByteArrayCommandTransport.java:35)
>> at 
>> hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:63)
>> Caused: java.io.IOException: Unexpected termination of the channel
>> at 
>> hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:77)
>> 2021-02-11 21:44:00.122+ [id=67569] WARNING 
>> h.m.AbstractBuild$AbstractBuildExecution#reportError: Step ‘Record compiler 
>> warnings and static analysis results’ aborted due to exception:
>> java.io.IOException: No workspace found for JOB_NAME #116
>> at 
>> io.jenkins.plugins.analysis.core.steps.IssuesRecorder.perform(IssuesRecorder.java:577)
>> at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
>> at 
>> hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741)
>> at 
>> hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
>> at hudson.model.Build$BuildExecution.post2(Build.java:186)
>> at 
>> hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
>> at hudson.model.Run.execute(Run.java:1919)
>> at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
>> at hudson.model.ResourceController.execute(ResourceController.java:97)
>> at hudson.model.Executor.run(Executor.java:428)
>> 2021-02-11 21:44:00.283+ [id=67569] WARNING 
>> hudson.ivy.IvyBuildTrigger#recomputeModuleDescriptor: Cannot read ivy file 
>> backup...removing ModuleDescriptor
>> 2021-02-11 21:44:00.287+ [id=67569] WARNING 
>> hudson.ivy.IvyBuildTrigger#getModuleDescriptor: Node is offline for 
>> JOB_NAME, using project to get Module Descriptor
>> 
>>  
 El mar, 9 feb 2021 a las 21:23, Jigar R () escribió:
 Any recommendations on how should I go about this new error?
 
> On Thursday, February 4, 2021 at 5:26:13 PM UTC-5 Jigar R wrote:
>> On Thursday, February 4, 2021 at 12:20:21 PM UTC-5 Jigar R wrote:
>>> On Thu, Feb 4, 2021 at 9:29 AM kuisathaverat  
>>> wrote:
>>> I see some serialization fails and this breaks the channel, the plugin 
>>> that causes the exception seems 
>>> https://github.com/jenkinsci/tasks-plugin, and the `[Deprecated] Scan 
>>> workspace for open tasks` I think matters, this plugins has been 
>>> integrated into https://github.com/jenkinsci/warnings-ng-plugin and 
>>> https://github.com/jenkinsci/analysis-model
>>> 
>>> ERROR: 

Re: Issue with master-agent communication over ssh

2021-02-12 Thread Iván Fernández Calvo
Looks like an abrupt disconnect, this point to the resources you give to the 
remote process and the resources you have in the agent. The resource management 
on a JVM is tricky, the JDK gives a 75% of the memory resources if you do not 
pass Xmx and Xms settings. So I wonder how much memory you have on those agents 
and if you set those limits. Based on my experience less than 4GB  for sunfire 
tasks use to be tight.

Un Saludo 
Ivan Fernandez Calvo

> El 12 feb 2021, a las 17:32, Jigar R  escribió:
> 
> 
> 
>> On Wednesday, February 10, 2021 at 9:30:28 AM UTC-5 kuisat...@gmail.com 
>> wrote:
>> you attached the Jenkins build log and the Agent log, should be also an 
>> exception in the Jenkins log, Is the same you posted before `invalid type 
>> code: 6D`?
>> 
> This is all I see in jenkins.err log
> 
> 2021-02-11 21:44:00.121+ [id=67650] INFO
> h.r.SynchronousCommandTransport$ReaderThread#run: I/O error in channel 
> ssh_agent
> java.io.EOFException
> at 
> java.io.ObjectInputStream$BlockDataInputStream.readFully(ObjectInputStream.java:3106)
> at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1956)
> at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1567)
> at 
> java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2287)
> at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2211)
> at 
> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2069)
> at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1573)
> at 
> java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2287)
> at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2211)
> at 
> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2069)
> at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1573)
> at java.io.ObjectInputStream.readObject(ObjectInputStream.java:431)
> at hudson.remoting.Command.readFromObjectStream(Command.java:155)
> at hudson.remoting.Command.readFrom(Command.java:142)
> at hudson.remoting.Command.readFrom(Command.java:128)
> at 
> hudson.remoting.AbstractSynchronousByteArrayCommandTransport.read(AbstractSynchronousByteArrayCommandTransport.java:35)
> at 
> hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:63)
> Caused: java.io.IOException: Unexpected termination of the channel
> at 
> hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:77)
> 2021-02-11 21:44:00.122+ [id=67569] WARNING 
> h.m.AbstractBuild$AbstractBuildExecution#reportError: Step ‘Record compiler 
> warnings and static analysis results’ aborted due to exception:
> java.io.IOException: No workspace found for JOB_NAME #116
> at 
> io.jenkins.plugins.analysis.core.steps.IssuesRecorder.perform(IssuesRecorder.java:577)
> at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
> at 
> hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741)
> at 
> hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
> at hudson.model.Build$BuildExecution.post2(Build.java:186)
> at 
> hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
> at hudson.model.Run.execute(Run.java:1919)
> at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
> at hudson.model.ResourceController.execute(ResourceController.java:97)
> at hudson.model.Executor.run(Executor.java:428)
> 2021-02-11 21:44:00.283+ [id=67569] WARNING 
> hudson.ivy.IvyBuildTrigger#recomputeModuleDescriptor: Cannot read ivy file 
> backup...removing ModuleDescriptor
> 2021-02-11 21:44:00.287+ [id=67569] WARNING 
> hudson.ivy.IvyBuildTrigger#getModuleDescriptor: Node is offline for JOB_NAME, 
> using project to get Module Descriptor
> 
>  
>>> El mar, 9 feb 2021 a las 21:23, Jigar R () escribió:
>>> Any recommendations on how should I go about this new error?
>>> 
 On Thursday, February 4, 2021 at 5:26:13 PM UTC-5 Jigar R wrote:
> On Thursday, February 4, 2021 at 12:20:21 PM UTC-5 Jigar R wrote:
>> On Thu, Feb 4, 2021 at 9:29 AM kuisathaverat  wrote:
>> I see some serialization fails and this breaks the channel, the plugin 
>> that causes the exception seems 
>> https://github.com/jenkinsci/tasks-plugin, and the `[Deprecated] Scan 
>> workspace for open tasks` I think matters, this plugins has been 
>> integrated into https://github.com/jenkinsci/warnings-ng-plugin and 
>> https://github.com/jenkinsci/analysis-model
>> 
>> ERROR: Step ‘[Deprecated] Scan workspace for open tasks’ aborted due to 
>> exception:
>> java.io.StreamCorruptedException: invalid type code: 6D
>> ...
>> at 
>> hudson.plugins.tasks.TasksPublisher.perform(TasksPublisher.java:182)
>> at 
>> 

Re: Issue with master-agent communication over ssh

2021-02-12 Thread Jigar R


On Wednesday, February 10, 2021 at 9:30:28 AM UTC-5 kuisat...@gmail.com 
wrote:

> you attached the Jenkins build log and the Agent log, should be also an 
> exception in the Jenkins log, Is the same you posted before `invalid type 
> code: 6D`?
>
> This is all I see in jenkins.err log

2021-02-11 21:44:00.121+ [id=67650] INFO   
 h.r.SynchronousCommandTransport$ReaderThread#run: I/O error in channel 
ssh_agent
java.io.EOFException
at 
java.io.ObjectInputStream$BlockDataInputStream.readFully(ObjectInputStream.java:3106)
at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1956)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1567)
at 
java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2287)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2211)
at 
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2069)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1573)
at 
java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2287)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2211)
at 
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2069)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1573)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:431)
at hudson.remoting.Command.readFromObjectStream(Command.java:155)
at hudson.remoting.Command.readFrom(Command.java:142)
at hudson.remoting.Command.readFrom(Command.java:128)
at 
hudson.remoting.AbstractSynchronousByteArrayCommandTransport.read(AbstractSynchronousByteArrayCommandTransport.java:35)
at 
hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:63)
Caused: java.io.IOException: Unexpected termination of the channel
at 
hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:77)
2021-02-11 21:44:00.122+ [id=67569] WARNING 
h.m.AbstractBuild$AbstractBuildExecution#reportError: Step ‘Record compiler 
warnings and static analysis results’ aborted due to exception:
java.io.IOException: No workspace found for JOB_NAME #116
at 
io.jenkins.plugins.analysis.core.steps.IssuesRecorder.perform(IssuesRecorder.java:577)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at 
hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741)
at 
hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
at hudson.model.Build$BuildExecution.post2(Build.java:186)
at 
hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
at hudson.model.Run.execute(Run.java:1919)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:428)
2021-02-11 21:44:00.283+ [id=67569] WARNING 
hudson.ivy.IvyBuildTrigger#recomputeModuleDescriptor: Cannot read ivy file 
backup...removing ModuleDescriptor
2021-02-11 21:44:00.287+ [id=67569] WARNING 
hudson.ivy.IvyBuildTrigger#getModuleDescriptor: Node is offline for 
JOB_NAME, using project to get Module Descriptor

 

> El mar, 9 feb 2021 a las 21:23, Jigar R () escribió:
>
>> Any recommendations on how should I go about this new error?
>>
>> On Thursday, February 4, 2021 at 5:26:13 PM UTC-5 Jigar R wrote:
>>
>>> On Thursday, February 4, 2021 at 12:20:21 PM UTC-5 Jigar R wrote:
>>>
 On Thu, Feb 4, 2021 at 9:29 AM kuisathaverat  
 wrote:

> I see some serialization fails and this breaks the channel, the plugin 
> that causes the exception seems 
> https://github.com/jenkinsci/tasks-plugin, and the `[Deprecated] Scan 
> workspace for open tasks` I think matters, this plugins has been 
> integrated 
> into https://github.com/jenkinsci/warnings-ng-plugin and 
> https://github.com/jenkinsci/analysis-model
>
> ERROR: Step ‘[Deprecated] Scan workspace for open tasks’ aborted due to 
> exception:
> java.io.StreamCorruptedException: invalid type code: 6D
> ...
> at 
> hudson.plugins.tasks.TasksPublisher.perform(TasksPublisher.java:182)
> at 
> hudson.plugins.analysis.core.HealthAwarePublisher.perform(HealthAwarePublisher.java:69)
> at 
> hudson.plugins.analysis.core.HealthAwareRecorder.perform(HealthAwareRecorder.java:298)
> at jenkins.tasks.SimpleBuildStep.perform(SimpleBuildStep.java:112)
> at 
> hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78)
> at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
> at 
> hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741)
> at 
> hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)

Re: Exclude Paths from Triggering Builds

2021-02-12 Thread Jeremy Mordkoff
Also interested in the answer. 

At the moment we scan the change log from the scm object and abort the 
pipeline (cleanly) if there is nothing of interest to that pipeline to 
build. I do not like this solution for multiple reasons. 

Our plan is to split our code into 3 repos .. one for each app and one for 
the product, with each of the app builds triggering a product build. The 
product build is really fast since all it does is update the tags in a helm 
chart to reference the latest builds. 

FYI...we use git submodules, which is why the scm object is not a good 
solution for us as it only has a list of changes made in the super-module. 

On Friday, February 12, 2021 at 7:08:58 AM UTC-5 venh...@gmail.com wrote:

> I have a repository in GitHub. This repository has a Jenkinsfile at the 
> root which is the app project. There are 2 more folders / directories, one 
> for Config project and one for Database project. Each has a jenkins file 
> inside it. 
>
> We have 3 Multibranch Jenkins Pipelines, since there are 3 
> different modules / projects. But all of them belong to the same GitHub 
> repository. The challenge is that, if the DB developer modifies any file 
> inside the DB directory, other jobs are also triggered (App and Config). If 
> a file is changed in the Config directory, it triggers App and DB jobs, 
> probably because all are inside the same repository.
>
> Is there a way to ensure that any change in DB directory will only trigger 
> the DB Multibranch job and not the App and Config and vice versa? 
> Basically, I am looking for an option to exclude DB and Config directory 
> from triggering App Build and so on. Please help.
>
> Regards,
> Venkatesh
>

-- 
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/6ab91fd5-886e-4b7b-acd1-045c52088fbdn%40googlegroups.com.


Re: Jenkins Upgrade 2.235.1 to 2.263.3 All Nodes Can't Connect

2021-02-12 Thread 'Minimos' via Jenkins Users

Thanks I'll take a look at the information.

I am using .Net 4.5 so should not be an issue, but there is an interesting 
point re JNLP.

I'll go through the document and double check everything.

In the meantime do others have any other pointers?
On Friday, 12 February 2021 at 14:55:58 UTC Mark Waite wrote:

> The Jenkins 2.249.1 upgrade guide notes that Microsot.NET 2.0 support has 
> been removed.  See 
> https://www.jenkins.io/doc/upgrade-guide/2.249/#upgrading-to-jenkins-lts-2-249-1
>  
> in case that affects your installation.
>
> On Fri, Feb 12, 2021 at 7:49 AM 'Minimos' via Jenkins Users <
> jenkins...@googlegroups.com> wrote:
>
>> Hi,
>>
>> We recently updated Jenkins as per the subject line on our Windows boxes
>>
>> All plugins were updated at the same time, however we can no longer get 
>> our nods to communicate with the master.
>>
>> A Java Io exception of Connection time Out is displayed.  There have been 
>> no changes to our firewall or network.
>>
>> I can see that a connecting is established via NetStat with a port being 
>> opened on both boxes.
>>
>> Has any one else experienced this problem?
>>
>> Thanks
>>
>>
>> -- 
>> 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/3f02999b-fbb4-4c82-92a8-e96bc9a05967n%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/058dc8e8-f145-4901-aa4a-76e586df2862n%40googlegroups.com.


Re: Jenkins Upgrade 2.235.1 to 2.263.3 All Nodes Can't Connect

2021-02-12 Thread Mark Waite
The Jenkins 2.249.1 upgrade guide notes that Microsot.NET 2.0 support has
been removed.  See
https://www.jenkins.io/doc/upgrade-guide/2.249/#upgrading-to-jenkins-lts-2-249-1
in case that affects your installation.

On Fri, Feb 12, 2021 at 7:49 AM 'Minimos' via Jenkins Users <
jenkinsci-users@googlegroups.com> wrote:

> Hi,
>
> We recently updated Jenkins as per the subject line on our Windows boxes
>
> All plugins were updated at the same time, however we can no longer get
> our nods to communicate with the master.
>
> A Java Io exception of Connection time Out is displayed.  There have been
> no changes to our firewall or network.
>
> I can see that a connecting is established via NetStat with a port being
> opened on both boxes.
>
> Has any one else experienced this problem?
>
> Thanks
>
>
> --
> 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/3f02999b-fbb4-4c82-92a8-e96bc9a05967n%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/CAO49JtFP0Q8Cx2okoJT%2Bp4dE-RTPy29eOzyVts0qOaySM4Sdkw%40mail.gmail.com.


Unable to link to Jenkins to confluence

2021-02-12 Thread Portret Mallick
What will be the username and  of Confluence Sites?

While trying to insert username  and password and checking Login, it is 
showing error.


Failed to 
logincom.atlassian.confluence.api.service.exceptions.NotFoundException 
at 
com.atlassian.confluence.rest.client.AbstractRemoteService.lambda$getFuture$0(AbstractRemoteService.java:70)
 

at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) 
at 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
 

at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
 

at java.base/java.lang.Thread.run(Thread.java:834) 





 

Delete

-- 
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/903d8850-2414-4cb2-80ee-7458eb1146c1n%40googlegroups.com.


Jenkins Upgrade 2.235.1 to 2.263.3 All Nodes Can't Connect

2021-02-12 Thread 'Minimos' via Jenkins Users
Hi,

We recently updated Jenkins as per the subject line on our Windows boxes

All plugins were updated at the same time, however we can no longer get our 
nods to communicate with the master.

A Java Io exception of Connection time Out is displayed.  There have been 
no changes to our firewall or network.

I can see that a connecting is established via NetStat with a port being 
opened on both boxes.

Has any one else experienced this problem?

Thanks


-- 
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/3f02999b-fbb4-4c82-92a8-e96bc9a05967n%40googlegroups.com.


Exclude Paths from Triggering Builds

2021-02-12 Thread Ven H
I have a repository in GitHub. This repository has a Jenkinsfile at the
root which is the app project. There are 2 more folders / directories, one
for Config project and one for Database project. Each has a jenkins file
inside it.

We have 3 Multibranch Jenkins Pipelines, since there are 3
different modules / projects. But all of them belong to the same GitHub
repository. The challenge is that, if the DB developer modifies any file
inside the DB directory, other jobs are also triggered (App and Config). If
a file is changed in the Config directory, it triggers App and DB jobs,
probably because all are inside the same repository.

Is there a way to ensure that any change in DB directory will only trigger
the DB Multibranch job and not the App and Config and vice versa?
Basically, I am looking for an option to exclude DB and Config directory
from triggering App Build and so on. Please help.

Regards,
Venkatesh

-- 
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/CAPp28er63DJce_-%2Be8c8_S_H2qd07cr20ZEndS8HYZfRgAc2%2Bg%40mail.gmail.com.


Re: Set-Variable : Cannot process command because of one or more missing mandatory parameters: Name.

2021-02-12 Thread Amedee Van Gasse
I just noticed that there is still an error:

Set-Variable: Cannot process command because of one or more missing 
mandatory parameters: Name.

That is because in *Bash* (Linux) and *MS-DOS* (Windows), you can just type 
set to get a list of all environment variables.
However, in *PowerShell* (cross-platform), the equivalent command is ls Env: 
(including 
the colon : at the end!)
If you type set in PowerShell, it interprets that as the cmdlet Set-Variable, 
which expects a mandatory parameter -Name.

Fortunately this is not a fatal error for the Jenkins connection, because 
it's just a debugging statement.

-- 
Amedee

On Friday, February 12, 2021 at 11:42:12 AM UTC+1 Amedee Van Gasse wrote:

> I'm happy to report that Jenkins works fine with PowerShell 7!
>
>
> I have this in my connection log:
>
> [02/12/21 10:58:38] [SSH] SSH host key matches key seen previously for 
> this host. Connection will be allowed.
> [02/12/21 10:58:38] [SSH] Authentication successful.
> [02/12/21 10:58:50] [SSH] The remote user's environment is:
> [91mSet-Variable: [91mCannot process command because of one or more 
> missing mandatory parameters: Name. [0m
> [02/12/21 10:58:53] [SSH] Checking java version of 
> C:\Users\jenkins/jdk/bin/java
> [02/12/21 10:58:57] [SSH] C:\Users\jenkins/jdk/bin/java -version returned 
> 11.0.10.
> [02/12/21 10:58:57] [SSH] Starting sftp client.
> [02/12/21 10:58:58] [SSH] Copying latest remoting.jar...
> [02/12/21 10:58:59] [SSH] Copied 1,521,553 bytes.
> Expanded the channel window size to 4MB
> [02/12/21 10:58:59] [SSH] Starting agent process: cd "C:\Users\jenkins" && 
> C:\Users\jenkins/jdk/bin/java  -jar remoting.jar -workDir C:\Users\jenkins 
> -jar-cache C:\Users\jenkins/remoting/jarCache
> Feb 12, 2021 9:59:02 AM org.jenkinsci.remoting.engine.WorkDirManager 
> initializeWorkDir
> INFO: Using C:\Users\jenkins\remoting as a remoting work directory
> Feb 12, 2021 9:59:02 AM org.jenkinsci.remoting.engine.WorkDirManager 
> setupLogging
> INFO: Both error and output logs will be printed to 
> C:\Users\jenkins\remoting
> <===[JENKINS REMOTING CAPACITY]===>channel started
> Remoting version: 4.5
> This is a Windows agent
> WARNING: An illegal reflective access operation has occurred
> WARNING: Illegal reflective access by 
> org.jenkinsci.plugins.envinject.service.EnvInjectMasterEnvVarsSetter to 
> field java.lang.reflect.Field.modifiers
> WARNING: Please consider reporting this to the maintainers of 
> org.jenkinsci.plugins.envinject.service.EnvInjectMasterEnvVarsSetter
> WARNING: Use --illegal-access=warn to enable warnings of further illegal 
> reflective access operations
> WARNING: All illegal access operations will be denied in a future release
> Agent successfully connected and online
> The Agent is connected, disconnect it before to try to connect it again.
>
> The An illegal reflective access operation has occurred is probably 
> something something Java 11, and I always ignore such warnings.
> Maybe someone should consider reporting this to the maintainers of 
> org.jenkinsci.plugins.envinject.service.EnvInjectMasterEnvVarsSetter? :-)
>
>
> This is how I configured the node with Ansible:
>
> - name: Install Win32-OpenSSH service
>   win_chocolatey:
> name: openssh
> package_params: /SSHServerFeature
> state: present
>   ignore_errors: yes
>
> - name: Install Powershell Core
>   win_chocolatey:
> name: powershell-core
> state: present
>
> - name: Set the default SSH shell to PowerShell
>   win_regedit:
> path: HKLM:\SOFTWARE\OpenSSH
> name: DefaultShell
> data: C:\Program Files\PowerShell\7\pwsh.exe
>
> The ignore_errors: yes with openssh is because I use the same Ansible 
> playbook for Packer (which goes to AWS) and Vagrant (which is for testing 
> on my local machine), and the local VM already has SSH running and I 
> haven't bothered yet with debugging that, so I just ignore the error when 
> Chcoclatey can't install OpenSSH due to port 22 already in use.
>
> But anyway: for anyone not using Ansible: you need to set the registry key 
> HKLM:\SOFTWARE\OpenSSH to the full path of pwsh.exe.
> Powershell legacy and Powershell Core have a different executable name, 
> intentionally, so they can be used side-by-side.
>
> I hope this is useful for anyone.
>
> -- 
> Amedee
>
>
> On Thursday, February 11, 2021 at 11:32:53 AM UTC+1 Amedee Van Gasse wrote:
>
>> That would actually be great and very much appreciated.
>>
>>
>> I've been down the rabbit hole a bit further and found something that may 
>> be of interest.
>>
>> From what I've seen from the error, Jenkins sends compound shell commands 
>> to the node, with "&&" as pipeline chain operator.
>> "&&" has the same function in Bash as well as in MS-DOS.
>> PowerShell Windows (up to version 5 I guess) doesn't know '&&', there you 
>> have to use '-and'.
>> However, PowerShell 7 (PowerShell Core, the open source cross-platform 
>> version) does implement pipeline chain operators.
>> See 
>> 

Re: Set-Variable : Cannot process command because of one or more missing mandatory parameters: Name.

2021-02-12 Thread Amedee Van Gasse
I'm happy to report that Jenkins works fine with PowerShell 7!


I have this in my connection log:

[02/12/21 10:58:38] [SSH] SSH host key matches key seen previously for this 
host. Connection will be allowed.
[02/12/21 10:58:38] [SSH] Authentication successful.
[02/12/21 10:58:50] [SSH] The remote user's environment is:
 [91mSet-Variable:  [91mCannot process command because of one or more 
missing mandatory parameters: Name. [0m
[02/12/21 10:58:53] [SSH] Checking java version of 
C:\Users\jenkins/jdk/bin/java
[02/12/21 10:58:57] [SSH] C:\Users\jenkins/jdk/bin/java -version returned 
11.0.10.
[02/12/21 10:58:57] [SSH] Starting sftp client.
[02/12/21 10:58:58] [SSH] Copying latest remoting.jar...
[02/12/21 10:58:59] [SSH] Copied 1,521,553 bytes.
Expanded the channel window size to 4MB
[02/12/21 10:58:59] [SSH] Starting agent process: cd "C:\Users\jenkins" && 
C:\Users\jenkins/jdk/bin/java  -jar remoting.jar -workDir C:\Users\jenkins 
-jar-cache C:\Users\jenkins/remoting/jarCache
Feb 12, 2021 9:59:02 AM org.jenkinsci.remoting.engine.WorkDirManager 
initializeWorkDir
INFO: Using C:\Users\jenkins\remoting as a remoting work directory
Feb 12, 2021 9:59:02 AM org.jenkinsci.remoting.engine.WorkDirManager 
setupLogging
INFO: Both error and output logs will be printed to 
C:\Users\jenkins\remoting
<===[JENKINS REMOTING CAPACITY]===>channel started
Remoting version: 4.5
This is a Windows agent
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by 
org.jenkinsci.plugins.envinject.service.EnvInjectMasterEnvVarsSetter to 
field java.lang.reflect.Field.modifiers
WARNING: Please consider reporting this to the maintainers of 
org.jenkinsci.plugins.envinject.service.EnvInjectMasterEnvVarsSetter
WARNING: Use --illegal-access=warn to enable warnings of further illegal 
reflective access operations
WARNING: All illegal access operations will be denied in a future release
Agent successfully connected and online
The Agent is connected, disconnect it before to try to connect it again.

The An illegal reflective access operation has occurred is probably 
something something Java 11, and I always ignore such warnings.
Maybe someone should consider reporting this to the maintainers of 
org.jenkinsci.plugins.envinject.service.EnvInjectMasterEnvVarsSetter? :-)


This is how I configured the node with Ansible:

- name: Install Win32-OpenSSH service
  win_chocolatey:
name: openssh
package_params: /SSHServerFeature
state: present
  ignore_errors: yes

- name: Install Powershell Core
  win_chocolatey:
name: powershell-core
state: present

- name: Set the default SSH shell to PowerShell
  win_regedit:
path: HKLM:\SOFTWARE\OpenSSH
name: DefaultShell
data: C:\Program Files\PowerShell\7\pwsh.exe

The ignore_errors: yes with openssh is because I use the same Ansible 
playbook for Packer (which goes to AWS) and Vagrant (which is for testing 
on my local machine), and the local VM already has SSH running and I 
haven't bothered yet with debugging that, so I just ignore the error when 
Chcoclatey can't install OpenSSH due to port 22 already in use.

But anyway: for anyone not using Ansible: you need to set the registry key 
HKLM:\SOFTWARE\OpenSSH to the full path of pwsh.exe.
Powershell legacy and Powershell Core have a different executable name, 
intentionally, so they can be used side-by-side.

I hope this is useful for anyone.

-- 
Amedee


On Thursday, February 11, 2021 at 11:32:53 AM UTC+1 Amedee Van Gasse wrote:

> That would actually be great and very much appreciated.
>
>
> I've been down the rabbit hole a bit further and found something that may 
> be of interest.
>
> From what I've seen from the error, Jenkins sends compound shell commands 
> to the node, with "&&" as pipeline chain operator.
> "&&" has the same function in Bash as well as in MS-DOS.
> PowerShell Windows (up to version 5 I guess) doesn't know '&&', there you 
> have to use '-and'.
> However, PowerShell 7 (PowerShell Core, the open source cross-platform 
> version) does implement pipeline chain operators.
> See 
> https://docs.microsoft.com/en-us/powershell/scripting/whats-new/what-s-new-in-powershell-70?view=powershell-7
>
> I don't know if that will solve all of the issues with PowerShell, but 
> it's definitely worth giving a shot.
> I'll try it out and report back here.
>
> On Wednesday, February 10, 2021 at 8:05:15 PM UTC+1 slide wrote:
>
>> FYI, I started to look at this again and will hopefully have a PR soon.
>>
>> On Tue, Feb 9, 2021, 08:07 Slide  wrote:
>>
>>> That will cause problems, the ssh-agents-plugin is not set up to handle 
>>> PowerShell as the default shell. I looked into it a while back but didn't 
>>> make good progress.
>>>
>>> On Tue, Feb 9, 2021 at 2:45 AM Amedee Van Gasse  
>>> wrote:
>>>
 FYI PowerShell is the default SSH shell on this machine.

 On Tuesday, February 9, 2021 at 10:27:38 AM UTC+1 Amedee Van Gasse 
 wrote:

> I got this when 

Re: how can I get the value of a global variable within a function in a pipeline?

2021-02-12 Thread jesus fernandez
Thanks a lot Victor, the links provided made it much clear now and the 
example worked just fine. You are always saving me hehe

El jueves, 11 de febrero de 2021 a las 22:11:15 UTC+1, 
victormar...@gmail.com escribió:

> You can simplify it quite a bit with the post stage event 
> https://www.jenkins.io/doc/book/pipeline/syntax/#post
>
> The example pipeline uses the post *stages* section, you can use the one 
> specific the stage 3
>
> Another example can be found in 
> https://www.jenkins.io/blog/2017/02/15/declarative-notifications/
>
> Environment variables within an environment section are immutable, though 
> you can use the script closure with the env map to set a new env variable 
> that can be override
>
> For instance:
>
> stage(“stage 3”) {
>   steps{
>  script{
>env.FAILED_STAGE=env.STAGE_NAME
>  }
>  error ...
>   }
> }
>
> Cheers
>
>
>
>
>
> See 
>
> On Thursday, 11 February 2021 at 17:56:40 UTC jesusfern...@gmail.com 
> wrote:
>
>>
>> I have a declarative pipeline with a few steps. at the end I send a message 
>> to slack with some statistics of the compilation times and some more 
>> information. I want to send in case it fails the stage at which it fails. I 
>> have set a global variable but the function does not seem to be able to read 
>> its value. This is a simplified version of what I have: 
>>
>> ```
>> def FAILED_STAGE
>>
>> def sendSlackNotifcation() 
>> {
>> if ( currentBuild.currentResult == "SUCCESS" ) {
>>
>> slackSend message: "${currentBuild.result}", channel: '#jenkins_bot2'
>> }
>> 
>> else {
>>
>> slackSend color : "#FF", message: "${FAILED_STAGE}", channel: 
>> '#jenkins_bot2'
>>
>> }
>> }
>>
>> pipeline {
>> agent any
>>
>> stages {
>> stage('stage1') {
>> steps{
>> echo "stage1"
>> }
>> } 
>> 
>> stage('stage2') {
>> steps{
>> echo "stage2"
>> }
>> }
>> 
>> stage("Stage 3") {
>> steps {
>> script {
>> FAILED_STAGE=env.STAGE_NAME
>> echo "${FAILED_STAGE}"
>> error "failed for some reason."
>> }
>> }
>> }
>> }
>> post {
>> failure {
>> sendSlackNotifcation()
>> }
>> }
>>
>> }
>> ```
>> And this is the output I get:
>> ```
>> 13:38:53  [Pipeline] {
>> 13:38:53  [Pipeline] stage
>> 13:38:53  [Pipeline] { (stage1)
>> 13:38:53  [Pipeline] echo
>> 13:38:53  stage1
>> 13:38:53  [Pipeline] }
>> 13:38:53  [Pipeline] // stage
>> 13:38:53  [Pipeline] stage
>> 13:38:53  [Pipeline] { (stage2)
>> 13:38:53  [Pipeline] echo
>> 13:38:53  stage2
>> 13:38:53  [Pipeline] }
>> 13:38:53  [Pipeline] // stage
>> 13:38:53  [Pipeline] stage
>> 13:38:53  [Pipeline] { (Stage 3)
>> 13:38:53  [Pipeline] script
>> 13:38:53  [Pipeline] {
>> 13:38:53  [Pipeline] echo
>> 13:38:53  Stage 3
>> 13:38:53  [Pipeline] error
>> 13:38:53  [Pipeline] }
>> 13:38:53  [Pipeline] // script
>> 13:38:53  [Pipeline] }
>> 13:38:53  [Pipeline] // stage
>> 13:38:53  [Pipeline] stage
>> 13:38:53  [Pipeline] { (Declarative: Post Actions)
>> 13:38:53  Error when executing failure post condition:
>>
>> 13:38:53  groovy.lang.MissingPropertyException: No such property: 
>> FAILED_STAGE for class: WorkflowScript
>> ```
>>
>

-- 
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/16c44a41-f7a2-4c4e-94d3-c820bebdf138n%40googlegroups.com.