Need pipeline script help

2016-12-05 Thread Venkat S
I am very new for Jenkins. i am try to create Jenkins pipeline script. 
Please help me out develop pipeline script. if you have any syntax share 
with me.

Thanks
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/b7a04b6b-adeb-46ac-b2d8-033677cbcc4b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Demo Days

2016-12-05 Thread Patrick Wolf
As you may know, CloudBees has a team of Engineers dedicated to working on
issues and new features in Jenkins. This includes the plugins we contribute
and maintain (Pipeline, Folders, etc) as well as Jenkins core (Remoting,
Security, etc.). This is in addition to the team that is working on the new
Blue Ocean interface.

In late October, this team hosted a demonstration session
 to show what we have been
working on. We want to make these demonstrations a regular event so
everyone knows what we are doing and can offer feedback. Going forward, we
will demonstrate all new features and updates that we are working on in
Jenkins on the second Thursday of every month. These videos will be
available on Youtube to watch live or at a later date here:
https://www.youtube.com/channel/UCaS3sLG0G7dVSd-312BYtZA

You can send any feedback directly to me.

Thanks,
Patrick

-- 

Patrick Wolf
Product Director - Jenkins
CloudBees

-- 
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/CAGDV0P9bQPSksGzgM8LYqWbhL73dGHtRi1E6VoL7MRi3kGN31Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Job unexpectedly being stopped with success exit code after exactly one hour

2016-12-05 Thread mike
I have a long running Jenkins job that can run for more than one hour. 

Via shell scripts, it kicks off an activity in AWS (runs a docker container 
as a task), then monitors the state of the task every 30 seconds and ends 
when the task finishes.

As part of the process, it finishes by logging the exit code of the 
container to the Jenkins console log.

For runs that take less than 1 hour, the output is as expected.

For runs that take more than one hour, the task in AWS continues to run. 
However the Jenkins log, at the 60 minute mark, abruptly stops and displays 
a SUCCESS status.

I am thus trying to track down what might be the cause of this. 

I am running Jenkins 2.33 via tomcat7 on a 64 bit AWS Linux server based on 
the 2016.09 AMI.

I suspect it may be the build_timeout plugin which is installed but not 
enabled for this job. I have version 1.18 installed.

I don't see anything of relevance in either the tomcat log or the Jenkins 
system Log at the time.

Any pointers as to what to look for next and where would be appreciated.


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


Re: pipeline : remote file operation on the windows slave no longer work

2016-12-05 Thread Joel Reed
This seemed to work for me:

stage("Testing"){
node ("VS2013") {
echo "Substage running on Windows"
bat "echo user %USERDOMAIN%\\%USERNAME%"
}
}

I don't know if it was your cut and paste or if you were in fact not 
properly encapsulating the stage { ... }. I would have expected a 
compilation error and not the error you posted above if that was the case. 
There also was a behavior change to stage syntax a few releases ago. Stage 
expects a block. Check the release notes, 
https://wiki.jenkins-ci.org/display/JENKINS/Pipeline+Stage+Step+Plugin. 
Your bat step was also a little verbose I think. Given that by default it 
will echo the output to the console.

You didn't say what versions your running but the above snippet ran as 
expected in my latest and greatest 2.35 and all the latest plugin updates. 

