Re: wrong workspace picked up by node(..) when running parallel jobs

2017-10-25 Thread Robert Hales
There is no guarantee that you will get the same workspace on a node. It 
will try, but a workspace can only be in use by 1 job at a time. So if you 
require a specific workspace, you have a few options: 

Define a custom workspace with the ws step. But I think 2 jobs still can't 
use it at the same time.
Stash/unstash the files you need to persist across nodes or stages
set into a directory outside of the workspace to do what needs to be shared
Use resource locking so that other jobs wait to access the workspace. Still 
not guaranteed to get the same workspace. 
Use resource locking combined with ws to specify a specific workspace and 
other jobs will wait for access to it. 
Specify a custom workspace and don't allow the job to run more than 1 build 
at a time. 

On Wednesday, October 25, 2017 at 5:15:39 PM UTC-6, Torsten Reinhard wrote:
>
> Hi, 
>
> this pipeline sample fails, when started multiple times and running in 
> parallel at the same time.
> Assigning a captured node again seems to be not enough - the workspace 
> isn´t matching than what will lead to very strange behaviour.
>
> import com.cloudbees.groovy.cps.NonCPS
>
> String buildNode
> String buildNodeWS
>
> @NonCPS 
> assertWorkspaces(current, expected ) {
> assert current == expected
> }
>
> node() {
> buildNode = env.NODE_NAME
> buildNodeWS = env.WORKSPACE
> echo "performing build on node ${buildNode} in ${buildNodeWS}"
> }
>
> checkpoint("built")
> node('sdp') { 
> echo "running on any node, currently it´s ${env.NODE_NAME}"
> }
> checkpoint("deployed")
>
> node( buildNode ) {
> String currentWS = env.WORKSPACE
> echo "running on ${buildNode} again - it´s ${env.NODE_NAME} in 
> ${currentWS}"
> 
> assertWorkspaces(currentWS, buildNodeWS)
> }
>
> Do I have to manage the workspace by myself - or is that a bug to be 
> reported?
>
> What do you think ?
>
> Torsten
>

-- 
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/d39b50ba-6722-48be-aacf-fc5c06e0756b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


wrong workspace picked up by node(..) when running parallel jobs

2017-10-25 Thread Torsten Reinhard
Hi, 

this pipeline sample fails, when started multiple times and running in 
parallel at the same time.
Assigning a captured node again seems to be not enough - the workspace 
isn´t matching than what will lead to very strange behaviour.

import com.cloudbees.groovy.cps.NonCPS

String buildNode
String buildNodeWS

@NonCPS 
assertWorkspaces(current, expected ) {
assert current == expected
}

node() {
buildNode = env.NODE_NAME
buildNodeWS = env.WORKSPACE
echo "performing build on node ${buildNode} in ${buildNodeWS}"
}

checkpoint("built")
node('sdp') { 
echo "running on any node, currently it´s ${env.NODE_NAME}"
}
checkpoint("deployed")

node( buildNode ) {
String currentWS = env.WORKSPACE
echo "running on ${buildNode} again - it´s ${env.NODE_NAME} in 
${currentWS}"

assertWorkspaces(currentWS, buildNodeWS)
}

Do I have to manage the workspace by myself - or is that a bug to be 
reported?

What do you think ?

Torsten

-- 
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/de418afb-05cd-4d96-bfdb-cf7cee9f4f9e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Agents not connecting after 2.60.3 Jenkins upgrade

2017-10-25 Thread Mark Waite
Are your build agents all running JRE 8?  If not, they won't connect to 
Jenkins 2.60 and later.  Java 8 is required.

Mark Waite

