Re: Build on all agents

2021-04-06 Thread Mark Waite
Yes.  The Jenkins Pipeline can request to build on all available agents or
on all agents that match a specific label.  See nodesByLabel.

Here's an example:

def nodes = nodesByLabel label: '!windows'
nodes = nodes.sort()

Map tasks = [:]

for (int i = 0; i < nodes.size(); i++) {
def label = nodes[i]
def stageName = 'Check git cache ' +
label.replaceAll('(-jagent)|(-ssh)|(-mwaite)|(.markwaite.net)|(-beemarkwaite)|(-jenkins)',
'')
tasks[label] = {
node(label) {
stage(stageName) {
if (isUnix()) {
sh '[ -d /var/lib/git/mwaite ] || (echo
/var/lib/git/mwaite directory not found; exit 1)'
} else {
bat 'echo git cache check not implemented for Windows'
}
}
}
}
}

timeout(time: 3, unit: 'MINUTES') {
parallel(tasks)
}

Jenkins multi-configuration jobs can also build on all agents that match a
particular label, using either the elastic axis plugin or the node label
parameters plugin.

Mark Waite

On Tue, Apr 6, 2021 at 2:36 PM pe...@pjksolutions.com 
wrote:

>
> Hi all, I have one master Jenkins CI server and four slaves is is possible
> to build a project on all agents simultaneously ?
>
> --
> 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/e974d160-b2b1-41ca-b23a-5f5ef296831en%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/CAO49JtFJsKhyfHmCFfb6Nt8ytJP-fXvfs6_rozRLUOHTimqfRQ%40mail.gmail.com.


Build on all agents

2021-04-06 Thread pe...@pjksolutions.com

Hi all, I have one master Jenkins CI server and four slaves is is possible 
to build a project on all agents simultaneously ?

-- 
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/e974d160-b2b1-41ca-b23a-5f5ef296831en%40googlegroups.com.


Re: I cannot run Azure CLI commands from jenkins pipeline

2021-04-06 Thread 'Martin Schmude' via Jenkins Users
Maybe az has not been installed on the system where the job is executed.
Or az is not part of the PATH variable in the context of the job execution.
Let the job execute "echo $env:path" before any "az ..." commands, so that 
it prints out its path environment variable.

jesusfern...@gmail.com schrieb am Dienstag, 6. April 2021 um 13:21:16 UTC+2:

> I am trying to run some az commands from a Jenkins pipeline which (running 
> in Windows 10) I already used in my laptop´s Jenkins, but when trying to 
> use it on another computer (also running w10) I get this error : 
> ```
> 11:12:47  powershell.exe : az : The term 'az' is not recognized as the 
> name of a cmdlet, function, script file, or operable program. Check the 
> 11:12:47  At 
> C:\Users\User\.jenkins\workspace\playground@tmp\durable-933c3d89\powershellWrapper.ps1:3
>  
> char:1
> 11:12:47  + & powershell -NoProfile -NonInteractive -ExecutionPolicy 
> Bypass -Comm ...
> 11:12:47  + 
> ~
> 11:12:47  + CategoryInfo  : NotSpecified: (az : The term 
> '...ram. Check the :String) [], RemoteException
> 11:12:47  + FullyQualifiedErrorId : NativeCommandError
> 11:12:47   
> 11:12:47  spelling of the name, or if a path was included, verify that the 
> path is correct and try again.
> 11:12:47  At 
> C:\Users\User\.jenkins\workspace\playground\tmp\durable-933c3d89\powershellScript.ps1:3
>  
> char:25
> 11:12:47  + az devops configure --defaults 
> organization=h ...
> 11:12:47  + ~~
> 11:12:47  + CategoryInfo  : ObjectNotFound: (az:String) [], 
> CommandNotFoundException
> 11:12:47  + FullyQualifiedErrorId : CommandNotFoundException
> 11:12:47   
> 11:12:47  az : The term 'az' is not recognized as the name of a cmdlet, 
> function, script file, or operable program. Check the 
> 11:12:47  spelling of the name, or if a path was included, verify that the 
> path is correct and try again.
> 11:12:47  At 
> C:\Users\User\.jenkins\workspace\playground@tmp\durable-933c3d89\powershellScript.ps1:4
>  
> char:35
> 11:12:47  + $output = az boards work-item show 
> --id=89609 ...
> 11:12:47  +   ~~
> 11:12:47  + CategoryInfo  : ObjectNotFound: (az:String) [], 
> CommandNotFoundException
> 11:12:47  + FullyQualifiedErrorId : CommandNotFoundException
> ```
> However running any command from the cmd / powershell works fine. I have 
> set the ```Set-ExecutionPolicy Unrestricted``` command but I do not get any 
> hint of what is going wrong
>