On Saturday, December 3, 2016 at 9:34:40 AM UTC-7, Jonathan Hodgson wrote:
>
> Hi,
>
> Remote fie operations, such as mkdir (which in this case it appears is 
> being called by the bat pipeline step), now fail on my windows slave.
>
> At first I thought it was down to the user initiating the build, but it 
> seems that may have been a red-herring, certainly the problem is user 
> independent now.
>
> It worked in the past, but now a simple script iike
>
> stage("testing")
> node ("VS2013")
> {
> echo "Substage running on Windows"
> user_is = bat script:"echo user %USERDOMAIN%\\%USERNAME%", 
> returnStdout:true
> echo user_is
> }
> }
>
> bombs out with
>
> Started by user Jonathan Hodgson
> [Pipeline] stage
> [Pipeline] { (testing)
> [Pipeline] node
> Running on Asus K51 in C:\Jenkins\workspace\pipeline-test2
> [Pipeline] {
> [Pipeline] echo
> Substage running on Windows
> [Pipeline] bat
> [Pipeline] }
> [Pipeline] // node
> [Pipeline] }
> [Pipeline] // stage
> [Pipeline] End of Pipeline
> java.io.IOException: Failed to mkdirs: C:\Jenkins\workspace\pipeline-
> test2@tmp\durable-69ea6505
>  at hudson.FilePath.mkdirs(FilePath.java:1169)
>  at org.jenkinsci.plugins.durabletask.
> FileMonitoringTask$FileMonitoringController.(FileMonitoringTask.java
> :101)
>  at org.jenkinsci.plugins.durabletask.WindowsBatchScript$BatchController.<
> init>(WindowsBatchScript.java:94)
>  at org.jenkinsci.plugins.durabletask.WindowsBatchScript$BatchController.<
> init>(WindowsBatchScript.java:92)
>  at org.jenkinsci.plugins.durabletask.WindowsBatchScript.doLaunch(
> WindowsBatchScript.java:60)
>  at org.jenkinsci.plugins.durabletask.FileMonitoringTask.launchWithCookie(
> FileMonitoringTask.java:66)
>  at org.jenkinsci.plugins.durabletask.FileMonitoringTask.launch(
> FileMonitoringTask.java:61)
>  at org.jenkinsci.plugins.workflow.steps.durable_task.
> DurableTaskStep$Execution.start(DurableTaskStep.java:158)
>  at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:184)
>  at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:126)
>  at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.
> java:108)
>  at groovy.lang.GroovyObject$invokeMethod.call(Unknown Source)
>  at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(
> CallSiteArray.java:48)
>  at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(
> AbstractCallSite.java:113)
>  at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:151)
>  at org.kohsuke.groovy.sandbox.GroovyInterceptor.onMethodCall(
> GroovyInterceptor.java:21)
>  at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor
> .onMethodCall(SandboxInterceptor.java:115)
>  at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:149)
>  at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:146)
>  at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:123)
>  at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:123)
>  at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.methodCall(
> SandboxInvoker.java:16)
>  at WorkflowScript.run(WorkflowScript:6)
>  at ___cps.transform___(Native Method)
>
> 
> Debian Linux on the master, Windows 7 on the slave, both running the same 
> version of Java.
>
> The OSX slave has no such iisues.
>
> Does anyone have any ideas? This is making my Jenkins setup pretty much 
> unusable.
>

-- 
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/55327a68-e917-4b74-8f0b-3ea44f129357%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Regenerating initial administrator token

2016-12-05 Thread 'Claudiu Guiman' via Jenkins Users
Hi,
I'm trying to create a VHD with Jenkins that when deployed again it will 
regenerate the Administrator token and prompt the user to enter it again.
This shouldn't be a clean install, the plugins installation step shouldn't run 
again, just the user creation set-up should be re-run.
What files do I have to change to achieve this?

Thank you,
Claudiu Guiman

-- 
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/CY1PR0301MB1660306D13825EF323E54B1FD7830%40CY1PR0301MB1660.namprd03.prod.outlook.com.
For more options, visit https://groups.google.com/d/optout.


Jenkins PHP + Java

2016-12-05 Thread Edwin Ilovares
Hi all,

I'm new using Jenkins, and I need to CI a PHP application, beacouse I need 
generate a Sonar report for the java classes into this project.

so... I dont undertand

   - Can I integrate java classes inner a PHP project?
   - how can I build the pom.xml files?
   - Am I doing the irght question?


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/170bad0d-8f98-4deb-a89b-346f5481bbac%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Amazon EC2 instance dies on installing Java

2016-12-05 Thread jbrooks
Hi all,