On Wednesday, October 25, 2017 at 1:19:00 PM UTC-6, edward.b...@sovos.com 
wrote:
>
> Hello,
>
>  
>
> I am attempting to upgrade Jenkins on one of our sandboxes to the latest 
> LTS version (2.73.2). The issue I have encountered is after upgrading, our 
> build agents have all lost their connection to the master. I tried this a 
> couple different ways to find out when the issue starts.
>
>  
>
> Attempt #1: 2.24 > 2.73.2
>
>1. Replace the jenkins.war with the 2.73.2 jenkins.war 
>2. Edit the jenkins.xml to point to JRE 1.8 
>3. Start the Jenkins service 
>4. Jenkins starts up fine, but our three build agents are offline. 
>5. Replaced the slave.war on build agent #1. 
>6. Verify in the Jenkins-slave.xml points to JRE 1.8 (It already was) 
>7. Started the agent service. Still does not go online. 
>8. Try to connect via jnlp, but the connection times out. 
>9. Updated all plugins 
>10. Stop/Start the Jenkins service. 
>11. Stop/Start the Jenkins agent service. Agent still offline. 
>12. Start via jnlp. Connection times out. 
>
>  
>
> Attempt #2: 2.24 > 2.32.3 > 2.46.3 > 2.60.3
>
>1. Revert to the original snapshot
>2. Upgrade to 2.32.3, then to 2.46.3 (Found no issues) 
>3. Replace the jenkins.war with the 2.60.3 jenkins.war 
>4. Edit the jenkins.xml to point to JRE 1.8 
>5. Start the Jenkins service 
>6. Jenkins starts up fine, but our three build agents are offline. 
>7. Replaced the slave.war on build agent #1. 
>8. Verify in the Jenkins-slave.xml points to JRE 1.8 (It already was) 
>9. Started the agent service. Still does not go online. 
>10. Try to connect via jnlp, but the connection times out. 
>
>  
>
>  
>
> Here is the connection timeout error (Same error in both attempts):
>
>
> 
>  
>
>  
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> Some additional information:
>
> Master: Windows Server 2008 R2
>
> Agent 1: Windows Server 2008 R2
>
>
> - I was thinking the random ports would be an issue, since the jnlp 
> connects using a random port each time, but this is how our Jenkins has 
> been configured in previous versions and currently in production.
>
> - The issue occurs starting with the upgrade to 2.60.3. Both versions 
> 2.32.3 and 2.46.3 work fine.
>
>  
>
> Any help would be appreciated. I can provide any additional information as 
> needed.
>
>  
>
> Thank you,
>
> Eddie 
>

-- 
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/80858d89-13ca-4644-b545-fc93fd2bb784%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Agents not connecting after 2.60.3 Jenkins upgrade

2017-10-25 Thread edward . basiliere


Hello,

 

I am attempting to upgrade Jenkins on one of our sandboxes to the latest 
LTS version (2.73.2). The issue I have encountered is after upgrading, our 
build agents have all lost their connection to the master. I tried this a 
couple different ways to find out when the issue starts.

 

Attempt #1: 2.24 > 2.73.2

   1. Replace the jenkins.war with the 2.73.2 jenkins.war 
   2. Edit the jenkins.xml to point to JRE 1.8 
   3. Start the Jenkins service 
   4. Jenkins starts up fine, but our three build agents are offline. 
   5. Replaced the slave.war on build agent #1. 
   6. Verify in the Jenkins-slave.xml points to JRE 1.8 (It already was) 
   7. Started the agent service. Still does not go online. 
   8. Try to connect via jnlp, but the connection times out. 
   9. Updated all plugins 
   10. Stop/Start the Jenkins service. 
   11. Stop/Start the Jenkins agent service. Agent still offline. 
   12. Start via jnlp. Connection times out. 

 

Attempt #2: 2.24 > 2.32.3 > 2.46.3 > 2.60.3

   1. Revert to the original snapshot
   2. Upgrade to 2.32.3, then to 2.46.3 (Found no issues) 
   3. Replace the jenkins.war with the 2.60.3 jenkins.war 
   4. Edit the jenkins.xml to point to JRE 1.8 
   5. Start the Jenkins service 
   6. Jenkins starts up fine, but our three build agents are offline. 
   7. Replaced the slave.war on build agent #1. 
   8. Verify in the Jenkins-slave.xml points to JRE 1.8 (It already was) 
   9. Started the agent service. Still does not go online. 
   10. Try to connect via jnlp, but the connection times out. 

 

 

Here is the connection timeout error (Same error in both attempts):


 

 



















Some additional information:

Master: Windows Server 2008 R2

Agent 1: Windows Server 2008 R2


- I was thinking the random ports would be an issue, since the jnlp 
connects using a random port each time, but this is how our Jenkins has 
been configured in previous versions and currently in production.

- The issue occurs starting with the upgrade to 2.60.3. Both versions 
2.32.3 and 2.46.3 work fine.

 

Any help would be appreciated. I can provide any additional information as 
needed.

 