-- 
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/c0d50cf9-303a-4c81-b735-d5989714336cn%40googlegroups.com.


Re: Jenkins docker secondary node launch takes a lot of time

2021-04-06 Thread 'Venkat Vemuri' via Jenkins Users
Hi Team,
It took almost 20 min to connect, Got the below message, Can someone help.

INFO: Failed to connect via ssh: There was a problem while connecting to 
172.31.15.89:22 Apr 06, 2021 3:23:36 PM hudson.plugins.ec2.EC2Cloud INFO: 
Waiting for SSH to come up. Sleeping 5. Apr 06, 2021 3:23:41 PM 
hudson.plugins.ec2.EC2Cloud INFO: Connecting to 172.31.15.89 on port 22, 
with timeout 1. Apr 06, 2021 3:23:42 PM hudson.plugins.ec2.EC2Cloud 
INFO: The SSH key ssh-ed25519 
8f:be:9f:c3:6a:af:e0:a4:11:db:d6:22:2b:99:bb:c2 has been successfully 
checked against the instance console for connections to EC2 (Shortlist) - 
Docker builder (sir-64c8nbbp) Apr 06, 2021 3:23:42 PM 
hudson.plugins.ec2.EC2Cloud INFO: Connected via SSH. Apr 06, 2021 3:23:42 
PM hudson.plugins.ec2.EC2Cloud INFO: connect fresh as root Apr 06, 2021 
3:23:42 PM hudson.plugins.ec2.EC2Cloud INFO: Connecting to 172.31.15.89 on 
port 22, with timeout 1. Apr 06, 2021 3:23:42 PM 
hudson.plugins.ec2.EC2Cloud INFO: Connection allowed after the host key has 
been verified Apr 06, 2021 3:23:42 PM hudson.plugins.ec2.EC2Cloud INFO: 
Connected via SSH. Apr 06, 2021 3:23:42 PM hudson.plugins.ec2.EC2Cloud 
INFO: Creating tmp directory (/tmp) if it does not exist Apr 06, 2021 
3:23:42 PM hudson.plugins.ec2.EC2Cloud INFO: Verifying: java -fullversion 
openjdk full version "1.8.0_282-b08" Apr 06, 2021 3:23:42 PM 
hudson.plugins.ec2.EC2Cloud INFO: Verifying: which scp /usr/bin/scp Apr 06, 
2021 3:23:42 PM hudson.plugins.ec2.EC2Cloud INFO: Copying remoting.jar to: 
/tmp Apr 06, 2021 3:23:43 PM hudson.plugins.ec2.EC2Cloud INFO: Launching 
remoting agent (via Trilead SSH2 Connection): java -jar /tmp/remoting.jar 
-workDir /home/ec2-user <===[JENKINS REMOTING CAPACITY]===>Remoting 
version: 4.3 This is a Unix agent Evacuated stdout

Regards
Venkat

On Tuesday, April 6, 2021 at 9:00:09 PM UTC+5:30 Venkat Vemuri wrote:

> Hi Team,
>
> Getting the below message and docker secondary node launch takes a lot of 
> time
>
> Apr 06, 2021 3:16:09 PM hudson.plugins.ec2.EC2Cloud INFO: Waiting for SSH 
> to come up. Sleeping 5. Apr 06, 2021 3:16:14 PM hudson.plugins.ec2.EC2Cloud 
> INFO: Connecting to 172.31.15.89 on port 22, with timeout 1. Apr 06, 
> 2021 3:16:15 PM hudson.plugins.ec2.EC2Cloud INFO: The instance EC2 
> (Shortlist) - Docker builder (sir-64c8nbbp) has a blank console. Maybe the 
> console is yet not available. If enough time has passed, consider changing 
> the key verification strategy or the AMI used by one printing out the host 
> key in the instance console Apr 06, 2021 3:16:15 PM 
> hudson.plugins.ec2.EC2Cloud INFO: The instance console is blank. Cannot 
> check the key. The connection to EC2 (Shortlist) - Docker builder 
> (sir-64c8nbbp) is not allowed Apr 06, 2021 3:16:15 PM 
> hudson.plugins.ec2.EC2Cloud
>
> Regards
> Venkat

-- 
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/f4e5d3e2-da6b-4f1b-a9fb-da72e7c60820n%40googlegroups.com.


Jenkins docker secondary node launch takes a lot of time

2021-04-06 Thread 'Venkat Vemuri' via Jenkins Users
Hi Team,

Getting the below message and docker secondary node launch takes a lot of 
time

Apr 06, 2021 3:16:09 PM hudson.plugins.ec2.EC2Cloud INFO: Waiting for SSH 
to come up. Sleeping 5. Apr 06, 2021 3:16:14 PM hudson.plugins.ec2.EC2Cloud 
INFO: Connecting to 172.31.15.89 on port 22, with timeout 1. Apr 06, 
2021 3:16:15 PM hudson.plugins.ec2.EC2Cloud INFO: The instance EC2 
(Shortlist) - Docker builder (sir-64c8nbbp) has a blank console. Maybe the 
console is yet not available. If enough time has passed, consider changing 
the key verification strategy or the AMI used by one printing out the host 
key in the instance console Apr 06, 2021 3:16:15 PM 
hudson.plugins.ec2.EC2Cloud INFO: The instance console is blank. Cannot 
check the key. The connection to EC2 (Shortlist) - Docker builder 
(sir-64c8nbbp) is not allowed Apr 06, 2021 3:16:15 PM 
hudson.plugins.ec2.EC2Cloud

Regards
Venkat

-- 
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/518e2b66-76cf-4b7d-adc0-6bb0fa44c086n%40googlegroups.com.


Re: Jenkins 2.277.1 Issue?

2021-04-06 Thread xJom
So, the https://github.com/jenkinsci/plugin-installation-manager-tool 
really saved my day. I went through the plugins directory and checked 
against the compatibility list, and upgraded all of the plugins with the 
Plugin Installation Manager Tool. And finally we are up-and-running again!

fredag 2 april 2021 kl. 14:37:53 UTC+2 skrev xJom:

> I have the same problem on one of my instances, but I also have the 
> problem that I cannot go back to previous version, because it destroys the 
> other instances. I think there is a compatibility issue for plugins, and if 
> you could go back, then update all your plugins according to the 
> compatility matrix here. 
> https://github.com/jenkinsci/jep/blob/master/jep/227/compatibility.adoc
> For me, I think I need to try to upgrade the plugins manually...
>
> måndag 22 mars 2021 kl. 16:15:15 UTC+1 skrev eric@gmail.com:
>
>> Hi!  Last week we took 2.277.1 when patching.  I didn't see any issues 
>> until this morning when I tried to log on and got 403 No valid crumb was 
>> included in the request.  I restarted the server a few times trying to fix 
>> it but never could get logged in.  I did some research and found a thread 
>> telling me to make a global security setting change to proxy compatibility 
>> (even though I'm not proxied), but couldn't get to global security to try 
>> that.  So I backed it out to 2.263.4, where we were before.  It's working 
>> again, but I'm guessing the same thing will happen next time we apply 
>> patches.  Is there a change with 277 that will make me have to change some 
>> setting or another?  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/cf872f38-d840-4521-be24-0924ba627bcbn%40googlegroups.com.


Launch Slave Agent Error when using "Tunnel connection through: local address of Jenkins server"

2021-04-06 Thread Abdel Rahman Gezawi
Dear Community,

I  am new to Jenkins and trying to add a second slave to Windows machine, I
got the error:

Launch Slave Agent Error when using  "Tunnel connection through: local
address of Jenkins server" : SEVERE: For input string: "local Address of my
Jenkins Server" java.lang.NumberFormatException: For input string: "local
Address of Jenkins" at
java.lang.NumberFormatException.forInputString(Unknown Source) at
java.lang.Integer.parseInt(Unknown Source) at
java.lang.Integer.parseInt(Unknown Source) at
org.jenkinsci.remoting.engine.HostPort.splitHostPort(HostPort.java:33) at
org.jenkinsci.remoting.engine.HostPort.(HostPort.java:16) at
org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver.resolve(JnlpAgentEndpointResolver.java:339)
at hudson.remoting.Engine.innerRun(Engine.java:694) at
hudson.remoting.Engine.run(Engine.java:519)


Slave is Windows 10 and Master is Windows Server 2016

Do you have any suggessions?


Thanks,

AbdelRahman

-- 
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/CA%2ByezuAm-_Y_wXk-FV0OPe8e7qdJ9YfiaZAYP6dSu9KQC4STFA%40mail.gmail.com.


I cannot run Azure CLI commands from jenkins pipeline

2021-04-06 Thread jesus fernandez
I am trying to run some az commands from a Jenkins pipeline which (running 
in Windows 10) I already used in my laptop´s Jenkins, but when trying to 
use it on another computer (also running w10) I get this error : 
```
11:12:47  powershell.exe : az : The term 'az' is not recognized as the name 
of a cmdlet, function, script file, or operable program. Check the 
11:12:47  At 
C:\Users\User\.jenkins\workspace\playground@tmp\durable-933c3d89\powershellWrapper.ps1:3
 
char:1
11:12:47  + & powershell -NoProfile -NonInteractive -ExecutionPolicy Bypass 
-Comm ...
11:12:47  + 
~
11:12:47  + CategoryInfo  : NotSpecified: (az : The term 
'...ram. Check the :String) [], RemoteException
11:12:47  + FullyQualifiedErrorId : NativeCommandError
11:12:47   
11:12:47  spelling of the name, or if a path was included, verify that the 
path is correct and try again.
11:12:47  At 
C:\Users\User\.jenkins\workspace\playground\tmp\durable-933c3d89\powershellScript.ps1:3
 
char:25
11:12:47  + az devops configure --defaults 
organization=h ...
11:12:47  + ~~
11:12:47  + CategoryInfo  : ObjectNotFound: (az:String) [], 
CommandNotFoundException
11:12:47  + FullyQualifiedErrorId : CommandNotFoundException
11:12:47   
11:12:47  az : The term 'az' is not recognized as the name of a cmdlet, 
function, script file, or operable program. Check the 
11:12:47  spelling of the name, or if a path was included, verify that the 
path is correct and try again.
11:12:47  At 
C:\Users\User\.jenkins\workspace\playground@tmp\durable-933c3d89\powershellScript.ps1:4
 
char:35
11:12:47  + $output = az boards work-item show 
--id=89609 ...
11:12:47  +   ~~
11:12:47  + CategoryInfo  : ObjectNotFound: (az:String) [], 
CommandNotFoundException
11:12:47  + FullyQualifiedErrorId : CommandNotFoundException
```
However running any command from the cmd / powershell works fine. I have 
set the ```Set-ExecutionPolicy Unrestricted``` command but I do not get any 
hint of what is going wrong

-- 
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/5b733163-a0c1-40c5-b747-2ba12bd09f2en%40googlegroups.com.