I'm using the Amazon EC2 plugin to create new agents. I've set it up to use 
the Ubuntu 16.04 AMI. Security groups, availability zones, and remote user 
(ubuntu) are all correct. The EC2 key pair is correct and successfully 
connects on testing. I specified that the root prefix should be `sudo`. 
However, when I attempt to provision a new node, I get the following:


INFO: Connecting to xxx.xxx.xxx.xxx on port 22, with timeout 1.
Dec 05, 2016 9:36:57 PM null
INFO: Connected via SSH.
Dec 05, 2016 9:36:57 PM null
INFO: Creating tmp directory (/tmp) if it does not exist
Dec 05, 2016 9:36:57 PM null
INFO: Verifying that java exists
bash: java: command not found
Dec 05, 2016 9:36:57 PM null
INFO: Installing Java
failed: Connection timed out.
failed: Connection timed out.


What am I getting wrong here?


Thanks!

Jack

-- 
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/7dcf8228-8c00-4da6-a3b7-a8ab5c9e5daf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Email reports for passing builds

2016-12-05 Thread Victor Martinez
You can most likely use:
- https://wiki.jenkins-ci.org/display/JENKINS/Email-ext+plugin

Cheers

On Monday, 5 December 2016 19:49:54 UTC, Narayana Prasad wrote:
>
> I need to send emails reports after build is successful along with results 
> ( not just failure) possibly attaching some cucumber reports. 
>
> Has anyone done similar thing ? 
>
> Sent from my iPhone

-- 
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/a124080c-8404-403e-913b-d46f5d08398c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Email reports for passing builds

2016-12-05 Thread NP
I need to send emails reports after build is successful along with results ( 
not just failure) possibly attaching some cucumber reports. 

Has anyone done similar thing ?

Sent from my iPhone

-- 
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/301986EC-DB5B-4EED-80EE-00ACC69FDF76%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Can I execute a script every time a build gets deleted?

2016-12-05 Thread jleggett
Our build artifacts are stored outside of Jenkins.  Each jenkins build 
result(artifacts) can possibly be located in 3 different places on the file 
system.  To keep the file system from becoming filled with old builds, I 
would like to execute a script every time a build is deleted in Jenkins to 
ensure the other locations are deleted as well.  

I've reviewed the existing plugins, but I do not see a way to achieve this. 
 Does anyone know how to accomplish this?  Have I missed something obvious?

-- 
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/243c85c9-93e5-4883-a791-03dfb1abac0a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Conditional BuildStep Plugin don't fail the build

2016-12-05 Thread jerome
you can use direct assigantion to currentBuild result variable:

currentBuild.result = 'FAILURE'

avaiable value are (not sure I got them all): 
'UNSTABLE', 'SUCCESS', 'FAILURE', 'ABORTED', 'NOT_BUILT'

-- 
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/cef164ac-0ecd-4b50-b8af-512d8991e07e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins Pipeline : How could I access the git repository cloned at job start

2016-12-05 Thread Jean-Luc Pinardon
Hi,

Thanks a lot for the explanation.
In fact, I must come back to the very first reason of my question.
My concern is that the jenkinsfile, so the pipeline, is supposed to be
executed by taking first into account a property file that will be used to
configure the whole build chain.  So it seemed very natural to checkout the
jenkinsfile and its property file along with to set up the environment of
the pipeline. That would perhaps be an interesting feature...

Thanks for your help
J.L.P.

2016-12-05 10:33 GMT+01:00 nicolas de loof :