Thank you,

Eddie 

-- 
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/713220bb-9079-422e-b0d1-ef48d48c7238%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


blueocean nexus artifact uploader pipeline

2017-10-25 Thread nup
Hi, 

Has anyone been able to successfully deploy the artifact to Nexus from 
Jenkins using blueocean pipeline? 

I have tried the following pipeline getting failure, but in my log file for 
stage Deploy to Nexus does not show any errors. 


stage('Deploy to Nexus') {

  steps {

nexusArtifactUploader(artifactId: 'my.war', 

credentialsId: 'f3105m60-c38c-4cfd-b68f-3f6ecb5e7d60', 

file: '/var/lib/jenkins/workspace/gws/rewards-build/target/my.war', 

groupId: 'nexus', 

nexusUrl: 'myserver:8081', 

nexusVersion: 'nexus3', 

protocol: 'http', 

repository: 'jenkins', 

type: 'war', 

version: '1.1')

  }

}



Checking status of SonarQube task 'AV9U8M0rYD1UpHX38FNZ' on server 'Sonar6.5'
SonarQube task 'AV9U8M0rYD1UpHX38FNZ' status is 'PENDING'[Pipeline] }[Pipeline] 
// stage[Pipeline] stage[Pipeline] { *(Deploy to Nexus*)[Pipeline] 
nexusArtifactUploader[Pipeline] }[Pipeline] // stage[Pipeline] stage[Pipeline] 
{ (Deploy to Dev)Stage 'Deploy to Dev' skipped due to earlier failure(s)



Here are the Failure



[Bitbucket] Notifying commit build result
[Bitbucket] Build result notified
java.lang.NullPointerException
at 
sp.sd.nexusartifactuploader.steps.NexusArtifactUploaderStep$Execution.run(NexusArtifactUploaderStep.java:238)
at 
sp.sd.nexusartifactuploader.steps.NexusArtifactUploaderStep$Execution.run(NexusArtifactUploaderStep.java:217)
at 
org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:47)
at hudson.security.ACL.impersonate(ACL.java:260)
at 
org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44)
at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Finished: FAILURE



Any help in sovling this issuw would be greately appriciated. 


Regards

-- 
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/d2d1dea8-b7a7-4140-944d-d18d1cd8f182%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Defining *project level* environemnt variables

2017-10-25 Thread Sébastien Hinderer
Thanks a lot for your response, Stephen.
Not sure I'm brave enough to try to write something myself.
Just too bad it does not already exist but I guess we'll just do without
since it'd be a nice addition but not really mandatory.

Best wishes,

Sébastien.

-- 
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/20171025163526.d4jptxm7lubfwqnm%40pl-59055.rocqadm.inria.fr.
For more options, visit https://groups.google.com/d/optout.


Re: staging with specific agent settings strange behavior

2017-10-25 Thread Dan Tran
https://issues.jenkins-ci.org/browse/JENKINS-33510 has a reference to this 
scenario