> the Jenkinsfile detection indeed relies on a git clone on master, but this
> isn't considered a workspace. Also, it might not be necessary for some
> integrations, typically one could access this specific file remotely (not
> sure about the actual implementation)
>
> To get the exact commit that triggered a build, your Jenkinsfile should
> look like :
>
> node() {
>checkout scm
>...
> }
>
>
>
> 2016-12-05 9:30 GMT+01:00 Christoph Nenning  >:
>
>> Hi,
>>
>>
>> > Where do you put this ws step ?
>>
>> You can put it at the beginning of your Jenkinsfile
>>
>>
>> > My concern is how to benefit from the SCM schedule and checkout
>> > phase made to retrieve the so called jenkinsfile, i.e. the script
>> > (and possible libraries) that is executed to run the pipeline.
>>
>> AFAIK you cannot use the workspace that jenkins creates to checkout
>> Jenkinsfile.
>>
>> But you can checkout the same repo (or other polled SCM URLs) with this
>> command:
>>
>> checkout scm
>>
>>
>> Regards,
>> Christoph
>>
>>
>>
>> > From: Jean-Luc Pinardon 
>> > To: jenkinsci-users@googlegroups.com,
>> > Date: 05.12.2016 09 <05%2012%2020%2016%2009>:05
>> > Subject: Re: Jenkins Pipeline : How could I access the git
>> > repository cloned at job start
>> > Sent by: jenkinsci-users@googlegroups.com
>> >
>> > Hello,
>> >
>> > Thanks for your answer.
>> > But I am not sure to understand.
>> > Where do you put this ws step ?
>> > I am not sure to have been clear enough.
>> > My concern is how to benefit from the SCM schedule and checkout
>> > phase made to retrieve the so called jenkinsfile, i.e. the script
>> > (and possible libraries) that is executed to run the pipeline.
>> >
>> > 2016-12-03 7:37 GMT+01:00 Sam K :
>> > I just use a ws('') {
>> >git url:. , branch: 'master'
>> > }
>> >
>> > and now all the cloned content is within the directory I want.
>> >
>> > On Tuesday, November 29, 2016 at 1:14:03 AM UTC-8, Jean-Luc Pinardon
>> wrote:
>> > Dear all,
>> >
>> > I am exploring pipeline features, and I fall into a problem.
>> > The repository is indeed correctly cloned at job start and the
>> > "jenkinsfile" is run.
>> > But I "discover" that I cannot access the cloned files from within
>> > the stages within nodes. Just because, the workspace used at job
>> > begin is certainly not the same as the workspace within the nodes.
>> >
>> > So, my question is : is there a way to make available the initially
>> > cloned files all over the pipeline, or should I clone the repository
>> > once more within the first stage and then stash the files I need.
>> >
>> > Thanks for your help.
>> > J.L.P.
>> > --
>> > You received this message because you are subscribed to a topic in
>> > the Google Groups "Jenkins Users" group.
>> > To unsubscribe from this topic, visit https://groups.google.com/d/
>> > topic/jenkinsci-users/qzBWmFHOmoI/unsubscribe.
>> > To unsubscribe from this group and all its topics, 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/aca57995-52c2-42f6-94aa-5cee7e434b29%
>> > 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/CALijN65Q_TE2zj5NhwJpoi5%2BW3jX-
>> > vVXds0QVJrXO4iKs72Wkw%40mail.gmail.com.
>> > For more options, visit https://groups.google.com/d/optout.
>>
>>
>> This Email was scanned by Sophos Anti Virus
>>
>> --
>> 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/ms
>> gid/jenkinsci-users/OFE7E55BA0.1AC16254-ONC1258080.002E9363-
>> C1258080.002EBDB0%40lex-com.net
>> 
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> You received

Re: Jenkins Pipeline : How could I access the git repository cloned at job start

2016-12-05 Thread nicolas de loof
the Jenkinsfile detection indeed relies on a git clone on master, but this
isn't considered a workspace. Also, it might not be necessary for some
integrations, typically one could access this specific file remotely (not
sure about the actual implementation)

To get the exact commit that triggered a build, your Jenkinsfile should
look like :

node() {
   checkout scm
   ...
}



2016-12-05 9:30 GMT+01:00 Christoph Nenning :