On Tuesday, October 24, 2017 at 4:08:07 PM UTC-7, Dan Tran wrote:
>
>
> I would like to hear from Jenkins folks to confirm if this is correct 
> behavior :-)
>
> Thanks
>
> -Dan
>
> On Tuesday, October 24, 2017 at 9:59:54 AM UTC-7, Robert Hales wrote:
>>
>> I actually may have spoke incorrectly... 
>>
>> When you specify an agent on the pipeline, you can't later use "agent 
>> none" on a stage and expect that stage to go back to the flyweight agent on 
>> the master (at least, that's what my tests reveal). But I am not sure I 
>> have ever tried farming out from node A (specified at the pipeline level) 
>> to node B (specified at the stage level). 
>>
>>
>>
>> On Tuesday, October 24, 2017 at 10:20:17 AM UTC-6, Dan Tran wrote:
>>>
>>>
>>> Thanks for confirming it is not a bug,  however, this behavior is very 
>>> odd where if  I have 99 stages using same docker agent, and one on a 
>>> different agent,  I need to repeat 99 times for each stage's agent settings
>>>
>>> is this behavior officially documented? if not may need a doc bug 
>>>
>>> Thanks
>>>
>>> -Dan
>>>
>>> Btw, we have another pipeline with global agent is a Linux host agent, 
>>> and one stage on window without issue 
>>>
>>> On Tuesday, October 24, 2017 at 7:43:02 AM UTC-7, Robert Hales wrote:

 If you specify an agent for the entire pipeline, everything in that 
 pipeline will run in that agent. You need to specify 'agent none' on the 
 pipeline, then specify an agent on each individual stage. 

 On Tuesday, October 24, 2017 at 2:38:35 AM UTC-6, Dan Tran wrote:
>
> here is my sample pipeline script
>
> pipeline {
>
>
> agent {
> docker {
> image "comp/:"
> }
> }
> 
> tools {
> jdk 'JAVA8'
> }
> 
> 
> 
> stages {
>
> stage("hello") {
> agent {
> label 'vjd05'
> }
> steps {
>withMaven( maven: 'M3', globalMavenSettingsConfig: 
> 'maven-global', mavenSettingsConfig: 'maven-user', mavenLocalRepo: 
> '.repository' ) {
> sh "mvn -v"
> }
> }
> 
> }
> }
> 
> }
>
> On Friday, October 20, 2017 at 3:43:17 PM UTC-7, Dan Tran wrote:
>>
>>
>> Hi
>>
>> I have a multi-stage pipeline using a global docker agent, except at 
>> one stage where I need to use  none docker agent ( ie a just a pure 
>> linux host)
>>
>> and run to this error and look like my stage still inside docker from 
>> the previous stage.  is it a bug?
>>
>> [Bitbucket] Notifying commit build result[Pipeline] withEnv[Pipeline] 
>> {[Pipeline] script[Pipeline] {[Pipeline] withMaven[withMaven] Options: []
>> [withMaven] Available options: 
>> [withMaven] use JDK installation provided by the build agent
>> WARNING: Specified Maven 'M3' cannot be installed, will be ignored.Step 
>> running within docker.image() tool installations are not available see 
>> https://issues.jenkins-ci.org/browse/JENKINS-36159. 
>> $ docker exec 
>> ff8d1de358d03e06f316c42208c6dd49fb02d41214f59e18a744e21e911e9353 env 
>> printenv MAVEN_HOME
>> $ docker exec 
>> ff8d1de358d03e06f316c42208c6dd49fb02d41214f59e18a744e21e911e9353 env 
>> printenv M2_HOME
>> $ docker exec 
>> ff8d1de358d03e06f316c42208c6dd49fb02d41214f59e18a744e21e911e9353 env 
>> /bin/sh -c "which mvn"
>> [withMaven] with executable null
>>
>>
>> Thanks
>>
>>
>> -Dan
>>
>>

-- 
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/d0e5346a-8432-4eaa-9171-92017b46f975%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Detecting build abort in pipeline

2017-10-25 Thread Raja Nasrallah
Hi,

In the following code, Is it possible to find if the build is aborted by 
user or grunt failed

try{
.
 sh "grunt voter"
}
catch(ex){

}

The problem is that exception ex in both cases is always hudson.AbortException 


Kind regards,
Raja

-- 
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/ef339ad5-d2bd-40a6-bd17-d2a50456251b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Individual Build Step Status

2017-10-25 Thread Robert Hales
It is called Pipeline

On Wednesday, October 25, 2017 at 12:44:24 AM UTC-6, TheGrovesy wrote:
>
> I have a single Jenkins item which gets checked out and then has 6 
> different build steps for different build variants. On the main Jenkins 
> page this is shown as a single item status. It would be much more useful if 
> this view showed each build step with its own status so we can more easily 
> see which steps were successful, unstable and failed. Is there a plugin for 
> this? Or should I just create seperate items for each stage (i.e. Checkout, 
> Step1, Step2, Step3, etc)?
>

-- 
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/3565425d-537e-466f-adbd-9ff881144641%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins CSS et JS in email - rules

2017-10-25 Thread Srikanth Nakka
A simple solution is, combine the all CSS and JS Code with html (html, CSS,
js in one single file).

On Oct 25, 2017 7:20 PM, "Henri Pineau"  wrote:

Hello,

I would like send email after a build and insert an html template. But
Jenkins avoid CSS and JS. I know it is possible to change this rules.

Please, How I do it ?

Thank's

Henri

-- 
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/f07a8b2b-07b6-440d-9e26-9a7b3f47a30c%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/CAO7SJ6dkXBOo3d0FDD9xTAdL25Oi-9GAAP8_Haet6NmqS76_wg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Jenkins CSS et JS in email - rules

2017-10-25 Thread Henri Pineau
Hello,

I would like send email after a build and insert an html template. But 
Jenkins avoid CSS and JS. I know it is possible to change this rules.

Please, How I do it ?

Thank's

Henri

-- 
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/f07a8b2b-07b6-440d-9e26-9a7b3f47a30c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


email with html file, problem with css

2017-10-25 Thread Henri Pineau
Hello,

I need to send an email after a build. In this email there is an html 
report, but when I receive this email, there is no CSS. In my html file I 
use bootstrap. I have saw it is probably an CSP problem.

Someone have the same problem and solved ?

Thank's

Henri 

-- 
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/9e063bed-a4b7-4497-851c-ccf910cb98ec%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: When am trying to update the plugin in jenkins shows warning

2017-10-25 Thread itchymuzzle
What is your question?

-- 
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/b4e597d6-d45d-4f20-a899-37ff4414abb4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Multibranch Pipeline - GIT - SSH authentication

2017-10-25 Thread Stephen Connolly
If it was a github server, you would need the username in the credentials
to be `git` and not `jenkins` because GitHub only accepts SSH connections
with the username `git`. I wonder if something similar is happening with
gitlab?

On 25 October 2017 at 03:59, Mark Waite  wrote:

> You may need to look more carefully at the configuration of the
> multibranch pipeline job.  If it is using a username/password credential,
> then either the credential named "jenkins" in your configuration is not a
> private key (which it seems to be to me) or there is a location in the job
> which defines an https URL to the repository.
>
> On Wed, Oct 25, 2017 at 4:45 AM Samuel Mutel 
> wrote:
>
>> I tried also to "enter directly" the private key but it does not work.
>> Something curious ... When I parse the log file of the SSH server located
>> on the GITLAB server, I see error message related to a connection with
>> login/password and not related to a connection with ssh key.
>> It's mean that the job is not using ssh key at all.
>>
>> --
>> 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/dcc7d24b-7cc5-49e7-9787-
>> dacdc69843cc%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/CAO49JtEWHEKGn%3Da3%2BGuYZ2MLG8%
> 3D38XzA19GqoTjkJuoYdvc%2BKw%40mail.gmail.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/CA%2BnPnMw_7%2BYdSNKSG7nU9h39NiDehD0grzWw207dtv3GPzr6Ug%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Multibranch Pipeline - GIT - SSH authentication

2017-10-25 Thread Mark Waite
You may need to look more carefully at the configuration of the multibranch
pipeline job.  If it is using a username/password credential, then either
the credential named "jenkins" in your configuration is not a private key
(which it seems to be to me) or there is a location in the job which
defines an https URL to the repository.

On Wed, Oct 25, 2017 at 4:45 AM Samuel Mutel  wrote:

> I tried also to "enter directly" the private key but it does not work.
> Something curious ... When I parse the log file of the SSH server located
> on the GITLAB server, I see error message related to a connection with
> login/password and not related to a connection with ssh key.
> It's mean that the job is not using ssh key at all.
>
> --
> 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/dcc7d24b-7cc5-49e7-9787-dacdc69843cc%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/CAO49JtEWHEKGn%3Da3%2BGuYZ2MLG8%3D38XzA19GqoTjkJuoYdvc%2BKw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Multibranch Pipeline - GIT - SSH authentication

2017-10-25 Thread Samuel Mutel
I tried also to "enter directly" the private key but it does not work.
Something curious ... When I parse the log file of the SSH server located 
on the GITLAB server, I see error message related to a connection with 
login/password and not related to a connection with ssh key.
It's mean that the job is not using ssh key at all.

-- 
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/dcc7d24b-7cc5-49e7-9787-dacdc69843cc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to share local Maven repo between nodes?

2017-10-25 Thread Torsten Reinhard
Thanx, now I´m doing something like:
String buildNode
node() {
buildNode = env.NODE_NAME
echo "performing build on node ${buildNode}"
}
checkpoint("built")
node('other') {
echo "running on any other node, currently it´s ${env.NODE_NAME}"
}
checkpoint("deployed")
node( buildNode ) {
echo "running on ${buildNode} again - it´s ${env.NODE_NAME}"
}



Am Montag, 23. Oktober 2017 22:54:06 UTC+2 schrieb Robert Hales:
>
> You can caputre the node name in the first time you use the node and then 
> specify it as the node label in the following node steps. 
>
> On Monday, October 23, 2017 at 2:44:37 PM UTC-6, Torsten Reinhard wrote:
>>
>> Hi, 
>>
>> I have a large build & deploy pipeline with some stages, running on 
>> different nodes. I´m using stash/unstash for transfering the files 
>> (sources) between the nodes 
>> - but how do I share the artifacts of the local M2 repository so 
>> dependencies can be resolved properly?
>>
>> node(..) {
>>   ..
>>   stage("Build") {
>> // build it
>> sh("mvn clean install")
>>   }
>>   ..
>>   stash ( name: 'workspace', useDefaultExcludes: false, excludes: 
>> "**/target/**/*.class, **/target/surefire-reports/**")
>> }
>>
>> node(..) {
>>   ..
>>   stage("Deploy") {
>>  sh("deploy.sh.")
>>   }
>>   ..
>> }
>>
>> node(..) {
>>   unstash( name: 'workspace')
>>   stage("Test") {
>> ..
>> sh("mvn test -Pit..")
>> ..
>>   }
>> }
>>
>> Is there a way (without declarative pipeline) to "reuse" the same node 
>> like before? Or do I have to stash/unstash the local repo or parts of it, 
>> too?
>>
>> Any other ideas ?
>>
>> Thanx for your responses, 
>>
>> Torsten
>>
>

-- 
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/43668c11-9203-481c-9aac-e3bfa963ded8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Multibranch Pipeline - GIT - SSH authentication

2017-10-25 Thread Mark Waite
Those settings seem reasonable to me.  I don't see anything in that which 
should be any problem.  If you insert the content of that file in the 
"enter directly" selection, does it behave any differently?  I generally 
use "enter directly" myself, though I know of no reason why the other 
techniques would not work equally as well.

I assume the private key in that file does not require a passphrase, since 
there isn't one in the passphrase field.

Mark Waite

On Wednesday, October 25, 2017 at 1:56:31 AM UTC-6, Samuel Mutel wrote:
>
> Here is my multibranch config:
>
>
> 
>
>
> Here is my credential config:
>
>
>
> 
>
> Started
>
> [Wed Oct 25 09:47:52 CEST 2017] Starting branch indexing...
>
>  > git --version # timeout=10
>
>  > git ls-remote ssh://
> git.xit.rxcorp.com/CIO/schedular/schedular-frontend.git # timeout=10
>
> ERROR: [Wed Oct 25 09:48:00 CEST 2017] Could not update folder level 
> actions from source f1c31476-efde-455c-983b-1a3c120cf9a0
>
> hudson.plugins.git.GitException: Command "git ls-remote ssh://
> git.xit.rxcorp.com/CIO/schedular/schedular-frontend.git" returned status 
> code 128:
>
> stdout: 
>
> stderr: 
>
> Permission denied, please try again.
>
> Permission denied, please try again.
>
> Received disconnect from 10.121.1.11 port 22:2: Too many authentication 
> failures
>
> Authentication failed.
>
> fatal: Could not read from remote repository.
>
>
>
>

-- 
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/09c48186-c92d-47b2-adc0-bda1044e3fbb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


How does jenkins locate to the files in slave?

2017-10-25 Thread 居飞
Hi:
I have a Jenkins network for out Test Automation. In this network, I 
installed a Jenkins Master, and then add 5 slave node. The master and all 
the slaves are linux systems.  All the slaves has same lable, such as "cpk"

   I configured a job, and I specified it running on "cpk".  So when the 
job is running, sometime, it will run on slave 1, and sometime it will run 
on slave 2. That is exactly what I wanted.

   But my problems is: I don't know how jenkins  locate to the files in 
slave, that means: I found some url from jenkins to slave files is 
available, but some others are not! I wish the jenkins to locate to the 
right files on different slaves.

   I have checked the jenkins and found that, for each build, there is a 
build.xml, in the build.xml, it contains the  and , so 
I think the Jenkins should have enough information to locate the right file.


Thanks in advanced.

-- 
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/93a6a8d8-8e22-4804-af7d-373a493d737b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Clickable link in console ESC[8mha

2017-10-25 Thread Khomyuk Viktor
Hi! I see that console tah clickable link to jenkins jobs/users/etc. This links 
starts with esc sequence ESC[8mha .

Is it possible to print (echo) that links from shell step ?


I`m talking not about http:// links

-- 
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/1508919703642.15205%402Gis.ru.
For more options, visit https://groups.google.com/d/optout.


Re: Multibranch Pipeline - GIT - SSH authentication

2017-10-25 Thread Samuel Mutel


Here is my multibranch config:




Here is my credential config:




Started

[Wed Oct 25 09:47:52 CEST 2017] Starting branch indexing...

 > git --version # timeout=10

 > git ls-remote 
ssh://git.xit.rxcorp.com/CIO/schedular/schedular-frontend.git # timeout=10

ERROR: [Wed Oct 25 09:48:00 CEST 2017] Could not update folder level 
actions from source f1c31476-efde-455c-983b-1a3c120cf9a0

hudson.plugins.git.GitException: Command "git ls-remote 
ssh://git.xit.rxcorp.com/CIO/schedular/schedular-frontend.git" returned 
status code 128:

stdout: 

stderr: 

Permission denied, please try again.

Permission denied, please try again.

Received disconnect from 10.121.1.11 port 22:2: Too many authentication 
failures

Authentication failed.

fatal: Could not read from remote repository.



-- 
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/f1aeb23c-90c6-4562-9681-860d1e13aee6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Individual Build Step Status

2017-10-25 Thread TheGrovesy
I have a single Jenkins item which gets checked out and then has 6 
different build steps for different build variants. On the main Jenkins 
page this is shown as a single item status. It would be much more useful if 
this view showed each build step with its own status so we can more easily 
see which steps were successful, unstable and failed. Is there a plugin for 
this? Or should I just create seperate items for each stage (i.e. Checkout, 
Step1, Step2, Step3, etc)?

-- 
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/fd11b19b-6850-4261-a04b-b1f5cfb5a364%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Global pipeline library error with git parameter with additional 'origin' in ref spec?

2017-10-25 Thread kevmando
Hi,

I'm using global pipeline library and git parameter to 
choose jenkins pipeline script as below.

It has worked fine, but it starts to act weirdly today and I'm not sure 
which plugins cause the issue.
I updated several plugins at the same time - actually downloaded updated 
plugins over a month, but restarted today.

You will see the first git fetch has normal refspec, but the next one has 
additional 'origin' in its refspec.
I don't know why it is added and where to report.

Any info or workaround would be welcome.

Loading library global-util-library@origin/master
 > git rev-parse --is-inside-work-tree # timeout=10
Setting origin to MYGITHUB URL
 > git config remote.origin.url MYGITHUB URL # timeout=10

Fetching origin...
Fetching upstream changes from origin
 > git --version # timeout=10
using GIT_ASKPASS to set credentials Service account for Github and Jenkins* > 
git fetch --tags --progress origin +refs/heads/*:refs/remotes/origin/**
 > git rev-parse origin/master^{commit} # timeout=10
 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url MYGITHUB URL # timeout=10
Fetching without tags
Fetching upstream changes from MYGITHUB URL
 > git --version # timeout=10
using GIT_ASKPASS to set credentials Service account for Github and Jenkins* > 
git fetch --no-tags --progress MYGITHUB URL 
+refs/heads/origin/master:refs/remotes/origin/origin/master*

ERROR: Error fetching remote repo 'origin'hudson.plugins.git.GitException 
:
 Failed to fetch from MYGITHUB URL
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:817)  


 




Pipeline code

//Set environment values by user selection
println "using global-util-library@${params.JENKINS_BRANCH_NAME}"
library "global-util-library@${params.JENKINS_BRANCH_NAME}" 


Git parameter setting





-- 
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/74f4d695-10bc-4cc5-a2ec-95d163d1f6f4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


When am trying to update the plugin in jenkins shows warning

2017-10-25 Thread gowthaman . saravanan
When am trying to update the plugin in jenkins shows warning

Warning: the new version of this plugin claims to use a different settings 
format than the installed version. Jobs using this plugin may need to be 
reconfigured, and/or you may not be able to cleanly revert to the prior 
version without manually restoring old settings. Consult the plugin release 
notes for details

-- 
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/7617fb16-b972-4441-bf10-503382ceb22e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.