> Hi,
>
>
> > Where do you put this ws step ?
>
> You can put it at the beginning of your Jenkinsfile
>
>
> > My concern is how to benefit from the SCM schedule and checkout
> > phase made to retrieve the so called jenkinsfile, i.e. the script
> > (and possible libraries) that is executed to run the pipeline.
>
> AFAIK you cannot use the workspace that jenkins creates to checkout
> Jenkinsfile.
>
> But you can checkout the same repo (or other polled SCM URLs) with this
> command:
>
> checkout scm
>
>
> Regards,
> Christoph
>
>
>
> > From: Jean-Luc Pinardon 
> > To: jenkinsci-users@googlegroups.com,
> > Date: 05.12.2016 09 <05%2012%2020%2016%2009>:05
> > Subject: Re: Jenkins Pipeline : How could I access the git
> > repository cloned at job start
> > Sent by: jenkinsci-users@googlegroups.com
> >
> > Hello,
> >
> > Thanks for your answer.
> > But I am not sure to understand.
> > Where do you put this ws step ?
> > I am not sure to have been clear enough.
> > My concern is how to benefit from the SCM schedule and checkout
> > phase made to retrieve the so called jenkinsfile, i.e. the script
> > (and possible libraries) that is executed to run the pipeline.
> >
> > 2016-12-03 7:37 GMT+01:00 Sam K :
> > I just use a ws('') {
> >git url:. , branch: 'master'
> > }
> >
> > and now all the cloned content is within the directory I want.
> >
> > On Tuesday, November 29, 2016 at 1:14:03 AM UTC-8, Jean-Luc Pinardon
> wrote:
> > Dear all,
> >
> > I am exploring pipeline features, and I fall into a problem.
> > The repository is indeed correctly cloned at job start and the
> > "jenkinsfile" is run.
> > But I "discover" that I cannot access the cloned files from within
> > the stages within nodes. Just because, the workspace used at job
> > begin is certainly not the same as the workspace within the nodes.
> >
> > So, my question is : is there a way to make available the initially
> > cloned files all over the pipeline, or should I clone the repository
> > once more within the first stage and then stash the files I need.
> >
> > Thanks for your help.
> > J.L.P.
> > --
> > You received this message because you are subscribed to a topic in
> > the Google Groups "Jenkins Users" group.
> > To unsubscribe from this topic, visit https://groups.google.com/d/
> > topic/jenkinsci-users/qzBWmFHOmoI/unsubscribe.
> > To unsubscribe from this group and all its topics, 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/aca57995-52c2-42f6-94aa-5cee7e434b29%
> > 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/CALijN65Q_TE2zj5NhwJpoi5%2BW3jX-
> > vVXds0QVJrXO4iKs72Wkw%40mail.gmail.com.
> > For more options, visit https://groups.google.com/d/optout.
>
>
> This Email was scanned by Sophos Anti Virus
>
> --
> 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/OFE7E55BA0.1AC16254-ONC1258080.002E9363-C1258080.
> 002EBDB0%40lex-com.net
> 
> .
>
> 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/CANMVJzmgh7jBd%2B6JbL_16J5TsnsAMpDmOiEX4WkK6vmqzfoWUQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins Pipeline : How could I access the git repository cloned at job start

2016-12-05 Thread Jean-Luc Pinardon
Hi, Chritoph Nenning,

Thanks for your answer.

>AFAIK you cannot use the workspace that jenkins creates to checkout
Jenkinsfile.

So, it means as you say after, that I need to checkout agoin files I
already checked out just before.
That's what I wanted to avoid. Simply because I don't like to do twice the
same thing.
So, as far as this behavior seems confirmed, and we want to avoid repeating
things, it means that an effort must be made on scm repository side to
clearly separate things that are yet related.
It is not a so big deal.
On the other hand, the volume of data involved here are not so big. It
should not have a noticeable impact on the whole pipeline process, and thus
the question is perhaps finally more a matter of principle. There should be
no heavy consequences as far as things are correctly done on SCM repository
side.

Again, thanks for your help.
Have a nide day.
J.L.P.



2016-12-05 9:30 GMT+01:00 Christoph Nenning :

> Hi,
>
>
> > Where do you put this ws step ?
>
> You can put it at the beginning of your Jenkinsfile
>
>
> > My concern is how to benefit from the SCM schedule and checkout
> > phase made to retrieve the so called jenkinsfile, i.e. the script
> > (and possible libraries) that is executed to run the pipeline.
>
> AFAIK you cannot use the workspace that jenkins creates to checkout
> Jenkinsfile.
>
> But you can checkout the same repo (or other polled SCM URLs) with this
> command:
>
> checkout scm
>
>
> Regards,
> Christoph
>
>
>
> > From: Jean-Luc Pinardon 
> > To: jenkinsci-users@googlegroups.com,
> > Date: 05.12.2016 09:05
> > Subject: Re: Jenkins Pipeline : How could I access the git
> > repository cloned at job start
> > Sent by: jenkinsci-users@googlegroups.com
> >
> > Hello,
> >
> > Thanks for your answer.
> > But I am not sure to understand.
> > Where do you put this ws step ?
> > I am not sure to have been clear enough.
> > My concern is how to benefit from the SCM schedule and checkout
> > phase made to retrieve the so called jenkinsfile, i.e. the script
> > (and possible libraries) that is executed to run the pipeline.
> >
> > 2016-12-03 7:37 GMT+01:00 Sam K :
> > I just use a ws('') {
> >git url:. , branch: 'master'
> > }
> >
> > and now all the cloned content is within the directory I want.
> >
> > On Tuesday, November 29, 2016 at 1:14:03 AM UTC-8, Jean-Luc Pinardon
> wrote:
> > Dear all,
> >
> > I am exploring pipeline features, and I fall into a problem.
> > The repository is indeed correctly cloned at job start and the
> > "jenkinsfile" is run.
> > But I "discover" that I cannot access the cloned files from within
> > the stages within nodes. Just because, the workspace used at job
> > begin is certainly not the same as the workspace within the nodes.
> >
> > So, my question is : is there a way to make available the initially
> > cloned files all over the pipeline, or should I clone the repository
> > once more within the first stage and then stash the files I need.
> >
> > Thanks for your help.
> > J.L.P.
> > --
> > You received this message because you are subscribed to a topic in
> > the Google Groups "Jenkins Users" group.
> > To unsubscribe from this topic, visit https://groups.google.com/d/
> > topic/jenkinsci-users/qzBWmFHOmoI/unsubscribe.
> > To unsubscribe from this group and all its topics, 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/aca57995-52c2-42f6-94aa-5cee7e434b29%
> > 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/CALijN65Q_TE2zj5NhwJpoi5%2BW3jX-
> > vVXds0QVJrXO4iKs72Wkw%40mail.gmail.com.
> > For more options, visit https://groups.google.com/d/optout.
>
>
> This Email was scanned by Sophos Anti Virus
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Jenkins Users" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/jenkinsci-users/qzBWmFHOmoI/unsubscribe.
> To unsubscribe from this group and all its topics, 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/OFE7E55BA0.1AC16254-ONC1258080.002E9363-C1258080.
> 002EBDB0%40lex-com.net
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins 

Problem with Repository Connector Plugin example?

2016-12-05 Thread kent
I have tried to use the repository connector plugin to fetch a an artifact 
using the artifact resolver with a version specified with the artifact 
parameter selected as a build parameter.
However it doesn't seem to resolve the version parameter properly?

I have in fact configured the same example setup as in the documentation 
sample (from 
https://wiki.jenkins-ci.org/display/JENKINS/Repository+Connector+Plugin)
to fetch a selected version of commons-collections.

The versions shows up properly when I do "Build with parameters" but then 
the artifact resolver just gives an error:

[EnvInject] - Loading node environment variables.
Building in workspace /var/lib/jenkins/jobs/Deploy platform/workspace
INFO: define repo: [Repository id=central, type=default, 
url=http://repo1.maven.org/maven2, isRepositoryManager=false]
failed to resolve dependency for [Artifact 
commons-collections:commons-collections:jar::${commons-collections.commons-collections}]
org.sonatype.aether.resolution.DependencyResolutionException: Could not find 
artifact 
commons-collections:commons-collections:jar:${commons-collections.commons-collections}
 in central (http://repo1.maven.org/maven2)
at 
org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:375)
at ...

Caused by: org.sonatype.aether.resolution.ArtifactResolutionException: Could 
not find artifact 
commons-collections:commons-collections:jar:${commons-collections.commons-collections}
 in central (http://repo1.maven.org/maven2)
at 
org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:537)

...
Caused by: org.sonatype.aether.transfer.ArtifactNotFoundException: Could not 
find artifact 
commons-collections:commons-collections:jar:${commons-collections.commons-collections}
 in ...


I tried a lot of different settings and also searched for similar problems, but 
didn't find anything so asking here now.


It almost seems like it does not resolve this parameter properly or it isn't 
set properly by the artifact parameter selection?

-- 
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/87661a45-b15f-454f-a45c-709c23b1d6ad%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Conditional BuildStep Plugin don't fail the build

2016-12-05 Thread Christoph Nenning
Hi,

> there is a way to mark the build as failed?

You could throw a (groovy) exception


Regards,
Christoph


> From: Stefano Cognigni 
> To: jenkinsci-users@googlegroups.com, 
> Date: 05.12.2016 09:18
> Subject: Re: Conditional BuildStep Plugin don't fail the build
> Sent by: jenkinsci-users@googlegroups.com
> 
> there is a way to mark the build as failed?
> 
> Il 03/12/2016 01:10, Daniel Beck ha scritto:
> > 'on evaluation failure' means 'when the regex is invalid'. It's 
> not "when it doesn't match".
> >
> >> On 02.12.2016, at 09:44, Stefano  wrote:
> >>
> >> Hello, i have a problem with Conditional BuildStep Plugin, i have
> set the regex matching rules and work, but if i chose "On evaluation
> failure" "Fail the build" or "Mark the build unstable", the build 
> stop and is marked as "SUCCESS"instead  of a red ball i have a blue 
ball
> >>
> >> --
> >> 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/72854815-bd34-44a7-
> a69d-9722da49c361%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/bbf48f3a-b42e-9eb1-186c-23a05bbc7c71%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.

This Email was scanned by Sophos Anti Virus

-- 
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/OF85C722B4.7F4CB402-ONC1258080.002EC6B7-C1258080.002ECE38%40lex-com.net.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins Pipeline : How could I access the git repository cloned at job start

2016-12-05 Thread Christoph Nenning
Hi,


> Where do you put this ws step ?

You can put it at the beginning of your Jenkinsfile


> My concern is how to benefit from the SCM schedule and checkout 
> phase made to retrieve the so called jenkinsfile, i.e. the script 
> (and possible libraries) that is executed to run the pipeline.

AFAIK you cannot use the workspace that jenkins creates to checkout 
Jenkinsfile.

But you can checkout the same repo (or other polled SCM URLs) with this 
command:

checkout scm


Regards,
Christoph



> From: Jean-Luc Pinardon 
> To: jenkinsci-users@googlegroups.com, 
> Date: 05.12.2016 09:05
> Subject: Re: Jenkins Pipeline : How could I access the git 
> repository cloned at job start
> Sent by: jenkinsci-users@googlegroups.com
> 
> Hello,
> 
> Thanks for your answer.
> But I am not sure to understand.
> Where do you put this ws step ?
> I am not sure to have been clear enough.
> My concern is how to benefit from the SCM schedule and checkout 
> phase made to retrieve the so called jenkinsfile, i.e. the script 
> (and possible libraries) that is executed to run the pipeline.
> 
> 2016-12-03 7:37 GMT+01:00 Sam K :
> I just use a ws('') {
>git url:. , branch: 'master'
> }
> 
> and now all the cloned content is within the directory I want.  
> 
> On Tuesday, November 29, 2016 at 1:14:03 AM UTC-8, Jean-Luc Pinardon 
wrote:
> Dear all,
> 
> I am exploring pipeline features, and I fall into a problem.
> The repository is indeed correctly cloned at job start and the 
> "jenkinsfile" is run.
> But I "discover" that I cannot access the cloned files from within 
> the stages within nodes. Just because, the workspace used at job 
> begin is certainly not the same as the workspace within the nodes.
> 
> So, my question is : is there a way to make available the initially 
> cloned files all over the pipeline, or should I clone the repository
> once more within the first stage and then stash the files I need.
> 
> Thanks for your help.
> J.L.P.
> -- 
> You received this message because you are subscribed to a topic in 
> the Google Groups "Jenkins Users" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/jenkinsci-users/qzBWmFHOmoI/unsubscribe.
> To unsubscribe from this group and all its topics, 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/aca57995-52c2-42f6-94aa-5cee7e434b29%
> 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/CALijN65Q_TE2zj5NhwJpoi5%2BW3jX-
> vVXds0QVJrXO4iKs72Wkw%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

This Email was scanned by Sophos Anti Virus

-- 
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/OFE7E55BA0.1AC16254-ONC1258080.002E9363-C1258080.002EBDB0%40lex-com.net.
For more options, visit https://groups.google.com/d/optout.


Re: Conditional BuildStep Plugin don't fail the build

2016-12-05 Thread Stefano Cognigni

there is a way to mark the build as failed?

Il 03/12/2016 01:10, Daniel Beck ha scritto:

'on evaluation failure' means 'when the regex is invalid'. It's not "when it doesn't 
match".


On 02.12.2016, at 09:44, Stefano  wrote:

Hello, i have a problem with Conditional BuildStep Plugin, i have set the regex matching rules and work, but if i chose 
"On evaluation failure" "Fail the build" or "Mark the build unstable", the build stop and 
is marked as "SUCCESS"instead  of a red ball i have a blue ball

--
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/72854815-bd34-44a7-a69d-9722da49c361%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/bbf48f3a-b42e-9eb1-186c-23a05bbc7c71%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins Pipeline : How could I access the git repository cloned at job start

2016-12-05 Thread Jean-Luc Pinardon
Hello,

Thanks for your answer.
But I am not sure to understand.
Where do you put this ws step ?
I am not sure to have been clear enough.
My concern is how to benefit from the SCM schedule and checkout phase made
to retrieve the so called jenkinsfile, i.e. the script (and possible
libraries) that is executed to run the pipeline.

2016-12-03 7:37 GMT+01:00 Sam K :

> I just use a ws('') {
>git url:. , branch: 'master'
> }
>
> and now all the cloned content is within the directory I want.
>
> On Tuesday, November 29, 2016 at 1:14:03 AM UTC-8, Jean-Luc Pinardon wrote:
>>
>> Dear all,
>>
>> I am exploring pipeline features, and I fall into a problem.
>> The repository is indeed correctly cloned at job start and the
>> "jenkinsfile" is run.
>> But I "discover" that I cannot access the cloned files from within the
>> stages within nodes. Just because, the workspace used at job begin is
>> certainly not the same as the workspace within the nodes.
>>
>> So, my question is : is there a way to make available the initially
>> cloned files all over the pipeline, or should I clone the repository once
>> more within the first stage and then stash the files I need.
>>
>> Thanks for your help.
>> J.L.P.
>>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Jenkins Users" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/jenkinsci-users/qzBWmFHOmoI/unsubscribe.
> To unsubscribe from this group and all its topics, 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/aca57995-52c2-42f6-94aa-5cee7e434b29%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/CALijN65Q_TE2zj5NhwJpoi5%2BW3jX-vVXds0QVJrXO4iKs72Wkw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.