Re: [Jenkins World 2018] - Graders wanted

2018-04-13 Thread Michael Pailloncy
Hi Alyssa,

I would be very happy to help.

Cheers
Michaël


On Fri, Apr 13, 2018 at 6:09 PM, Alyssa Tong  wrote:

> Hello,
>
> I am looking for additional graders to join the Jenkins World (JW) review
> committee to help grade Jenkins World 2018 SF & EU proposals.
>
> Time commitment expected:
>
>- JW SF: 137 Jenkins submissions.
>- JW EU: 76 Jenkins submissions at the moment but most likely will
>increase after close of CFP this Sunday.
>
> What you get:
>
>- Pix, bio on the Committee webpage (part of JW website)
>- JW swag
>- Free conference ticket to JW
>
> Criteria:
>
>- You love to read and has a keen mind for the latest and greatest,
>trendy technical topics
>
> Pls respond to this thread if you're interested.
>
> BR,
> alyssa
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jenkinsci-dev+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jenkinsci-dev/CAC9wNaxGJ-r-Jz%3D1Nyx7otR0TsHEYDPR-V-sR%2B%
> 3D5JRCTsZNbRw%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/CAPO77c1Lu0C4zH%3D7dV1n%3DeDgixovk9LLWdhzGTB8N-HmYKpvdg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: How can I inject environment variables into my groovy class?

2017-11-28 Thread Michael Pailloncy
Pipeline environment variables are not stored at the OS level. That's why
you are not able to get them using *System.getenv() *(which only list OS
level environment variables).
But you should be able to retrieve them like any other classical
environment variables : with the "${MyVar}" syntax inside your shared lib
class.

Hopefully it helps.

Michaël

2017-11-28 22:30 GMT+01:00 red 888 :

> My pipeline is using the environment directive to set an environment var
> and then calls a groovy class:
>
> def call(int blah) {
>
> pipeline {
> agent any
>
> environment {
> MyVar = credentials('djsjflsjfljsf')
> }
>
> stages {
> stage('Stage ONE') {
> steps {
> echo test.methodA()
>
> 
>
>
>
> But from in my groovy class I don't see those environment variables:
>
> // vars/test.groovy
>
>
> class test implements Serializable {
> static methodA (){
>
> def env = System.getenv()
> return env.dump()
> //return ['powershell', 'ls env:'].execute().text
>
> }
>
>
> env.dump() and listing envs from the shell from inside the class doesn't
> show those variables I added in the environment directive. Can I change the
> scope of the class to give it access to these environment vars?
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> --
> 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/87b6e2b0-ed9a-4ede-b22c-3b06761345e1%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/CAPO77c3iY5YycUtQiMGi2UgdczREa3brDiG5PBxvQKk%3DBHsWTw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Error with parallel pipeline

2017-11-20 Thread Michael Pailloncy
Can you share your Pipeline related plugins version please ?
Originally using .each{} syntax was not working as expected, but it should
be working on latest versions.

Hopefully it helps.

Le 17 nov. 2017 18:49, "Ramesh Bar"  a écrit :

> We are getting the below error with parallel pipeline for the 'Test' Stage
> which essentially tries to spin-up docker containers equal to number of
> tests for parallel execution. Will appreciate any thoughts/suggestions to
> fix this.
>
> java.lang.UnsupportedOperationException: Calling public static java.util.List 
> org.codehaus.groovy.runtime.DefaultGroovyMethods.each(java.util.List,groovy.lang.Closure)
>  on a CPS-transformed closure is not yet supported (JENKINS-26481); 
> encapsulate in a @NonCPS method, or use Java-style loops
>
>
> *pipeline code:*
> def cucumberTestImage
> pipeline {
> agent any
> options {
> echo "options stuff"
> }
>
>   stages {
> stage('Build & Deploy'){
> steps {
> parallel (
>   SPA: {
> script {
>   echo "deploying SPA app"
> }
>   }
> }
> echo 'SPA JOB COMPLETED!!'
>   },
>   Tests: {
> script {
>   }
>   //building docker image name cucumberTestImage
>
> }
>   }
> )
>   }
> }
>
> stage('Test') {
> steps {
> script {
> def tests = [:]
> getFeatures().each {stage -> tests[stage] = {
> cucumberTestImage.inside{sh "echo ${stage}"}
> }}
> parallel tests;
> }
> }
> }
>   }
> }
>
> @NonCPS
> def getFeatures() {
> return sh(script: 'cd testfolder && find features -type f -name
> \'*.feature\'', returnStdout: true).tokenize()
> }
>
> --
> 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/85bc4dfb-6ab6-43e8-944c-09e215b26d4f%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/CAPO77c03VG6Y%2BPRBsm_vKdQb6LQcSAUoJ%2BvpNNgHovMn2vdXtw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: http_proxy is not taked in account in pipeline step env

2017-10-09 Thread Michael Pailloncy
Hey Aurélie,

I've tested with this pipeline (derived from yours) and I'm not able to
reproduce your issue :

pipeline {

agent any

environment {
http_proxy = 'http://xxx:xxx'
TOTO='titi'
}

stages {
stage('xxx') {
when { expression { true } }
steps {
sh 'env'
sh 'env | grep TOTO'
sh 'env | grep http_proxy'
}
}
}
}

​
Can you test with this one ?
Moreover, can you also provide your Jenkins and related Pipeline
Declarative plugins versions ?

Nice to see another Toulousaing(neu) on this mailing list BTW :-)

Cheers
Michaël

2017-10-09 10:16 GMT+02:00 Aurélie Vache :

> Hi,
>
> I nbeed in a jenkins pipeline to have an access to a http_proxy.
>
>
> In my environment variables in my Jenkinsfile I've etted my http proxy and
> an env var named TOTO, then in one of my steps I checked if env var exists:
>
> environment {
> ...
>
> http_proxy = 'http://xxx:xxx'
> ...
> TOTO='titi'
> }
> ...
> stages {
> stage('xxx') {
> when { anyOf { branch "${env.STABLE_BRANCH}"; branch "${
> http://env.DEV _BRANCH}" } }
> steps {
> sh 'env'
> sh 'env | grep TOTO'
> sh 'env | grep http_proxy'
> }
> }
> }
>
> Résultats :
>
> [...S3MX7KBEQ] Running shell script
> + env
> + grep TOTO
> TOTO=titi
> [Pipeline] sh
> [...S3MX7KBEQ] Running shell script
> + env
> + grep http_proxy
> [Pipeline] }
> [Pipeline] // stage
> [Pipeline] }
>
> TOTO var eists but not http proxy ?!
>
> I need this http proxy in my pipeline. is it something i missed?
>
> 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/247ced4e-4874-48c8-8470-7d6fd33c0d24%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/CAPO77c0X2ENigQiYkPb38N65-075p71FAT%3DyU9xU4Y%3Dko-znbg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using params.item in agent docker section ...

2017-10-06 Thread Michael Pailloncy
Hi,

To enable String interpolation, you need to use double quotes instead of
simple quotes, otherwise variables are not resolved.

Cheers

2017-10-06 7:53 GMT+02:00 Eric Tan :

> Hi
>
> Is there a way to use parameters in the agent docker section like:
>
> pipeline {
>
> parameters {
>
> string(name: 'OS_PORT', defaultValue: '')
>
> string(name: 'CONTAINER_PORT', defaultValue: '')
>
>}
>
>agent {
>
> docker {
>
> image 'someimage'
>
> // args '-p :'
>
> args '-p ${params.OS_PORT}:${params.CONTAINER_PORT}'
>
> }
>
> }
>
>
> }
>
>
> It does not work above.
>
> 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/5c63e393-3da6-49a4-ad99-7e9814bbe828%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/CAPO77c05jmUuNEtxy%2BcfXHUpbmUOfpZz5eD3bHBg%2B%2Bhmjo1F4w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: LDAP and systemctl jenkins restart

2017-10-04 Thread Michael Pailloncy
No, clearly it doesn't sound to be the way it should work :-)
Do you see any error/exception inside Jenkins's logs when you save your
LDAP configuration or during Jenkins startup ?

Cheers

2017-10-03 15:55 GMT+02:00 Joaquin Henriquez <
joaquin.henriq...@countercept.com>:

> Hi ppl
>
>
>
> I configure LDAP and everything is fine, but when I restart Jenkins
> “systemctl restart jenkins” the config for LDAP is removed.
>
>
>
> Is this the way it should work or is there something wrong?
>
>
>
> BR
>
>
>
> Jo
>
> --
> 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/745136b239784ed9913b334f55321187%40BSKEXCH2013HYPV.
> mwrinfosecurity.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/CAPO77c05gzcnneFjhofvKi7mpRee%3D%3DzfjQw_p3%3DA0LLmpi7row%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Another CLI question

2017-10-04 Thread Michael Pailloncy
If you run this very same command directly on the Jenkins server and
without reaching it through your reverse proxy, does it work ?
I'm wondering if it's not related to the configuration of your reverse
proxy. As described in this documentation
, you need
to ensure that it doesn't buffer request/response bodies when serving
Jenkins through HTTPS.

Hopefully it helps.

2017-10-04 19:01 GMT+02:00 Richard Ginga :

> is anybody out there?
>
> my script syntax for this is
>
> cmd = 'java -jar ~/Downloads/jenkins-cli.jar -noKeyAuth -s
> https://stt-jenkins.disruptorbeam.com/ -auth rginga:
> 0793b086e3c9272ddeb0daff1093518c connect-node ' + params.NODENAME
> st = sh(returnStatus: true, script: cmd)
>
>
>
> On Wed, Oct 4, 2017 at 10:08 AM, Richard Ginga 
> wrote:
>
>> I see a thread happening on CLI issues. I have a different question/issue
>> and do not want to hijack that other discussion.
>>
>> when running any cli in a pipeline script I an getting below but the
>> command works
>>
>> *00:04:11.368* + java -jar /Users/jenkins/Downloads/jenkins-cli.jar 
>> -noKeyAuth -s https://stt-jenkins.disruptorbeam.com/ -auth rginga:xx 
>> connect-node perf-test-client3
>>
>> *00:04:28.597* Oct 04, 2017 9:52:34 AM hudson.cli.CLI$5 run*00:04:28.597* 
>> WARNING: null*00:04:28.597* java.io.IOException: Stream is 
>> closed*00:04:28.597*at 
>> sun.net.www.protocol.http.HttpURLConnection$StreamingOutputStream.checkError(HttpURLConnection.java:3512)*00:04:28.597*
>>   at 
>> sun.net.www.protocol.http.HttpURLConnection$StreamingOutputStream.write(HttpURLConnection.java:3486)*00:04:28.597*
>>at 
>> java.io.DataOutputStream.writeInt(DataOutputStream.java:197)*00:04:28.597*   
>> at 
>> hudson.cli.PlainCLIProtocol$EitherSide.send(PlainCLIProtocol.java:175)*00:04:28.597*
>>  at 
>> hudson.cli.PlainCLIProtocol$ClientSide.sendEndStdin(PlainCLIProtocol.java:347)*00:04:28.597*
>>  at hudson.cli.CLI$5.run(CLI.java:679)*00:04:28.597*
>>
>> --
>> Dick Ginga
>> Build Engineer
>> rgi...@disruptorbeam.com
>>
>>
>
>
> --
> Dick Ginga
> Build Engineer
> rgi...@disruptorbeam.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/CAL3PpaU2vJiaU65icq6vBNwBs%
> 3D7_%3DvG_a4_tOq_vdVxHbLo4Ug%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/CAPO77c2yn_VvCtXNbeA9R27E2yNm8xb2_PTn1UEK-0ocoTHvXw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: How can i call global function defined in Jenkinsfile from inside the external groovy script loaded with 'load' step ?

2017-09-18 Thread Michael Pailloncy
IIC, this is a scope problem.

To strictly answer to your question, you could convert the global function
into a Closure

and then pass it as parameter of *functionB*.

I think something like that should work :

externalScripts = ''

pipeline {
agent master

stages {

stage('first') {

agent { label 'master'  }

steps {
script {
loadScripts()

externalScripts.functionA()
}
}
}

stage('second') {

agent { label 'some_slave_node' }

steps {
script {
externalScripts.functionB(*this.*)
}
}
}
}

}

def someGlobalFunction() {
// some common code
}

def loadScripts() {

externalScripts = load 'script_next_to_jenkinsfile.groovy'
}


​

// contents of script_next_to_jenkinsfile.groovy

def functionA() {
// Some regular code will work just fine
}
*def functionB(customFunction) {
customFunction()
}*

return this

​

However, I'm personally not very comfortable to use this kind of syntax
inside Pipeline scripts and IMHO, you should try to find another way to
structure it (to avoid complexity).

BTW, I'm wondering if others have already used this kind of syntax/tricks
inside their pipeline and if it's something that it's not recommended (if
so, why ?).

Hopefully it helps.

Cheers
Michaël


2017-09-15 11:02 GMT+02:00 ishan jain :

> Hi,
>
> My Jenkinsfile is getting rather large and i want to break it down into
> different groovy scripts for easy maintenance. Here is a sample code
> structure.
>
>
> externalScripts = ''
>
> pipeline {
> agent master
> stages {
>
> stage('first') {
>
> agent { label 'master' }
> steps {
> script {
> loadScripts()
> externalScripts.functionA()
> }
> }
> }
> }
> stage('second') {
>
> agent { label 'some_slave_node' }
> steps {
> script {
> externalScripts.functionB()
> }
> }
> }
> }
> }
>
> def someGlobalFunction() {
> // some common code
> }
>
> def loadScripts() {
>
> externalScripts = load 'script_next_to_jenkinsfile.groovy'
> }
>
>
> This works fine if i have some independent code defined in external groovy
> file. But this breaks if i call a function defined in main Jenkinsfile.
>
> // contents of script_next_to_jenkinsfile.groovy
>
> def functionA() {
> // Some regular code will work just fine
> }
>
> def functionB() {
>
>// this throws an error - java.lang.NoSuchMethodError: No such DSL
> method 'someGlobalFunction' found among steps
>
> someGlobalFunction()
> }
> return this
>
>
>
> I thought the groovy files are loaded in the whole code. How can i make it
> work like this setup ?
>
> --
> 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/f959f630-2892-452b-a6da-2f56e3b8d329%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/CAPO77c3T%3DtouGwy85XJGQJowRKPJPEF2b-UVHtDveiR%3DTbdZkw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Not able to see : Terraform Configuration option in "system configuration"

2017-09-07 Thread Michael Pailloncy
I think you are looking at the wrong place.
All tools auto-installer configuration are located in the "Global Tool
Configuration" page => ${JENKINS_URL}/configureTools/

Hopefully it helps :-)



2017-09-06 18:39 GMT+02:00 sanjay naikwadi :

> Hi
>
> I have installed Terraform plugin from : https://wiki.jenkins.io/
> display/JENKINS/Terraform+Plugin (Version 1.0.9)
> Jenkins Version : jenkins-2.60.3-1.1.noarch (Centos 7)
>
> But I am not able to see any option in System configuration to install
> Terraform.
>
> Anything I am missing or any thing I am doing wrong ?
>
> Regards
> Sanjay Naikwadi
>
> --
> 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/e3c7d674-8926-4bf9-ab94-919904778fb5%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/CAPO77c276Dm4heht2nJvR%3Dx9Rgw_L98Ydr%3DoD0X3%3Dr8xycRt0w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to disable concurrent builds in a multibranch pipeline?

2017-09-01 Thread Michael Pailloncy
Yes, probably. Seems there are already some discussions about that here :
https://issues.jenkins-ci.org/browse/JENKINS-35359

2017-09-01 20:18 GMT+02:00 Dallas Clement <dallas.a.clem...@gmail.com>:

> Thanks for the tip Michael.  This looks like it would work.  But not very
> elegant.  Would be better if you could simply disable concurrent builds for
> an entire multibranch pipeline.  Maybe a Jira improvement request?
>
> On Friday, September 1, 2017 at 12:29:15 PM UTC-5, mpapo - Michael
> Pailloncy wrote:
>>
>> You might be interested by this thread
>> <https://groups.google.com/forum/?utm_medium=email_source=footer#!msg/jenkinsci-users/Cnoc0RFCvvw/E92WKr53CQAJ>
>> :-)
>>
>> 2017-08-31 16:58 GMT+02:00 Dallas Clement <dallas.a...@gmail.com>:
>>
>>> I know how to disable concurrent builds for a particular branch.   That
>>> works fine.  But how I can I disable multiple branches from building at the
>>> same time?
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Jenkins Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to jenkinsci-use...@googlegroups.com.
>>> To view this discussion on the web visit https://groups.google.com/d/ms
>>> gid/jenkinsci-users/1fa8921b-4539-4f69-b0c2-b063cda60d18%
>>> 40googlegroups.com
>>> <https://groups.google.com/d/msgid/jenkinsci-users/1fa8921b-4539-4f69-b0c2-b063cda60d18%40googlegroups.com?utm_medium=email_source=footer>
>>> .
>>> 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/48e545f9-dcaf-4ed6-b6a5-dff6b7b752ba%40googlegroups.
> com
> <https://groups.google.com/d/msgid/jenkinsci-users/48e545f9-dcaf-4ed6-b6a5-dff6b7b752ba%40googlegroups.com?utm_medium=email_source=footer>
> .
>
> 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/CAPO77c3nvb4ur3S5Y20pmRknFCcrLqJCyX7OLe-VCOdkO8NUeQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to disable concurrent builds in a multibranch pipeline?

2017-09-01 Thread Michael Pailloncy
You might be interested by this thread

:-)

2017-08-31 16:58 GMT+02:00 Dallas Clement :

> I know how to disable concurrent builds for a particular branch.   That
> works fine.  But how I can I disable multiple branches from building at the
> same time?
>
> --
> 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/1fa8921b-4539-4f69-b0c2-b063cda60d18%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/CAPO77c301vgVacpMZTXub%2BW%2BM-KmaffVu%3DR7Hvo7R%3D1wWvxsSg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: stop deployment when build fails while using ssh plugin

2017-09-01 Thread Michael Pailloncy
Not sure to understand your issue, could you give more details plz ?
Do you have logs ? Just stopping the build is not enough ?

2017-09-01 4:30 GMT+02:00 pandiyan kaliaperumal :

> Hi Friends,
>
> Need to know to stop the deployment, while using ssh plugin when build
> gets failed in jenkins. Could any one suggest.
>
> Thanks,
> Pandi
>
> --
> 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/d2519833-5e1a-4546-9cad-ec089c21b698%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/CAPO77c3MJYDwPv6LGs0Pj6WR4sa%2BTsubuvEnrtT-QXREbiQzZA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Pass variable from 1 job to other job with seperate jenkinsfiles

2017-08-29 Thread Michael Pailloncy
Hey. IIUC, this should be possible. Can you show us the content of your
Jenkinsfiles please ?

2017-08-29 21:07 GMT+02:00 Werner Dijkerman :

> Hi,
>
> I have an issue and I don't get it to work.
>
> I have 2 Jenkinsfiles and thus 2 jobs. With the first Jenkinsfile I set an
> variable by reading a specific file, in this case: def commit_id =
> readFile('.git/commit-id').trim()
> Now I need to pass this 'commit_id' variable from the 1st Jenkinsfile/job
> to the 2nd Jenkinsfile/job. The 2nd job will already be triggered once the
> 1st job is completed successfully.
>
> I Already have installed the 'Parameterized Trigger plugin' plugin and
> added a "string" parameter (Name: commid_id, value: {commit_id}) but this
> isn't working.
>
> What am I doing wrong? Any suggestions?
>
> Kind regards,
> Werner
>
> --
> 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/b3b7aa55-f9e4-45dd-abb8-05dd213b5b13%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/CAPO77c0-eGLAmY3pT0dPk43qpq8LcWLsjhoNthGXs_k%2BrttjEA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Unable to get login page

2017-08-29 Thread Michael Pailloncy
Hey. Have you check Jenkins logs ?

2017-08-28 15:11 GMT+02:00 phanikumar :

> Hello team,
>
> I have developed a custom plugin and uploaded it to my Jenkins server. Now
> I
> am unable to get the login page for Jenkins server. I even restarted my
> entire physical machine. But it didn't work. Can some one help me out on
> this?
>
>
>
> --
> View this message in context: http://jenkins-ci.361315.n4.
> nabble.com/Unable-to-get-login-page-tp4901614.html
> Sent from the Jenkins users mailing list archive at Nabble.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/1503925868997-4901614.post%40n4.nabble.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/CAPO77c05s9TCqj-rDWegfDmNEEOh1OLnfO1OdKb-JufYDcD6mQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Moving From Parameterized Trigger Plugin to Pipelines

2017-08-24 Thread Michael Pailloncy
Hello,

To load a properties file, you can install this plugin :
https://wiki.jenkins-ci.org/display/JENKINS/Pipeline+Utility+Steps+Plugin
Then, you will have access to *readProperties* utility step. See
https://github.com/jenkinsci/pipeline-utility-steps-plugin/blob/master/docs/STEPS.md
for usage

IIUC your case, it will be worthwhile to create a method translating
properties to build parameters.

Moreover, for maintenance easiness, the best is to create Shared Libraries
 to declare common
steps for all yours pipelines in a centralized way.

My 2 cents

2017-08-24 21:43 GMT+02:00 AJ Ferrigno :

> Hello,
>
> I am trying to move towards Pipelines instead of our Build Flow /
> Parameterized Trigger plugin setup. It is mostly making sense, but there is
> one thing that seems very cumbersome / maybe even impossible under
> Pipelines which I can do with ease via the Parameterized Trigger plugin
> (see documentation here
> ).
>
> I like the concept of being able to trigger another job, and specify a
> properties file (each line is in the format x=y) somewhere in my job's
> workspace which automatically become the parameters of the next job in the
> sequence. It would be awesome to have this functionality exist somewhere in
> Pipelines as a step or some one-liner I could use.
>
> For example, say I have this pipeline (basically: create parameters for a
> deploy, then deploy using those parameters):
>
>>
>> pipeline {
>> agent any
>>
>> stages {
>> stage('Parameters') {
>>  steps {
>> build job: "DeployParameters", parameters: [string(name:
>> 'project', value: project), string(name: 'branchName', value: branchName)]
>> /* grab artifact file "artifact.txt" from
>> "DeployParameters" job and set a bunch of variables based on it */
>> }
>> }
>> stage('Deploy') {
>>  steps {
>> build job: "DeployJob", parameters: /* pass in all
>> parameters set above */
>>  }
>
>
> First of all, looking at the commented lines, is the above possible at
> all, using a step or otherwise? I tried using the below code to do
> something similar, but it (Jenkins v2.74) complained "Scripts not permitted
> to use new java.util.Properties"
>
> step([$class: 'CopyArtifact',
>>  filter: 'artifact.txt',
>>  projectName: "DeployParameters"])
>> script {
>>  def content = readFile 'artifact.txt'
>>  Properties properties = new Properties()
>>  InputStream is = new ByteArrayInputStream(content.getBytes());
>>  properties.load(is)
>>  def runtimeString = 'variable_i_want'
>>  variable_i_want = properties."$runtimeString" }
>
>
> I know I can probably tell my Jenkins installation to allow
> java.util.Properties, but that seems like an unsustainable hack. I don't
> think I'm doing anything terribly insecure here, so I would really like to
> be above-board about it.
>
> Second, even if I could get the above code to work, it is simply too long
> and un-maintainable. Especially since I would probably be re-using this
> many times, it would be awesome to replace this functionality in the
> Parameterized Trigger plugin with a simple one-liner. It may even help
> somebody else somewhere.
>
> Has anybody else needed something like this? If this is a feature request
> not currently thought of, what would it take to get this solution developed?
>
> Thanks for any help,
> AJ
>
> --
> 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/CAKzFqnPUNHyZOjQztGKkTKuA7d27o
> Ygj0AqgHfh94Ehs6E6Rug%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/CAPO77c1FYk93e37Lr7o7sheP2kG%3DvYFEa903_tJgJEnEFzg36Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Multijob out of memory issues

2017-08-24 Thread Michael Pailloncy
The best to start here would be to try instructions on this page

and analyze the resulting heapdump.



2017-08-24 8:08 GMT+02:00 Shashank Bhargav :

> Hi All,
>
> We are facing serious out of memory errors with Multi job project.
>
> Configuration contains the following :
>
> 1. Parameterized build
> 2. Multi job Phase
> 3. Inject passwords to the build as environment variables
> 4. Set Jenkins user build variables
> 5. Editable Email notification
>
> All of these is executed ,memory immediately shoots up after last step  is
> executed and Jenkins hangs.
>
> Has anyone faced such issues before?
>
> --
> 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/2f7997c8-094c-4ab1-9888-47d354ad3c80%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/CAPO77c0PHO4X0XqW%3DSJ_gbXT1XH0zc75cRTynMFndyAOs5_4rg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to group and sort tests and run in parallel without Parallel Test Executor Plugin

2017-08-14 Thread Michael Pailloncy
Hi, thanks for the full explanation of your use case :-)
How do you keep the Groovy file containing your previous builds result ?
inside an agent's workspace ?

2017-08-09 14:52 GMT+02:00 Viacheslav Dubrovskyi <dub...@gmail.com>:

> Hi Michael,
>
> We have list of tests which I would like run in parallel. The Parallel
> Test Executor Plugin doesn't work in our case, because we don't use junit
> and the list of tests (behatList) is result of script work. I can't run
> all tests on one node because it will take about 16 hours.
>
> So I save results of previous builds to groovy file as map and load it
> before (suitesStat) . Then I group and sort tests (sortSuites(suites,
> suites_time) in previous post). And then I use this list for create
> parallel run.
>
> def behatList =['AutoSuiteSet_0', 'AutoSuiteSet_1', 'AutoSuiteSet_2',
> 'AutoSuiteSet_3', 'AutoSuiteSet_4', 'AutoSuiteSet_5']
> def suitesStat=[AutoSuiteSet_0:0, AutoSuiteSet_1:1, AutoSuiteSet_2:2,
> AutoSuiteSet_3:3, AutoSuiteSet_4:4, AutoSuiteSet_5:5]
> behatList2=sortSuites(behatList, suitesStat)
>
> stage("test") {
> behatList=sortSuites(behatList, suitesStat)
> def enviroments_b = [failFast: failFirstError]
> for (int j = 0; j < behatList.size() ; j++) {
> int index_b=j
> enviroments_b["TestEnv behat=${behatList[index_b]}"] = {
>   node('behat') {
>  for (int j2 = 0; j2 < behatList[index_b].size() ; j2++) {
> int index_b2=j2
> sh "./run_test ${behatList[index_b][index_b2]}"
>      }
>   }
> }
> }
> parallel enviroments_b
> }
> ...
>
>
>
> 06.08.2017 17:47, Michael Pailloncy пишет:
>
> However, what do you want to achieve exactly ?
>
>
> --
> WBD,
> Viacheslav Dubrovskyi
>
> --
> 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/bad445be-212a-6f0b-7001-0c9212761be1%40gmail.com
> <https://groups.google.com/d/msgid/jenkinsci-users/bad445be-212a-6f0b-7001-0c9212761be1%40gmail.com?utm_medium=email_source=footer>
> .
> 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/CAPO77c3TeEWZEsxNHXb-y0nRg%3DZ5%2BVnveqVcZuiRBj7GkttjBQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to prevent concurrent builds across all branches in a multibranch pipeline project?

2017-08-14 Thread Michael Pailloncy
Why do you want to prevent this ? Do you have a shared resource for all
your builds ?
If yes, I think that this plugin will fit your needs
https://wiki.jenkins.io/display/JENKINS/Lockable+Resources+Plugin

2017-08-14 12:37 GMT+02:00 Mark Allison :

> I have tried to use
>
> properties[(disableConcurrentBuilds)]
>
> but that only prevents concurrent builds within one branch in a
> multibranch pipeline project. Is there a way to prevent concurrent builds
> across all branches in a project?
>
> 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/f91f57d6-e39a-4abd-93e0-1a016434cc9f%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/CAPO77c3%2BVGPHQZ1WTHenN7J%2B0VX_fmXENwBMg%3DCr4tTN6T8-Tg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Accessing a variable in shell

2017-08-08 Thread Michael Pailloncy
Oh just realized that this for loop syntax exists even in Groovy :-) (I'm
used to using *each *instead of for loops)
But please try using C-style for loop syntax.

2017-08-08 14:45 GMT+02:00 Michael Pailloncy <michael.paillo...@gmail.com>:

> This syntax doesn't exist in Groovy : *for (String repoName : repoList) {
> ... }*
> The direct equivalent is : *for (String repoName in repoList) { ... }*
>
> However, it's better to use the C-style for loop syntax when using
> pipeline (that's why I've used it in my previous example) :
>
> for (int i = 0; i < moduleList.size(); i++) {
>def moduleName = moduleList[i]
>...
> }
>
> See https://github.com/jenkinsci/pipeline-examples/blob/master/docs/BEST_
> PRACTICES.md#groovy-gotchas
>
> Cheers
>
> 2017-08-08 14:31 GMT+02:00 Idan Adar <i...@adar.me>:
>
>> I've made some changes and now I'm getting:
>>
>> java.lang.NullPointerException: Cannot get property '$repoName' on null
>> object
>>
>>
>>
>> def repoList = ReposToUpdate.tokenize(",");
>> def moduleList = npmDependencies.tokenize(",");
>>
>> pipeline {
>>agent {
>>   label ''
>>}
>>
>>stages {
>>   stage ("Update package.json") {
>>  steps {
>> script {
>>for (String repoName : repoList) {
>>   sshagent (credentials: ['']) {
>>  sh '''
>> git clone -b master git@
>> .com:/${repoName}.git
>> cd ${repoName}
>> stat -t . > folderStat1.txt
>>  '''
>>
>>  for (String moduleName : moduleList) {
>> sh '''
>>cd ${repoName}
>>ncu -u -f "${moduleName}"
>>stat -t . > folderStat2.txt
>> '''
>>  }
>>
>>  def folderStat1 = readFile('folderStat1.txt').trim()
>>  def folderStat2 = readFile('folderStat2.txt').trim()
>>
>>  if (folderStat1 == folderStat2) {
>> slackSend (
>>color: '#199515',
>>message: "$JOB_NAME: <$BUILD_URL|Build
>> #$BUILD_NUMBER> ${repoName}: Common code dependencies match the latest
>> package versions."
>> )
>>  }
>>  else {
>> sh '''
>>cd ${repoName}
>>
>>git config --global user.name ""
>>git config --global user.email 
>>git commit -am 'Bump common packages version
>> number [ci skip]'
>>git push origin master
>>
>>cd ..
>>rm -rf ${repoName}
>> '''
>>
>> slackSend (
>>color: '#199515',
>>message: "$JOB_NAME: <$BUILD_URL|Build
>> #$BUILD_NUMBER> ${repoName}: Common code dependencies successfully updated
>> to the latest package versions."
>> )
>>  }
>>   }
>>}
>> }
>>  }
>>   }
>>}
>>
>>post {
>>   failure {
>>  slackSend (
>> color: '#F01717',
>> message: "$JOB_NAME: <$BUILD_URL|Build #$BUILD_NUMBER>,
>> Update failed. Review the build logs."
>>  )
>>   }
>>}
>> }
>>
>> --
>> 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/54962dc1-e80e-4ce3-8583-652a1fd714fe%
>> 40googlegroups.com
>> <https://groups.google.com/d/msgid/jenkinsci-users/54962dc1-e80e-4ce3-8583-652a1fd714fe%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
>> 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/CAPO77c27cxQnf7zRg5UEODMOWRO3BtNRQ0RjBPFHp%2B6Q88oMvA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Accessing a variable in shell

2017-08-08 Thread Michael Pailloncy
This syntax doesn't exist in Groovy : *for (String repoName : repoList) {
... }*
The direct equivalent is : *for (String repoName in repoList) { ... }*

However, it's better to use the C-style for loop syntax when using pipeline
(that's why I've used it in my previous example) :

for (int i = 0; i < moduleList.size(); i++) {
   def moduleName = moduleList[i]
   ...
}

See
https://github.com/jenkinsci/pipeline-examples/blob/master/docs/BEST_PRACTICES.md#groovy-gotchas

Cheers

2017-08-08 14:31 GMT+02:00 Idan Adar :

> I've made some changes and now I'm getting:
>
> java.lang.NullPointerException: Cannot get property '$repoName' on null
> object
>
>
>
> def repoList = ReposToUpdate.tokenize(",");
> def moduleList = npmDependencies.tokenize(",");
>
> pipeline {
>agent {
>   label ''
>}
>
>stages {
>   stage ("Update package.json") {
>  steps {
> script {
>for (String repoName : repoList) {
>   sshagent (credentials: ['']) {
>  sh '''
> git clone -b master git@.com:/${repoName}.
> git
> cd ${repoName}
> stat -t . > folderStat1.txt
>  '''
>
>  for (String moduleName : moduleList) {
> sh '''
>cd ${repoName}
>ncu -u -f "${moduleName}"
>stat -t . > folderStat2.txt
> '''
>  }
>
>  def folderStat1 = readFile('folderStat1.txt').trim()
>  def folderStat2 = readFile('folderStat2.txt').trim()
>
>  if (folderStat1 == folderStat2) {
> slackSend (
>color: '#199515',
>message: "$JOB_NAME: <$BUILD_URL|Build
> #$BUILD_NUMBER> ${repoName}: Common code dependencies match the latest
> package versions."
> )
>  }
>  else {
> sh '''
>cd ${repoName}
>
>git config --global user.name ""
>git config --global user.email 
>git commit -am 'Bump common packages version
> number [ci skip]'
>git push origin master
>
>cd ..
>rm -rf ${repoName}
> '''
>
> slackSend (
>color: '#199515',
>message: "$JOB_NAME: <$BUILD_URL|Build
> #$BUILD_NUMBER> ${repoName}: Common code dependencies successfully updated
> to the latest package versions."
> )
>  }
>   }
>}
> }
>  }
>   }
>}
>
>post {
>   failure {
>  slackSend (
> color: '#F01717',
> message: "$JOB_NAME: <$BUILD_URL|Build #$BUILD_NUMBER>, Update
> failed. Review the build logs."
>  )
>   }
>}
> }
>
> --
> 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/54962dc1-e80e-4ce3-8583-652a1fd714fe%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/CAPO77c0m30aQaGft62iBKmAvk4pDWmCPDEywUir_Yv-Kh03DoQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Accessing a variable in shell

2017-08-08 Thread Michael Pailloncy
The for loop is in Java syntax instead of script shell syntax here :

sh """
git clone -b master git@.com:/${repoName}.git
cd ${repoName}

stat -t . > folderStat1.txt
for (String moduleName : moduleList) {
   ncu -u -f "${moduleName}"
}

stat -t . > folderStat2.txt
"""

IIUC, you want to do something like :

sh "git clone -b master git@.com:/${repoName}.git"

dir(repoName) {
sh "stat -t . > folderStat1.txt"
for (int i = 0; i < moduleList.size(); i++) {
def moduleName = moduleList[i]
sh "ncu -u -f \"${moduleName}\""
}
sh "stat -t . > folderStat2.txt"
}

Hopefully it helps.

2017-08-07 14:49 GMT+02:00 Idan Adar :

> I have tried this, but it complains:
>
> groovy.lang.MissingPropertyException: No such property: moduleName for class: 
> WorkflowScript
>
>
> Here is the full Jenkinsfile:
> The majority of it can be disregarded... the issue at hand is the use of
> the variables, ${repoName}, ${moduleName}, etc...
>
> ReposToUpdate and npmDependencies are Extended choice parameters e.g.:
> myrepo1,myrepo2,myrepo3,...
>
> def repoList = ReposToUpdate.tokenize(",");
> def moduleList = npmDependencies.tokenize(",");
>
> pipeline {
>agent {
>   label 'cert_mgmt'
>}
>
>stages {
>   stage ("Update package.json") {
>  steps {
> script {
>for (String repoName : repoList) {
>   sshagent (credentials: ['credentials-ID']) {
>  sh """
> git clone -b master git@.com:/${repoName}.
> git
> cd ${repoName}
>
> stat -t . > folderStat1.txt
> for (String moduleName : moduleList) {
>ncu -u -f "${moduleName}"
> }
>
> stat -t . > folderStat2.txt
>  """
>
>  def folderStat1 = readFile('folderStat1.txt').trim()
>  def folderStat2 = readFile('folderStat2.txt').trim()
>
>  if (folderStat1 == folderStat2) {
> slackSend (
>color: '#199515',
>message: "$JOB_NAME: <$BUILD_URL|Build
> #$BUILD_NUMBER> ${repoName}: Common code dependencies match the latest
> package versions."
> )
>  }
>  else {
> sh """
>cd ${repoName}
>
>git config --global user.name ""
>git config --global user.email 
>git commit -am 'Bump common packages version
> number [ci skip]'
>git push origin master
>
>cd ..
>rm -rf ${repoName}
> """
>
> slackSend (
>color: '#199515',
>message: "$JOB_NAME: <$BUILD_URL|Build
> #$BUILD_NUMBER> ${repoName}: Common code dependencies successfully updated
> to the latest package versions."
> )
>  }
>   }
>}
> }
>  }
>   }
>}
>
>post {
>   failure {
>  slackSend (
> color: '#F01717',
> message: "$JOB_NAME: <$BUILD_URL|Build #$BUILD_NUMBER>,
> Update failed. Review the build logs."
>  )
>   }
>}
> }
>
>
>
> On Sunday, July 30, 2017 at 10:48:39 PM UTC+3, Joachim Nilsson wrote:
>>
>> As I understand, it is written in Groovy. That means you can access a
>> variable in a (Groovy)string using dollar and optionally curly brackets.
>>
>> "  variable value is ${variable} "
>>
>> Skaffa Outlook för Android 
>>
>>
>>
>> Från: Idan Adar
>> Skickat: söndag 30 juli 13:56
>> Ämne: Accessing a variable in shell
>> Till: Jenkins Users
>>
>>
>> Given the following script block in a stage (Declarative pipeline), how
>> can I access the repoName variable?
>>
>> stages {
>> stage("...") {
>> script {
>> for (String repoName: repoList) {
>> sshagent (credentials: 
>> ['e276113e-0ec9-4eaa-88f9-a7db5c9635b6'])
>> {
>> sh """
>> git clone -b master git@
>> .com:/repoName.git
>> cd repoName
>> 
>> """
>> }
>> }
>>  }
>>  }
>> }
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Jenkins Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to jenkinsci-use...@googlegroups.com.
>> To view this discussion on the web visit https://groups.google.com/d/ms
>> 

Re: Jenkins Pipelines defining steps and importing pipeline library library

2017-08-06 Thread Michael Pailloncy
In case of Shared Library classes definition, steps are not directly
callable (it's not the case for steps declared inside *vars* directory).

Can you can try something like :

*src/acme/jenkins/Utils.groovy*
package acme.jenkins

class Utils {
  static def getGradleBinPath(script, version) {
if (!version) {
throw new IllegalArgumentException('A Gradle version must be
provided')
}
script.tool(version).concat('/bin/gradle')
  }
}


*vars/runGradle.groovy*
import acme.jenkins.*

def call(body) {
def config = [:]

body.resolveStrategy = Closure.DELEGATE_FIRST
body.delegate = config
body()

sh "${Utils.getGradleBinPath(this, config.version)} ${config.cmd}"
}


See https://jenkins.io/doc/book/pipeline/shared-libraries/#accessing-steps
=> there is a similar example using Maven.

Moreover, you should also be interested by
https://issues.jenkins-ci.org/browse/JENKINS-44834 and
https://issues.jenkins-ci.org/browse/JENKINS-27393 :-)

Hopefully it helps.

Cheers


2017-08-02 15:29 GMT+02:00 Nicolae Vlădescu :

> Hello.
>
> I have the following issue with Jenkins 2.0
>
> My Jenkinsfile from repo X contains:
>
> @Library('acme-pipelines@dev')
>
> import acme.jenkins.*
>
> node {
> runGradle {
> version = '3.3'
> cmd = '--version'
> }
> }
>
>
>
> In repo Y (the pipeline library repo) i have `vars/runGradle.groovy`
> containing:
> import acme.jenkins.*
>
> def call(body) {
> def config = [:]
> def utils = new Utils()
>
> body.resolveStrategy = Closure.DELEGATE_FIRST
> body.delegate = config
> body()
>
> sh "${utils.getGradleBinPath(config.version)} ${config.cmd}"
> }
>
>
>
> Also in repo Y i have `src/acme/jenkins/Utils.groovy` containing:
> package acme.jenkins
>
> static String getGradleBinPath(String version = null) {
> if (!version) {
> throw new IllegalArgumentException('A Gradle version must be provided')
> }
> tool(version).concat('/bin/gradle')
> }
>
>
> When i run the pipeline i get this error:
>
> Running on master in /var/lib/jenkins/workspace/Jenkins Library 
> Development[Pipeline] {[Pipeline] }[Pipeline] // node[Pipeline] End of 
> Pipelinehudson.remoting.ProxyException: groovy.lang.MissingMethodException: 
> No signature of method: static softvision.jenkins.Utils.tool() is applicable 
> for argument types: (java.lang.String) values: [3.3]
> Possible solutions: wait(), run(), run(), find(), grep(), any()
>   at 
> groovy.lang.MetaClassImpl.invokeStaticMissingMethod(MetaClassImpl.java:1506)
>   at groovy.lang.MetaClassImpl.invokeStaticMethod(MetaClassImpl.java:1492)
>   at 
> org.codehaus.groovy.runtime.callsite.StaticMetaClassSite.call(StaticMetaClassSite.java:53)
>   at 
> org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
>   at 
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
>   at 
> com.cloudbees.groovy.cps.sandbox.DefaultInvoker.methodCall(DefaultInvoker.java:18)
>   at 
> softvision.jenkins.Utils.getGradleBinPath(file:/var/lib/jenkins/jobs/Jenkins%20Library%20Development/builds/89/libs/softvision-pipelines/src/softvision/jenkins/Utils.groovy:7)
>   at runGradle.call(/var/lib/jenkins/jobs/Jenkins Library 
> Development/builds/89/libs/softvision-pipelines/vars/runGradle.groovy:11)
>   at WorkflowScript.run(WorkflowScript:6)
>   at ___cps.transform___(Native Method)
>   at 
> com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:57)
>   at 
> com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:109)
>   at 
> com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:82)
>   at sun.reflect.GeneratedMethodAccessor273.invoke(Unknown Source)
>   at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.lang.reflect.Method.invoke(Method.java:498)
>   at 
> com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
>   at 
> com.cloudbees.groovy.cps.impl.LocalVariableBlock$LocalVariable.get(LocalVariableBlock.java:39)
>   at 
> com.cloudbees.groovy.cps.LValueBlock$GetAdapter.receive(LValueBlock.java:30)
>   at 
> com.cloudbees.groovy.cps.impl.LocalVariableBlock.evalLValue(LocalVariableBlock.java:28)
>   at 
> com.cloudbees.groovy.cps.LValueBlock$BlockImpl.eval(LValueBlock.java:55)
>   at com.cloudbees.groovy.cps.LValueBlock.eval(LValueBlock.java:16)
>   at com.cloudbees.groovy.cps.Next.step(Next.java:74)
>   at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:154)
>   at 
> org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$001(SandboxContinuable.java:18)
>   at 
> org.jenkinsci.plugins.workflow.cps.SandboxContinuable$1.call(SandboxContinuable.java:33)
>   at 
> 

Re: Help with NotSerializableException in pipeline

2017-08-06 Thread Michael Pailloncy
It seems like there are some variables used out of their scope and some
misused Groovy methods.

Here is a working version, IIUC your pipeline :-)

#!groovy

def behatList =['AutoSuiteSet_0', 'AutoSuiteSet_1', 'AutoSuiteSet_2',
'AutoSuiteSet_3', 'AutoSuiteSet_4', 'AutoSuiteSet_5']
def suitesStat=[AutoSuiteSet_0:0, AutoSuiteSet_1:1, AutoSuiteSet_2:2,
AutoSuiteSet_3:3, AutoSuiteSet_4:4, AutoSuiteSet_5:5]

stage("test") {
node('master') {
behatList2=sortSuites(behatList, suitesStat)
echo "SUITES2=${behatList2}"
}
}

@NonCPS
def sortSuites(suites, suites_time){
def timeLimit = suites_time.values().max()
def suitesMap= [:]
for(s in suites){
def x = suites_time.find{ artifact -> artifact.key == s}
if(x){
suitesMap.put(x.key, x.value)
}else{
suitesMap.put(s, timeLimit)
}
}
def tasks = [suitesMap]
timeLimit = suitesMap.values().max()
while(canSplit(tasks, timeLimit)) {
tasks = tasks.collect { t ->
if(checkLimit(t, timeLimit)){
t = splitTo2(t)
}
t
}.flatten()
}
tasks.sort { a, b -> b.values().sum() <=> a.values().sum() }
// tasks = tasks.collect { t -> t.keySet()} // not working, multiple
elements are collected here
tasks = tasks.collectMany { t -> t.keySet()}
return tasks
}


@NonCPS
def checkLimit(t, timeLimit) {
if(t.values().sum()>timeLimit && t.size()>1){
return true
}else{
return false
}
}

@NonCPS
def canSplit(tasks, timeLimit) {
  for(t in tasks) {
  if(checkLimit(t, timeLimit)){
  return true
  }
  }
  return false
}


@NonCPS
def splitTo2(int_map) {
A=[:]
B=[:]

// int_map.sort{it.value} not working
// for(n in int_map.sort{it.value}) {
for(n in int_map) {
if (A.size() < B.size()) {
A.put(n.key, n.value)
}else{
B.put(n.key, n.value)
}
}
return [A, B]
}


However, what do you want to achieve exactly ? One of the main advantage of
Pipeline is its resumability after restart. But if you use too many
@NonCPS, you avoid this feature and this could lead to unexpected behaviour
sometimes.

Hopefully it helps :-)


2017-08-04 19:17 GMT+02:00 Slava Dubrovskiy :

> Hi.
>
> I use a special algorithm to pre-sort the steps for parallel start.
> Here is my test pipeline:
>
> #!groovy
>
> def behatList =['AutoSuiteSet_0', 'AutoSuiteSet_1', 'AutoSuiteSet_2',
> 'AutoSuiteSet_3', 'AutoSuiteSet_4', 'AutoSuiteSet_5']
> def suitesStat=[AutoSuiteSet_0:0, AutoSuiteSet_1:1, AutoSuiteSet_2:2,
> AutoSuiteSet_3:3, AutoSuiteSet_4:4, AutoSuiteSet_5:5]
>
> stage("test") {
> node('master') {
> behatList2=sortSuites(behatList, suitesStat)
> echo "SUITES2=${behatList2}"
> }
> }
>
> @NonCPS
> def sortSuites(suites, suites_time){
> timeLimit = suites_time.values().max()
> def suitesMap= [:]
> for(s in suites){
> x=suites_time.find{ artifact -> artifact.key == s}
> if(x){
> suitesMap.put(x.key, x.value)
> }else{
> suitesMap.put(s, timeLimit)
> }
> }
> tasks = [suitesMap]
> timeLimit = suitesMap.values().max()
> while(canSplit()) {
> tasks = tasks.collect { t ->
> if(checkLimit(t)){
> t = splitTo2(t)
> }
> t
> }.flatten()
> }
> tasks.sort { a, b -> b.values().sum() <=> a.values().sum() }
> tasks = tasks.collect { t -> t.keySet()}
> return tasks
> }
>
>
> @NonCPS
> def checkLimit(t) {
> if(t.values().sum()>timeLimit && t.size()>1){
> return true
> }else{
> return false
> }
> }
>
> @NonCPS
> def canSplit() {
>   for(t in tasks) {
>   if(checkLimit(t)){
>   return true
>   }
>   }
>   return false
> }
>
>
> @NonCPS
> def splitTo2(int_map) {
> A=[:]
> B=[:]
> for(n in int_map.sort{it.value}) {
> if (A.size() < B.size()) {
> A.put(n.key, n.value)
> }else{
> B.put(n.key, n.value)
> }
> }
> return [A, B]
> }
>
>
>
> If I run it, I get the error:
> an exception which occurred:
>  in field delegate
>  in field closures
>  in object org.jenkinsci.plugins.workflow.cps.CpsThreadGroup@7fd2cde1
> Caused: java.io.NotSerializableException: java.util.LinkedHashMap$Entry
>  at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(Ri
> verMarshaller.java:860)
>  at org.jboss.marshalling.river.BlockMarshaller.doWriteObject(Bl
> ockMarshaller.java:65)
>  at org.jboss.marshalling.river.BlockMarshaller.writeObject(Bloc
> kMarshaller.java:56)
>  at org.jboss.marshalling.MarshallerObjectOutputStream.writeObjectOverride
> (MarshallerObjectOu
> ...
>
> Please, help me what is wrong?
> All methods under @NonCPS directive.
>
> --
> WBR,
> Slava.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins 

Re: rsync failed: ssh_askpass: exec(/usr/bin/ssh-askpass): No such file or directory

2017-08-06 Thread Michael Pailloncy
Ok, if I refer to logs above, you want to copy files from *icsl7024* machine
to *cg-sv-h118* workspace. Right ?
My question was not very clear, but I would like to know how do you provide
credentials between *cg-sv-h118 *and *i**csl7024* machines ?

Can you please also confirm that outside of Jenkins, you are able to
connect from *cg-sv-h118 *to *icsl7024 *through SSH (without password) ?
Can you also check if */home/${USER}/.ssh/* directory and
*/home/${USER}/.ssh/authorized_keys* file have the correct file permissions
(respectively 700 and 644) on both machines ?

Michaël


2017-08-06 13:31 GMT+02:00 Shiran <shiranho...@gmail.com>:

> Hi,
>
> I'm connecting to this node via ssh , and I have the host and credentials
> configured in the node's configuration in Jenkins.
> The same rsync command is working just fine when I'm doing it outside
> Jenkins.
>
>
> On Sunday, August 6, 2017 at 10:53:41 AM UTC+3, mpapo - Michael Pailloncy
> wrote:
>>
>> ssh is asking for the password or a passphrase if the key is invalid.
>> Is-there a passphrase configured for this key ? Have you tried to connect
>> directly using ssh from this machine to the target one ?
>> BTW, how do you provide credentials ?
>>
>> 2017-08-06 9:28 GMT+02:00 Shiran <shira...@gmail.com>:
>>
>>> Hi,
>>>
>>> I'm copying files from one machine to another (to *cg-sv-h118* in the
>>> log below) using rsync command.
>>> Important to say that this command is working as expected in other
>>> machines I use (all have the same setup)
>>> Can you help me understand the yellow errors below?
>>> Thanks!
>>>
>>> *Log:*
>>>
>>> *22:22:15* Building remotely on *cg-sv-h118* in workspace 
>>> /local/jenkins_ws/workspace/open_val*22:22:15* [open_val] $ /bin/bash 
>>> /tmp/hudson8936548899971970339.sh
>>> *22:22:15* Starting to rsync files from parent workspace: 
>>> icsl7024:/tmp/jenkins_ws/workspace/post_trigger*22:22:15* 
>>> *22:22:15* Use of this 
>>> system by unauthorized persons or   *22:22:15* in an unauthorized manner is 
>>> strictly prohibited*22:22:15* 
>>> *22:22:15* ssh_askpass: 
>>> exec(/usr/bin/ssh-askpass): No such file or directory*22:22:16* 
>>> ssh_askpass: exec(/usr/bin/ssh-askpass): No such file or 
>>> directory*22:22:17* ssh_askpass: exec(/usr/bin/ssh-askpass): No such file 
>>> or directory*22:22:17* Permission denied 
>>> (gssapi-with-mic,publickey).*22:22:17* rsync: connection unexpectedly 
>>> closed (0 bytes received so far) [Receiver]*22:22:17* rsync error: 
>>> unexplained error (code 255) at io.c(226) [Receiver=3.1.1]
>>>
>>>
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Jenkins Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to jenkinsci-use...@googlegroups.com.
>>> To view this discussion on the web visit https://groups.google.com/d/ms
>>> gid/jenkinsci-users/1b65beed-2e2e-4d4d-b0ee-9c5c0ddaf125%
>>> 40googlegroups.com
>>> <https://groups.google.com/d/msgid/jenkinsci-users/1b65beed-2e2e-4d4d-b0ee-9c5c0ddaf125%40googlegroups.com?utm_medium=email_source=footer>
>>> .
>>> 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/f21add86-7c1d-4e27-901c-75161cd4864c%40googlegroups.
> com
> <https://groups.google.com/d/msgid/jenkinsci-users/f21add86-7c1d-4e27-901c-75161cd4864c%40googlegroups.com?utm_medium=email_source=footer>
> .
>
> 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/CAPO77c0SNgV-3axFfS9vNFUmuTQtT4_WffUc1H41L-oCTmtZ9w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins Centralized Job Monitoring

2017-08-06 Thread Michael Pailloncy
I'm wondering why are you not considering Jenkins agents for now ?
Usually, there is a Jenkins master which schedules and monitors job
execution, and agents on which the build is executed. Through Jenkins UI,
you can then get the build result/logs and know which was the agent used
for the build.

2017-08-04 16:59 GMT+02:00 Pradeep Patra :

> Hi all,
>
> I am looking for a Jenkins job monitoring application/tool which can
> monitor the Jobs from a centralized server. For example I have multiple
> Jenkins servers (1-5) behind a load balancer and the Jenkins jobs can be
> scheduled in any of the servers. I want to know which server the build is
> being executed from a centralized server/location(Not considering Jenkins
> slaves for now). Is it possible? If yes can let me know if we can achieve
> this in some way?
>
> Regards
> Pradeep
>
> --
> 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/4edf1d37-8a7d-48d7-bbc1-9bec3f93a105%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/CAPO77c1qsAH5kqh%3DTwO3sx-4OD49hF86YWtH2oomQV7k4LeOrg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: rsync failed: ssh_askpass: exec(/usr/bin/ssh-askpass): No such file or directory

2017-08-06 Thread Michael Pailloncy
ssh is asking for the password or a passphrase if the key is invalid.
Is-there a passphrase configured for this key ? Have you tried to connect
directly using ssh from this machine to the target one ?
BTW, how do you provide credentials ?

2017-08-06 9:28 GMT+02:00 Shiran :

> Hi,
>
> I'm copying files from one machine to another (to *cg-sv-h118* in the log
> below) using rsync command.
> Important to say that this command is working as expected in other
> machines I use (all have the same setup)
> Can you help me understand the yellow errors below?
> Thanks!
>
> *Log:*
>
> *22:22:15* Building remotely on *cg-sv-h118* in workspace 
> /local/jenkins_ws/workspace/open_val*22:22:15* [open_val] $ /bin/bash 
> /tmp/hudson8936548899971970339.sh
> *22:22:15* Starting to rsync files from parent workspace: 
> icsl7024:/tmp/jenkins_ws/workspace/post_trigger*22:22:15* 
> *22:22:15* Use of this system 
> by unauthorized persons or   *22:22:15* in an unauthorized manner is strictly 
> prohibited*22:22:15* 
> *22:22:15* ssh_askpass: 
> exec(/usr/bin/ssh-askpass): No such file or directory*22:22:16* ssh_askpass: 
> exec(/usr/bin/ssh-askpass): No such file or directory*22:22:17* ssh_askpass: 
> exec(/usr/bin/ssh-askpass): No such file or directory*22:22:17* Permission 
> denied (gssapi-with-mic,publickey).*22:22:17* rsync: connection unexpectedly 
> closed (0 bytes received so far) [Receiver]*22:22:17* rsync error: 
> unexplained error (code 255) at io.c(226) [Receiver=3.1.1]
>
>
>
> --
> 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/1b65beed-2e2e-4d4d-b0ee-9c5c0ddaf125%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/CAPO77c2YwYCLhPKKNH%3DPqDSr3XYDHW%3DfBdvF9KMKLNYSpM2WyA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Remote Access API - REST API in Jenkins

2017-07-31 Thread Michael Pailloncy
The "mode" parameter is expected here since you are triggering a job copy
instead of a job creation (it's the same API endpoint, it differs only with
the number/kind of parameters).

To trigger a job creation, you need something like :

curl -v -XPOST 'http://
:/createItem?name=bimbilimbimbim' --data-binary
@config.xml -H "Content-Type:text/xml" --user :

With *config.xml *is a local file containing your new job configuration.

You can go to http://${JENKINS_IP}:${JENKINS_PORT}/api  with your browser
to have documentation about that (*Create Job* and *Copy Job*).

Hopefully it helps.


2017-07-31 3:44 GMT+02:00 Pradeep Patra <smilesonisa...@gmail.com>:

>
>
> On Monday, July 31, 2017 at 7:21:08 AM UTC+8, mpapo - Michael Pailloncy
> wrote:
>>
>>
>>> I tried it and it is asking for mode? I am not sure what is the mode I
>>> should provide for creating new job. I tried passing  mode=create and it
>>> did not work.
>>>
>>
>> Can you share the command line which you've tried please ?
>>
>
> I planned to first try in GUI: http://:8080/
> createItem?name=testjob it gave me error that please specify a valid
> mode. Then I changed it to name=testjob & mode=create but it still did not
> work.
>
> curl -v -X POST http://:@:8080/
> createItem?name=newjob  –user : --data-urlencode
> json='{"parameter": [{"name":"id", "value":"123"}, {"name":"verbosity",
> "value":"high"}]}'
>
> Can you please help here in this regard?
>
>>
>>
>>>
>>>> However, what do you mean by "for creating jobs based on a specific
>>>> build" ?
>>>>
>>>
>>> I mean the new job should "execute shell" to package local packages. I
>>> guess that I can achieve with the buildWithParameters and by passing the
>>> command. If  you have any example could you please let me know.
>>>
>>
>> You can find an example of a build trigger with parameters from command
>> line here
>> <https://wiki.jenkins.io/display/jenkins/remote+access+api#RemoteaccessAPI-Submittingjobs>
>> .
>>
>> --
> 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/c8f8ba34-8af7-4a5a-8de6-b98f88b821c1%40googlegroups.
> com
> <https://groups.google.com/d/msgid/jenkinsci-users/c8f8ba34-8af7-4a5a-8de6-b98f88b821c1%40googlegroups.com?utm_medium=email_source=footer>
> .
>
> 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/CAPO77c0JdJ7V23KH9saGzV8MYikEPz_%2BDcU%2BOKdJo7U6aVyRZA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Remote Access API - REST API in Jenkins

2017-07-30 Thread Michael Pailloncy
>
>
> I tried it and it is asking for mode? I am not sure what is the mode I
> should provide for creating new job. I tried passing  mode=create and it
> did not work.
>

Can you share the command line which you've tried please ?


>
>> However, what do you mean by "for creating jobs based on a specific
>> build" ?
>>
>
> I mean the new job should "execute shell" to package local packages. I
> guess that I can achieve with the buildWithParameters and by passing the
> command. If  you have any example could you please let me know.
>

You can find an example of a build trigger with parameters from command
line here

.

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


Re: The official docker image jenkins/jenkins:lts is missing ruby

2017-07-28 Thread Michael Pailloncy
+1 IMHO even if it's required maintenance, it would be a good idea to
create and maintain your own image and store it on an internal
repository for many reasons (lower coupling between your builds and the
parent image, build reproducibility, better performance, and so on).

2017-07-27 21:12 GMT+02:00 Jacob Larsen :

> I agree. Extending the base image is the way to go. Alternatively, you can
> use a clean image for the master and set up slaves with ruby, labeled
> appropriately.
>
> /Jacob
>
> On 2017-07-27 16:02, Mark Waite wrote:
>
> I would be very surprised if the Jenkins docker image were extended to
> include ruby.  Ruby is not a mandatory requirement for Jenkins development
> and adding it to the base Jenkins Docker image will increase the size of
> the docker image for all Jenkins users.
>
> Mark Waite
>
> On Thu, Jul 27, 2017 at 3:33 AM Federico Paolantoni <
> federico.paolant...@gmail.com> wrote:
>
>> Dear list,
>> I'm setting up a software development lifecycle infrastructure.
>> I decided to use the official docker container provided by Jenkins
>> community and the idea is not to extend it writing my own image avoiding
>> the amount of work required to maintain an image and to keep as standard as
>> possible.
>> But:
>> I noticed that ruby is not provided with the container, so i wonder if
>> the community is considering to add it on the official supported image,
>> considering that there is no way to inject ruby, rake an gems inside the
>> builds as done for nodejs,
>>
>> Thank you
>>
>>
>> --
>> 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/29e93174-df1e-4d7f-a36c-
>> e47780fc7d77%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/CAO49JtEsoZw5kcnrv750wFn6BbOWO
> 5_8vH5ZcDOsHmc9B-7usg%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/e61bcd3c-6ef6-f141-d92f-5321f6bf74fe%40larsen.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/CAPO77c1xevreoBptRDozyUVzinUxy3qsuaAPxXsTFhOvUxdFNw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Remote Access API - REST API in Jenkins

2017-07-28 Thread Michael Pailloncy
Remote Access API is available directly, without need to install any plugin.
By accessing *http://${YOUR_JENKINS}/api* url, you should be able to see a
page listing different ways to interact with it (see "Create Job").

You have also a full example here
 using *curl* to create a
new job based on XML with or without folder.

However, what do you mean by "for creating jobs based on a specific build" ?

2017-07-28 8:03 GMT+02:00 Pradeep Patra :

> Hi all,
>
> I am using Jenkins 2.71 trying to use Remote Access API plugin for
> creating jobs outside the Jenkins. I was referring to the  below plugin.
> https://wiki.jenkins.io/display/jenkins/remote+access+api
>
> When I search in Manage Plugins I could not find any plugin with this
> name? I have got Remote Terminal access plugin. How can I install this
> plugin. Does it have separate hpi?
> I was trying to find a suitable example for creating job based on xml/JSON
> for creating jobs based on a specific build?
>
> Regards
> Pradeep
>
> --
> 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/02ea4100-29b8-4d08-88ea-1b920e84eff5%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/CAPO77c1a_FBz_d2q1mZdC7Me%2BfUbwMf%2BQeohXbpMTCQn4_6H4w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Tracking build failure in the custom pipeline wrapper step

2017-07-19 Thread Michael Pailloncy
Hello, I think this question is more related to the
jenkinsci-...@googlegroups.com mailing list instead of this one. You'll
have better chance of result IMHO :-)

2017-07-19 10:18 GMT+02:00 Artyom Melnikov :

> Hello. I am trying to create my own pipeline step plugin. What i want to
> achieve is:
> node {
> mystep (var: ...) {
> ...
> sh "gradle clean build"
> ...
> }
> }
>
> The key point here: i need to track the status of the inner steps (gradle
> build in this case) and execute some code based on the result. Currently i
> extended SimpleBuildWrapper and set Disposer:
> context.setDisposer(new Disposer() {
> @Override
> public void tearDown(Run build, FilePath workspace, Launcher
> launcher, TaskListener listener)
> throws IOException, InterruptedException {
> ...
> }
> });
>
> But the issue here: i have no idea how to track inner steps result here.
> When disposer code executed build status is still 'RUNNING', even though
> gradle build finished with exception.
>
> Is there any way to track inner step's result at the end of my wrapper
> step?
>
> --
> 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/8f8e59ac-2d0e-4391-a4a8-1196ab973639%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/CAPO77c2p2J0qQ9FVH7ENUwx5CG%3Dd75LtXxu5OvYGeKMD0n%2Bh%2BA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Pipeline] Mark single step/script as UNSTABLE

2017-07-19 Thread Michael Pailloncy
To my knowledge, it's not possible to change the result of a single step.
However, you can check the result code of your script and then set the
result of the entire pipeline to UNSTABLE using *returnStatus* parameter,
available for *sh*, *powershell* and *bat* steps
.

Alternatively, it's planned to have the ability to change the status of a
single stage : see JENKINS-26522

The scope of this issue is wider than your need though, but it's in
progress :-)


2017-07-19 15:42 GMT+02:00 Breitbach, Steffen :

> Hi everyone!
>
>
>
> Is there a way to mark a single step (or script) in a declarative Jenkins
> pipeline as "UNSTABLE"?
>
>
>
> I know how to mark the entire pipeline as UNSTABLE and how to mark a
> single step as FAILED instead of STABLE, but that's not what I need.
>
>
>
> Something like "currentStep.result = 'UNSTABLE'" would be handy.
>
>
>
> I haven't found something yet, assuming there isn't a solution for this,
> but I thought I'll give it a shot and try asking here...
>
>
>
> Best regards
>
>   Steffen
>
>
>
> --
> 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/5E63738AB9896844AF1601A1D09467
> 7317A6BF6B%40SMBXKO2.cgm.ag
> 
> .
> 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/CAPO77c2nbzM_gK9tO3oiiRyhNJdi%2BpdGGPNr-2EFNmWwPxuMjg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: throttle() in declarative pipelines

2017-07-19 Thread Michael Pailloncy
Regarding the associated documentation
,
*throttle* is defined as a *step* and since you are using the declarative
way, have you tried something like :


pipeline {
agent any
stages {
stage('My throttled build') {
steps {
throttle(['THROTTLE1']) {
node {
sh "sleep 500"
echo "Done"
}
}
}
}
}
}


Hope this helps.


2017-07-19 9:36 GMT+02:00 Jochen Hinrichsen 
:

> Has anyone used the 'Throttle Concurrent Builds Plugin' in a declarative
> pipeline?
>
> From what i understand, throttle() will throttle nodes, which are optional
> in a dp:
>
> pipeline {
> agent any
> }
>
> When introducing an explicit node
>
> pipeline {
> throttle(['THROTTLE1']) {
> node {
> }
> }
> }
>
> Jenkins complains 'WorkflowScript: 3: Invalid agent type "throttle"
> specified. Must be one of [docker, dockerfile, label, any, None]'
>
> Thoughts?
>
> --
> 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/ed4879df-b386-4370-bc57-ae679ab5db2a%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/CAPO77c0KmGbmmu4m18b6cuJSx4z0S%2BDpZU6m-yiWWcu2RzGrsA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins Distributed Builds: Restricting users from configuring jobs with Jenkins Master's executors

2017-07-11 Thread Michael Pailloncy
By default, the master is configured with "Use this node as much as
possible" : http://${JENKINS_URL}/computer/(master)/configure
You can change this behavior with "Only build jobs with label expressions
matching this node". In this way, the master can only be used if an
explicit allocation (using 'master' label) is done.

No sure that it's an ideal solution in your case, since team member can
still force the execution on master, but it can prevent accidental/unwanted
execution and it's anyway a good idea to avoid build on master.

There is also this plugin :
https://wiki.jenkins.io/display/JENKINS/Job+Restrictions+Plugin
Seems to fit your needs, but personally not tested.

Hope it helps.


2017-07-11 20:41 GMT+02:00 Jason LeMauk :

> I currently have a distributed build system in place (1 Jenkins master and
> several Jenkins Agents). I have an automated backup / backup cleanup job
> that runs on Jenkins Master. For this reason I need to keep my executors on
> the Jenkins Master. The rest of my jobs run on specific Jenkins Agents.
>
> As I cannot remove my executors from the Jenkins Master, what is the best
> way to ensure that no other jobs can be built on Jenkins Master? I am using
> project-based authorization strategy, and I don’t want a team member who
> may configure a job selecting the Jenkins Master to build on.
>
> What is the best way to go about achieving this?
>
> Thanks in advance for any guidance and advice!
>
> --
> 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/BY2PR12MB059992ED76D9D6B99481D
> D7F89AE0%40BY2PR12MB0599.namprd12.prod.outlook.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/CAPO77c2zEbVbJh6D8L1rZCNZ4sa%3Dz9cDFwjr4DEYc8fmTXk2tQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Build time trend - Pipeline

2017-07-11 Thread Michael Pailloncy
Pipeline jobs are not limited to a specific agent, that's why this
information is not displayed on the build time trend page.

But as usual you are able to see on which agent a particular step has been
executed on the build logs (Running on ... in /var/lib/jenkins/...), or by
navigating to the buid page > Pipeline Steps > and then find the console
output associated with "Allocate node : Start  ..." step.

2017-07-11 22:17 GMT+02:00 Esdras Neto :

> Good afternoon,
>
> I am new to use Pipeline jobs, I would appreciate if someone could point
> me towards the right direction here.
>
>
> On the build time trend for my pipeline job I don's see the Agent
> information, any ideas why this is happening? I only see the columns
> "Build" and "Duration".
>
> Thanks!
> Esdras
>
> --
> 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/b691fb8e-b450-49b7-92c9-f1eaa0a87f97%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/CAPO77c1rM2sf5-fkmGeS60JPPEK2o-1XqJ-ew6ZebafdBHgDnQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Can I use the multibranch pipeline plugin that interacts with a user at a stage

2017-07-11 Thread Michael Pailloncy
The "*agent any*" declaration at the top level of your pipeline indeed
allocates an executor for the whole pipeline.
You can avoid this allocation with something like :

pipeline {
agent none
parameters {
choice(choices: 'SIT\nUAT', description: 'What environment?', name:
'environment')
}
stages {
stage ('build') {
agent any
tools {
maven 'm3'
}
steps {
echo 'build it.'
sh "mvn --version"
}
}
stage ('test') {
steps {
echo 'test it.'
input 'Ready to go?'
}
}
stage('deploy to sit') {
steps {
echo 'push it to dev.'
}
}
stage("deploy to uat") {
steps {
echo 'push it to uat.'
}
}
}
}

Or instead of *tools* section, you may prefer the *withMaven* syntax :

...
stage ('build') {
agent any
steps {
echo 'build it.'
withMaven(maven: 'm3') {
sh "mvn --version"
}
}
}
...

See https://wiki.jenkins.io/display/JENKINS/Pipeline+Maven+Plugin


2017-07-04 11:56 GMT+02:00 paul b <pblake...@gmail.com>:

> Yeah.  Thats right.  Not tied to using that though.  Not sure why I need
> to push to using it yet though.
>
> pipeline {
> agent any
> parameters {
> choice(choices: 'SIT\nUAT', description: 'What environment?',
> name: 'environment')
> }
> tools {
> maven 'maven 3.3.9'
> //jdk 'jdk8'
> }
> stages {
> stage ('build') {
> steps {
> echo 'build it.'
> }
> }
> stage ('test') {
> steps {
> echo 'test it.'
> input 'Ready to go?'
> }
> }
> stage('deploy to sit') {
> steps {
> echo 'push it to dev.'
> }
> }
> stage("deploy to uat") {
>         steps {
> echo 'push it to uat.'
> }
> }
> }
> }
>
> On Tuesday, 4 July 2017 10:41:27 UTC+1, mpapo - Michael Pailloncy wrote:
>>
>> It seems like you are using the Declarative way to write your pipeline
>> right ? Can you share the full script please. I guess that you are
>> allocating an agent at the top level.
>>
>> 2017-07-04 11:06 GMT+02:00 paul b <pbla...@gmail.com>:
>>
>>> Brill.  I have managed to get that to work. I have the following stage
>>>
>>>stage ('test') {
>>> steps {
>>> echo 'test it.'
>>> input 'Ready to go?'
>>> }
>>> }
>>>
>>> The problem we have now is that the build consumes one of the
>>> executors.  I guess I can farm that off somehow???
>>>
>>> On Tuesday, 4 July 2017 09:34:51 UTC+1, paul b wrote:
>>>>
>>>> Brill.  Thanks. I will look into it.
>>>>
>>>> On Tuesday, 4 July 2017 08:59:13 UTC+1, mpapo - Michael Pailloncy wrote:
>>>>>
>>>>> Yeah, seems like you want to use the *input* step (interaction
>>>>> through Jenkins) : https://jenkins.io/doc/pipel
>>>>> ine/steps/pipeline-input-step/
>>>>> You can find a simple example here with some explanations :
>>>>> https://github.com/jenkinsci/pipeline-plugin/blob/master/
>>>>> TUTORIAL.md#pausing-flyweight-vs-heavyweight-executors
>>>>>
>>>>> 2017-07-04 9:49 GMT+02:00 paul b <pbla...@gmail.com>:
>>>>>
>>>>>> I would like to use the multibranch pipeline plugin and wondered if
>>>>>> it can be configured such that when it gets to a stage, lets says 
>>>>>> deploying
>>>>>> to environment, it then interacts with a user.  That interaction being a
>>>>>> through the jenkins, email or even jira!  Then after the user interaction
>>>>>> response, I would expect it to push it onto the next stage!  Then 
>>>>>> possibly
>>>>>> with further interactions at further stages.  Not sure if the plugin has
>>>>>> this capability or even if it is good practice???
>>>>>>
>>>>>> Furthermore I would expect, when the branch is paused at a stage, I
>>>>>> would expect that further branches can be pushed on too!
>>>>>>
>>>>>> Hope all this makes sense.
>>>>>>
>>>>>> --
>>>>>> You received this message because you are subscribed to the Google
>>>>

Re: Can I use the multibranch pipeline plugin that interacts with a user at a stage

2017-07-04 Thread Michael Pailloncy
It seems like you are using the Declarative way to write your pipeline
right ? Can you share the full script please. I guess that you are
allocating an agent at the top level.

2017-07-04 11:06 GMT+02:00 paul b <pblake...@gmail.com>:

> Brill.  I have managed to get that to work. I have the following stage
>
>stage ('test') {
> steps {
> echo 'test it.'
> input 'Ready to go?'
> }
> }
>
> The problem we have now is that the build consumes one of the executors.
> I guess I can farm that off somehow???
>
> On Tuesday, 4 July 2017 09:34:51 UTC+1, paul b wrote:
>>
>> Brill.  Thanks. I will look into it.
>>
>> On Tuesday, 4 July 2017 08:59:13 UTC+1, mpapo - Michael Pailloncy wrote:
>>>
>>> Yeah, seems like you want to use the *input* step (interaction through
>>> Jenkins) : https://jenkins.io/doc/pipeline/steps/pipeline-input-step/
>>> You can find a simple example here with some explanations :
>>> https://github.com/jenkinsci/pipeline-plugin/blob/master/
>>> TUTORIAL.md#pausing-flyweight-vs-heavyweight-executors
>>>
>>> 2017-07-04 9:49 GMT+02:00 paul b <pbla...@gmail.com>:
>>>
>>>> I would like to use the multibranch pipeline plugin and wondered if it
>>>> can be configured such that when it gets to a stage, lets says deploying to
>>>> environment, it then interacts with a user.  That interaction being a
>>>> through the jenkins, email or even jira!  Then after the user interaction
>>>> response, I would expect it to push it onto the next stage!  Then possibly
>>>> with further interactions at further stages.  Not sure if the plugin has
>>>> this capability or even if it is good practice???
>>>>
>>>> Furthermore I would expect, when the branch is paused at a stage, I
>>>> would expect that further branches can be pushed on too!
>>>>
>>>> Hope all this makes sense.
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Jenkins Users" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to jenkinsci-use...@googlegroups.com.
>>>> To view this discussion on the web visit https://groups.google.com/d/ms
>>>> gid/jenkinsci-users/1ad0acac-8a06-4ea8-84a0-d0de30c112b4%
>>>> 40googlegroups.com
>>>> <https://groups.google.com/d/msgid/jenkinsci-users/1ad0acac-8a06-4ea8-84a0-d0de30c112b4%40googlegroups.com?utm_medium=email_source=footer>
>>>> .
>>>> 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/718db123-8f74-4fa7-a812-0736f0026965%40googlegroups.
> com
> <https://groups.google.com/d/msgid/jenkinsci-users/718db123-8f74-4fa7-a812-0736f0026965%40googlegroups.com?utm_medium=email_source=footer>
> .
>
> 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/CAPO77c2yad2TjJ3x06qWhY4JNUedWXX%3D1--Rs8xugPP7dXiEEQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Can I use the multibranch pipeline plugin that interacts with a user at a stage

2017-07-04 Thread Michael Pailloncy
Yeah, seems like you want to use the *input* step (interaction through
Jenkins) : https://jenkins.io/doc/pipeline/steps/pipeline-input-step/
You can find a simple example here with some explanations :
https://github.com/jenkinsci/pipeline-plugin/blob/master/TUTORIAL.md#pausing-flyweight-vs-heavyweight-executors

2017-07-04 9:49 GMT+02:00 paul b :

> I would like to use the multibranch pipeline plugin and wondered if it can
> be configured such that when it gets to a stage, lets says deploying to
> environment, it then interacts with a user.  That interaction being a
> through the jenkins, email or even jira!  Then after the user interaction
> response, I would expect it to push it onto the next stage!  Then possibly
> with further interactions at further stages.  Not sure if the plugin has
> this capability or even if it is good practice???
>
> Furthermore I would expect, when the branch is paused at a stage, I would
> expect that further branches can be pushed on too!
>
> Hope all this makes sense.
>
> --
> 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/1ad0acac-8a06-4ea8-84a0-d0de30c112b4%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/CAPO77c3o%2B6-VEJ4ErxTRRYRDYHztReEhgNAOdL-Gz%3DKxE1ur%2BA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [blueocean] multi-platform builds with multi-stage completely parallel tracks

2017-07-03 Thread Michael Pailloncy
As far as I know, *stage* blocks inside parallel tasks are deprecated =>
see
https://github.com/jenkinsci/pipeline-examples/blob/master/docs/BEST_PRACTICES.md#parallelism

Have you tried something like :


stage ("Setup") {
parallel (
'xenial': {
node("xenial") {
   sh 'echo xenial setup'
}
},
'trusty': {
node("trusty") {
   sh 'echo trusty setup'
}
}
)
}
stage ("Build") {
parallel (
'xenial': {
node("xenial") {
   sh 'echo xenial build'
}
},
'trusty': {
node("trusty") {
   sh 'echo trusty build'
}
}
)
}

IIUC, this pipeline should do what you want.

If not, have you tried to create your pipeline with BlueOcean Pipeline
Editor Plugin ?


2017-07-03 12:50 GMT+02:00 Leandro Lucarella <
leandro.lucare...@sociomantic.com>:

> Hi, I'm trying to build a pipeline that in principle it sounds like it
> should be very simple. I basically have a project that I want to build
> and test for Ubuntu trusty and xenial. So basically I want to run them
> in separate nodes (which will use Docker).
>
> I want to visualize this in blueocean like this:
>
>   CheckoutBuild TestDeploy
>
>  O--OOO
>   trusty trusty   trusty   trusty
>
>  O--OOO
>   xenial xenial   xenial   xenial
>
> But I can't nail it. TL;DR, is there any way to achieve this? If yes,
> how? If not, is it planned? If yes, any ETAs?
>
> Things that I tried:
>
> I can run 2 "jobs" in different nodes completely in parallel, but then
> stages inside the nodes are not visualized:
>
> parallel(
> 'xenial': {
> node {
> stage("Setup") {
> sh 'echo xenial setup'
> }
> stage("Build") {
> sh 'echo xenial build'
> }
> }
> },
> 'trusty': {
> node {
> stage("Setup") {
> sh 'echo trusty setup'
> }
> stage("Build") {
> sh 'echo trusty build'
>  }
> }
> }
> )
>
> This shows:
>
> Parallel
>
> O
>   xenial
>
> O
>   trusty
>
> If I add top-level stages outside of the node{}, then I get a closer
> visualization, but then both track don't run completely in parallel:
>
> stage ("Setup") {
> parallel (
> 'xenial': {
> node {
> stage("Run") {
> sh 'echo xenial setup'
> }
> }
> },
> 'trusty': {
> node {
> stage("Run") {
> sh 'echo trusty setup'
> }
> }
> }
> )
> }
> stage ("Build") {
> parallel (
> 'xenial': {
> node {
> stage("Run") {
> sh 'echo xenial build'
> }
> }
> },
> 'trusty': {
> node {
> stage("Setup") {
> sh 'echo trusty build'
> }
> }
> }
> )
> }
>
> And on top of not being really parallel, the synchronization points are
> shown in the visualization (which makes sense if there are
> synchronization points:
>
>   Checkout Build   Test  Deploy
>  O-.--.--O-.-.--O-.-.--O
>   trusty   | |trusty   | |   trusty   | |   trusty
>| | | || |
>  O´   `-O-´   `-O-´ `--O
>   xenial xenial  xenial xenial
>
>
> So, questions again for the people that read this far :)
> Is there any way to achieve this? If yes, how? If not, is it planned?
> If yes, any ETAs?
>
>
> Thanks a lot!
>
> --
> Leandro Lucarella
> Technical Development Lead
> Sociomantic Labs GmbH 
>
> --
> 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/20170703125023.20deb51c%40labs-064.localdomain.
> 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/CAPO77c3pHrO9pQYTrkLtCjh40Yrb7bBntY7zP%3DJQxiUqzFqeZg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: parameterised build which can set multiple values/variables from a choice

2017-07-03 Thread Michael Pailloncy
Yeah, that's the main disadvantage. But as I mentioned, you can avoid this
constraint with tools like Jenkins Pipeline, Job DSL Plugin or Job Builder.

2017-07-03 9:45 GMT+02:00 paul b <pblake...@gmail.com>:

> Ok.  I get what you're saying but that would mean me creating a job for
> each environment(4 environments).  Then with the 20 jobs for all the
> components that would work out to be 80 jobs! Which seems excessive.
>
> On Sunday, 2 July 2017 13:49:15 UTC+1, mpapo - Michael Pailloncy wrote:
>>
>> Ok.
>> IMHO, It would be better to avoid too much complexity in your job
>> configuration. Personally, I would create one job per use case : each one
>> with default parameters value targeting each environment type
>> (dev/uat/prod/...).
>> In this way, you will have a simple job configuration (easily
>> maintainable), but also a clear and distinct build history for each
>> environment type.
>>
>> Moreover, if you want to avoid managing too much jobs with the
>> (almost) same configuration, I would suggest you to consider some plugins
>> which can help you for that : Jenkins Pipeline (I'm assuming that your are
>> using FreeStyle job, right ?), Job DSL Plugin, Job Builder, ...
>>
>> Hope it helps.
>>
>>
>> 2017-06-30 14:06 GMT+02:00 paul b <pbla...@gmail.com>:
>>
>>> I have tried to understand the various options but I am not too sure I
>>> can use it.  Unless I am missing something...
>>>
>>> All I want is something simple like the following.
>>>
>>> my choice(dropdown) selections are:
>>> 1. dev
>>> 2. sit
>>> 3. uat
>>> 4. prod
>>>
>>> For example when I select dev I would like it set variables like
>>> server=dev-server
>>> port=dev-port
>>>
>>> so for each environment I can chose different servers and ports.
>>>
>>> which I can then pass into my maven build like
>>> mvn clean deploy -DSERVER=${server} -DPORT=${port}
>>>
>>>
>>> On Friday, 30 June 2017 12:49:33 UTC+1, mpapo - Michael Pailloncy wrote:
>>>>
>>>> Have you tried this plugin https://wiki.jenkins.io
>>>> /display/JENKINS/Extended+Choice+Parameter+plugin ?
>>>>
>>>> 2017-06-29 22:26 GMT+02:00 paul b <pbla...@gmail.com>:
>>>>
>>>>> Hi,
>>>>>   I wondered if it is possible to do a parameterised build which can
>>>>> set multiple values.  I would like to use the choice(dropdown box) and
>>>>> select a single value but that then set multiple values/parameters.  This
>>>>> is mentioned in the by Martin Woit
>>>>> <https://wiki.jenkins.io/display/~mwoi> in the following.  I also
>>>>> would like to use the choice of target of dev, sit etc etc.  Sure other
>>>>> people have faced this same problem many times.
>>>>>
>>>>> https://wiki.jenkins.io/display/JENKINS/Parameterized+Build
>>>>>
>>>>> Hope you can help.
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "Jenkins Users" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>>> an email to jenkinsci-use...@googlegroups.com.
>>>>> To view this discussion on the web visit
>>>>> https://groups.google.com/d/msgid/jenkinsci-users/025ba41f-
>>>>> 82d7-4e19-89d6-785884ff2757%40googlegroups.com
>>>>> <https://groups.google.com/d/msgid/jenkinsci-users/025ba41f-82d7-4e19-89d6-785884ff2757%40googlegroups.com?utm_medium=email_source=footer>
>>>>> .
>>>>> 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-use...@googlegroups.com.
>>> To view this discussion on the web visit https://groups.google.com/d/ms
>>> gid/jenkinsci-users/6f55af96-5003-4334-8b6a-db74505df33c%
>>> 40googlegroups.com
>>> <https://groups.google.com/d/msgid/jenkinsci-users/6f55af96-5003-4334-8b6a-db74505df33c%40googlegroups.com?utm_medium=email_source=footer>
>>> .
>>>
>>> For more options, visit https://groups.google.com/d/optout.
&g

Re: Can we construct a more complex slackSend notification?

2017-07-02 Thread Michael Pailloncy
It's related to Groovy syntax : the { ... } is not interpreted as you want
to here.

I think this example should work in your case :


def payload = JsonOutput.toJson([
  "username": "Production Deployer",
  "icon_emoji": ":robot_face:",
  "mrkdwn": true,
  "attachments": [
 [
"mrkdwn_in": ['text','pretext'],
"color": "#199515",
"text": "*$JOB_NAME:* <$BUILD_URL|Build #$BUILD_NUMBER>,
_microservice_ in _${clusterName}_ successfully updated.",
"fallback": "*Production Deployer*: operation succeeded."
]
  ]
   ])



2017-06-30 17:44 GMT+02:00 Idan Adar <i...@adar.me>:

> Do you happen to know why does the following line shows an error?
> "mrkdwn_in": ['text','pretext'], -- expecting '}', found ':'
>
> def payload = JsonOutput.toJson([
>   "username": "Production Deployer",
>   "icon_emoji": ":robot_face:",
>   "mrkdwn": true,
>   "attachments": [
>  {
> "mrkdwn_in": ['text','pretext'],
> "color": "#199515",
> "text": "*$JOB_NAME:* <$BUILD_URL|Build #$BUILD_NUMBER>,
> _microservice_ in _${clusterName}_ successfully updated.",
> "fallback": "*Production Deployer*: operation succeeded."
>  }
>   ]
>])
>
>
> On Friday, June 30, 2017 at 6:23:18 PM UTC+3, Idan Adar wrote:
>>
>> Ohhh, nice!
>> Thanks for the example Michael.
>>
>> On Friday, June 30, 2017 at 5:41:38 PM UTC+3, mpapo - Michael Pailloncy
>> wrote:
>>>
>>> Alternatively, you can create your own Pipeline method, a bit like this
>>> one : https://github.com/jenkinsci/pipeline-examples/blob/master/p
>>> ipeline-examples/slacknotify/slackNotify.groovy
>>> Since it's a simple curl, you can then directly use all the existing
>>> options/parameters offered by the Slack REST API.
>>>
>>> Note that it's better to centralized this method inside a Global Shared
>>> Library (just in case you are not already using it :))
>>>
>>>
>>> 2017-06-30 16:11 GMT+02:00 Idan Adar <id...@adar.me>:
>>>
>>>> Anyone? :)
>>>>
>>>> On Tuesday, June 27, 2017 at 8:13:35 PM UTC+3, Idan Adar wrote:
>>>>>
>>>>> In a Node.js app, one can use the slack-notify package to send
>>>>> something like this:
>>>>>
>>>>>
>>>>> slack.send({
>>>>>   "username": "myBotName",
>>>>>   "icon_emoji": ":robot_face:",
>>>>>   "mrkdwn": true,
>>>>>   "attachments": [
>>>>>  {
>>>>> "mrkdwn_in": ['text','pretext'],
>>>>> "color": "#199515",
>>>>> "text": message,
>>>>> "fallback": "*my*: _markdown_ message."
>>>>>  }
>>>>>   ]
>>>>>});
>>>>>
>>>>> In a Jenkinsfile, one can do this:
>>>>> slackSend (
>>>>>color: '#F01717',
>>>>>message: "$JOB_NAME: <$BUILD_URL|Build #$BUILD_NUMBER>, my
>>>>> message."
>>>>> )
>>>>>
>>>>> I'm looking for a way to accomplish the Node implementation, but using
>>>>> slackSend so that the message dispatched from the Jenkinsfile will be
>>>>> on-par with the Node.js-sent message.
>>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Jenkins Users" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to jenkinsci-use...@googlegroups.com.
>>>> To view this discussion on the web visit https://groups.google.com/d/ms
>>>> gid/jenkinsci-users/deaa0550-128a-4513-8972-0cf991d49bbd%
>>>> 40googlegroups.com
>>>> <https://groups.google.com/d/msgid/jenkinsci-users/deaa0550-128a-4513-8972-0cf991d49bbd%40googlegroups.com?utm_medium=email_source=footer>
>>>> .
>>>>
>>>> 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/b4ac2560-b636-49da-a7e6-4d90e677a383%40googlegroups.
> com
> <https://groups.google.com/d/msgid/jenkinsci-users/b4ac2560-b636-49da-a7e6-4d90e677a383%40googlegroups.com?utm_medium=email_source=footer>
> .
>
> 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/CAPO77c0k-heb9UonEM71OWMP4Mkazp5UwaYoO%2BKVPD_HR-4T4g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Pipeline job triggers another job twice

2017-07-02 Thread Michael Pailloncy
Not sure to fully understand. Can you share your Pipeline script please ?

2017-06-29 21:04 GMT+02:00 Venkata Burra :

> Hi,
>
>
>
> I have a question regarding a pipeline job.
>
>
>
> I have Pipeline Job1, Pipeline Job2 and Pipeline Job3 jobs created in
> Jenkins. The Pipeline Job1 is coded to trigger only Pipeline Job2 depending
> on some condition. But the Pipeline Job1 is triggering Pipeline Job2 once
> and triggering Pipeline Job2 and Pipeline Job3. Please advice me how can I
> resolve this issue.
>
>
>
> --
> 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/4a734df4-fb4a-4bae-9ca6-14e2c8c77122%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/CAPO77c01KUpDrxprA2nbwBnKGY0SZwheZr1YBWj2Qt_h3TzoxQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: parameterised build which can set multiple values/variables from a choice

2017-07-02 Thread Michael Pailloncy
Ok.
IMHO, It would be better to avoid too much complexity in your job
configuration. Personally, I would create one job per use case : each one
with default parameters value targeting each environment type
(dev/uat/prod/...).
In this way, you will have a simple job configuration (easily
maintainable), but also a clear and distinct build history for each
environment type.

Moreover, if you want to avoid managing too much jobs with the
(almost) same configuration, I would suggest you to consider some plugins
which can help you for that : Jenkins Pipeline (I'm assuming that your are
using FreeStyle job, right ?), Job DSL Plugin, Job Builder, ...

Hope it helps.


2017-06-30 14:06 GMT+02:00 paul b <pblake...@gmail.com>:

> I have tried to understand the various options but I am not too sure I can
> use it.  Unless I am missing something...
>
> All I want is something simple like the following.
>
> my choice(dropdown) selections are:
> 1. dev
> 2. sit
> 3. uat
> 4. prod
>
> For example when I select dev I would like it set variables like
> server=dev-server
> port=dev-port
>
> so for each environment I can chose different servers and ports.
>
> which I can then pass into my maven build like
> mvn clean deploy -DSERVER=${server} -DPORT=${port}
>
>
> On Friday, 30 June 2017 12:49:33 UTC+1, mpapo - Michael Pailloncy wrote:
>>
>> Have you tried this plugin https://wiki.jenkins.io
>> /display/JENKINS/Extended+Choice+Parameter+plugin ?
>>
>> 2017-06-29 22:26 GMT+02:00 paul b <pbla...@gmail.com>:
>>
>>> Hi,
>>>   I wondered if it is possible to do a parameterised build which can set
>>> multiple values.  I would like to use the choice(dropdown box) and select a
>>> single value but that then set multiple values/parameters.  This is
>>> mentioned in the by Martin Woit <https://wiki.jenkins.io/display/~mwoi> in
>>> the following.  I also would like to use the choice of target of dev, sit
>>> etc etc.  Sure other people have faced this same problem many times.
>>>
>>> https://wiki.jenkins.io/display/JENKINS/Parameterized+Build
>>>
>>> Hope you can help.
>>>
>>>
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Jenkins Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to jenkinsci-use...@googlegroups.com.
>>> To view this discussion on the web visit https://groups.google.com/d/ms
>>> gid/jenkinsci-users/025ba41f-82d7-4e19-89d6-785884ff2757%
>>> 40googlegroups.com
>>> <https://groups.google.com/d/msgid/jenkinsci-users/025ba41f-82d7-4e19-89d6-785884ff2757%40googlegroups.com?utm_medium=email_source=footer>
>>> .
>>> 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/6f55af96-5003-4334-8b6a-db74505df33c%40googlegroups.
> com
> <https://groups.google.com/d/msgid/jenkinsci-users/6f55af96-5003-4334-8b6a-db74505df33c%40googlegroups.com?utm_medium=email_source=footer>
> .
>
> 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/CAPO77c0b%3DTx-B7RMpy5CNSv%3D9B9wgXs%3DCBgEdhR5UYTESaAyhQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Can we construct a more complex slackSend notification?

2017-06-30 Thread Michael Pailloncy
Alternatively, you can create your own Pipeline method, a bit like this one
: https://github.com/jenkinsci/pipeline-examples/blob/master/
pipeline-examples/slacknotify/slackNotify.groovy
Since it's a simple curl, you can then directly use all the existing
options/parameters offered by the Slack REST API.

Note that it's better to centralized this method inside a Global Shared
Library (just in case you are not already using it :))


2017-06-30 16:11 GMT+02:00 Idan Adar :

> Anyone? :)
>
> On Tuesday, June 27, 2017 at 8:13:35 PM UTC+3, Idan Adar wrote:
>>
>> In a Node.js app, one can use the slack-notify package to send something
>> like this:
>>
>>
>> slack.send({
>>   "username": "myBotName",
>>   "icon_emoji": ":robot_face:",
>>   "mrkdwn": true,
>>   "attachments": [
>>  {
>> "mrkdwn_in": ['text','pretext'],
>> "color": "#199515",
>> "text": message,
>> "fallback": "*my*: _markdown_ message."
>>  }
>>   ]
>>});
>>
>> In a Jenkinsfile, one can do this:
>> slackSend (
>>color: '#F01717',
>>message: "$JOB_NAME: <$BUILD_URL|Build #$BUILD_NUMBER>, my
>> message."
>> )
>>
>> I'm looking for a way to accomplish the Node implementation, but using
>> slackSend so that the message dispatched from the Jenkinsfile will be
>> on-par with the Node.js-sent message.
>>
> --
> 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/deaa0550-128a-4513-8972-0cf991d49bbd%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/CAPO77c2qac4BS3ue%3DbPCVo-4JAyEQkNLymm6%2B6AWx0tuxKvf%3DA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: parameterised build which can set multiple values/variables from a choice

2017-06-30 Thread Michael Pailloncy
Have you tried this plugin
https://wiki.jenkins.io/display/JENKINS/Extended+Choice+Parameter+plugin ?

2017-06-29 22:26 GMT+02:00 paul b :

> Hi,
>   I wondered if it is possible to do a parameterised build which can set
> multiple values.  I would like to use the choice(dropdown box) and select a
> single value but that then set multiple values/parameters.  This is
> mentioned in the by Martin Woit  in
> the following.  I also would like to use the choice of target of dev, sit
> etc etc.  Sure other people have faced this same problem many times.
>
> https://wiki.jenkins.io/display/JENKINS/Parameterized+Build
>
> Hope you can help.
>
>
>
> --
> 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/025ba41f-82d7-4e19-89d6-785884ff2757%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/CAPO77c0MZ1iS3OAB-T-Rqb_Xp%3DBMJmJrNAgB7%2BTxZ0KCM8V1oA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Git plugin issue in pipeline

2017-06-28 Thread Michael Pailloncy
Can you try with something like that inside your Jenkinsfile :

node {
deleteDir()
checkout scm
}

Jenkins seems to be already able to retrieve your Jenkinsfile, so you don't
need to give all SCM details inside it, see
https://jenkins.io/doc/book/pipeline/jenkinsfile/#creating-a-jenkinsfile

2017-06-27 23:22 GMT+02:00 Abhijith Reddy :

> Whenever i specify a branch with GitSCM i see the following issue
> Couldn't find any revision to build. Verify the repository and branch
> configuration for this job.
>
> Here's my Jenkinsfile
>
> node {
>
> deleteDir()
> checkout([$class: 'GitSCM', branches: [[name: 'feature/my-branch]],
> doGenerateSubmoduleConfigurations: false, extensions: [[$class:
> 'CleanBeforeCheckout'],[$class: 'PruneStaleBranch']], submoduleCfg: [],
> userRemoteConfigs: [[credentialsId: 'aaa-aaa-aaa-aaa', url: GIT_URL]]])
> }
>
>
> and here is the error
>
>
> Checking out git ssh://g...@stash.com:7999/capt/jenkins-pipelines.git to
> read Jenkinsfile-pull-request
> Wiping out workspace first.
> Cloning the remote Git repository
> Cloning repository ssh://g...@stash.com:7999/capt/jenkins-pipelines.git
>  > git init /var/lib/jenkins/workspace/API/merchant-profile-and-
> preferences/pr-pipeline@script # timeout=10
> Fetching upstream changes from ssh://g...@stash.com:7999/capt/
> jenkins-pipelines.git
>  > git --version # timeout=10
> using GIT_SSH to set credentials automated repo access
>  > git fetch --tags --progress ssh://g...@stash.com:7999/capt/
> jenkins-pipelines.git +refs/heads/*:refs/remotes/origin/*
>  > git config remote.origin.url ssh://g...@stash.com:7999/capt/
> jenkins-pipelines.git # timeout=10
>  > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/*
> # timeout=10
>  > git config remote.origin.url ssh://g...@stash.com:7999/capt/
> jenkins-pipelines.git # timeout=10
> Fetching upstream changes from ssh://g...@stash.com:7999/capt/
> jenkins-pipelines.git
> using GIT_SSH to set credentials automated repo access
>  > git fetch --tags --progress ssh://g...@stash.com:7999/capt/
> jenkins-pipelines.git +refs/heads/*:refs/remotes/origin/*
>  > git rev-parse origin/develop^{commit} # timeout=10
> Checking out Revision 81cbf859af08d159c8c3a89cb796b4b1b536
> (origin/develop)
>  > git config core.sparsecheckout # timeout=10
>  > git checkout -f 81cbf859af08d159c8c3a89cb796b4b1b536
>  > git rev-list 571b6661262fa11ce2e1088338c1f19cd1a5110d # timeout=10
> First time build. Skipping changelog.
> [Pipeline] node
> Running on q7bld02 in /var/lib/jenkins/workspace/API/merchant-profile-and-
> preferences/pr-pipeline
> [Pipeline] {
> [Pipeline] deleteDir
> [Pipeline] checkout
> Cloning the remote Git repository
> Cloning repository ssh://g...@stash.com:7999/api/mpp.git
>  > git init 
> /var/lib/jenkins/workspace/API/merchant-profile-and-preferences/pr-pipeline
> # timeout=10
> Fetching upstream changes from ssh://g...@stash.com:7999/api/mpp.git
>  > git --version # timeout=10
> using GIT_SSH to set credentials automated repo access
>  > git fetch --tags --progress ssh://g...@stash.com:7999/api/mpp.git
> +refs/heads/*:refs/remotes/origin/*
>  > git config remote.origin.url ssh://g...@stash.com:7999/api/mpp.git #
> timeout=10
>  > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/*
> # timeout=10
>  > git config remote.origin.url ssh://g...@stash.com:7999/api/mpp.git #
> timeout=10
> Cleaning workspace
>  > git rev-parse --verify HEAD # timeout=10
> No valid HEAD. Skipping the resetting
>  > git clean -fdx # timeout=10
> Pruning obsolete local branches
> Fetching upstream changes from ssh://g...@stash.com:7999/api/mpp.git
> using GIT_SSH to set credentials automated repo access
>  > git fetch --tags --progress ssh://g...@stash.com:7999/api/mpp.git
> +refs/heads/*:refs/remotes/origin/* --prune
>  > git rev-parse feature/XMEN-512-dup​licate-contact-clean​up^{commit} #
> timeout=10
>  > git rev-parse 
> refs/remotes/origin/feature/XMEN-512-dup​licate-contact-clean​up^{commit}
> # timeout=10
>  > git rev-parse feature/XMEN-512-dup​licate-contact-clean​up^{commit} #
> timeout=10
> [Pipeline] }
> [Pipeline] // node
> [Pipeline] End of Pipeline
> ERROR: Couldn't find any revision to build. Verify the repository and
> branch configuration for this job.
> Finished: FAILURE
>
>
> --
> 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/a6a95098-8538-44ac-98ee-22b10e27c223%40googlegroups.
> com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed 

Re: Trigger a job based on failure of another/upstream job

2017-06-28 Thread Michael Pailloncy
Are you using the Scripted or Declarative way to write your Pipeline ?
If you are in Declarative mode, I think that you can easily do that with
the *post *section => see https://jenkins.io/doc/book/pipeline/syntax#post

2017-06-28 7:06 GMT+02:00 Максим :

> Hi!
> Perhaps you can use try-catch blocks.
> And run your job in a catch block
>
> вт, 27 июн. 2017 г. в 21:40, Kishor Ramanan :
>
>> Hi,
>>
>> Is there a way where I can trigger a job based on the failure condition
>> of other job?
>>
>> I am using pipeline as of now, during the last step if pipeline fails, I
>> want to execute a specific set of job.
>>
>> 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/ce1a300c-be24-4c94-8b71-
>> 62042e1d85af%40googlegroups.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
>
> С уважением, Сёмочкин Максим.
> Twitter: maksim77
> +7 926 9056085 <+7%20926%20905-60-85>
>
> --
> 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/CANJG3dJjovR7VcpCkNNm7XVm9%
> 3DLCpiPB1Xi_gZgrghkwVz9bJw%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/CAPO77c1mB2gQWii4qfPgLa0rccGqyqyawOU_6z%3DW6p%3Dn1dURWg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Trying to configure a RHEL7 slave yields a java.io.IOException: Illegal char in base64 code error

2017-06-26 Thread Michael Pailloncy
Do you use the same Java version on the master and agent ? Which version of
Jenkins are you using ?

2017-06-26 20:17 GMT+02:00 t3knoid :

> I am trying to add a RHEL7 slave in my existing configuration that is
> using a Windows master. I am trying to use "Launch slave agents via SSH." I
> am getting the following error when I tried to configure the slave:
>
> executing pre-launch scripts ...
>> java.io.IOException: Illegal char in base64 code.
>> at com.trilead.ssh2.crypto.Base64.decode(Base64.java:107)
>> at com.trilead.ssh2.KnownHosts.initialize(KnownHosts.java:406)
>> at com.trilead.ssh2.KnownHosts.initialize(KnownHosts.java:437)
>> at com.trilead.ssh2.KnownHosts.(KnownHosts.java:86)
>> at hudson.plugins.sshslaves.verifiers.KnownHostsFileKeyVerificationS
>> trategy.getPreferredKeyAlgorithms(KnownHostsFileKeyVerificationS
>> trategy.java:91)
>> at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:796)
>> at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:792)
>> at java.util.concurrent.FutureTask.run(Unknown Source)
>> at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
>> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
>> at java.lang.Thread.run(Unknown Source)
>> [06/26/17 14:01:48] Launch failed - cleaning up connection
>> [06/26/17 14:01:48] [SSH] Connection closed.
>
>
> I verified that I can SSH successfully from the master to the intended
> host using a private key. I also tried just a standard username/password
> with the same result.
>
> --
> 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/4e6463de-2980-4ccf-bfac-0768237a8ee7%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/CAPO77c2wXYmoVxa8EBTo-CDWdT4qcFAM9BqL8Z-G_Egr%3DvZ3GA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins 2.39 to 2.63

2017-06-17 Thread Michael Pailloncy
Not my case, but there is a trend of possible issues with community
feedback of each weekly versions on the download page :
https://jenkins.io/changelog/
Moreover, I would suggest you to install a LTS if you want a more stable
version of Jenkins.

2017-06-17 7:52 GMT+02:00 Kishore RP :

> Jenkins 2.39 to 2.63,...Currently running 2.39 jenkins on centos, plannin
> to upgrade to 2.63, we use a lot of multiconfiguration jobs and few
> pipeline jobs,
> Has anybody followed the above upgrade path, has anyone seen any issues
> after the upgrade in job configuration or cpu issues or any other issues...
> Which can help to decide whether to upgrade or not...
> Thanks in advance for the help
>
> --
> 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/CAH%3D%3DDrpu24Y-06rq68crPcLCAcD-6RS-
> d7YpMAaq62EcPspESA%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/CAPO77c2VrLpKp-1OGd5HSkKPXdXQv1qUyEdqDQy49%2BJzpA3-GA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins2 pileline poll scm

2017-03-05 Thread Michael Pailloncy
What's your job type (Pipeline, MultiBranch, etc) ?

If you have created a MultiBranch/Bitbucket Team/Project or GitHub
Organization job type, you should have this property in the job
configuration.
If your job is a simple Pipeline, you should have a "Poll SCM" property
inside "Build Triggers" part of the configuration.

As far as I know, you don't need any extra plugin to enable this.



2017-03-05 9:42 GMT+01:00 <shlimo...@gmail.com>:

> I cannot find the "Periodically if not otherwise run" under "Build
> Triggers".
> Which plugin do I need to install to enable this option?
>
> On Friday, March 3, 2017 at 6:05:12 PM UTC+2, mpapo - Michael Pailloncy
> wrote:
>>
>> In the "Build Triggers" part inside your job configuration, you should
>> have a "Periodically if not otherwise run" property.
>>
>> However, if you're able to configure webhooks on your SCM side to notify
>> your master about new commits/branches and PR, it's a better approach :
>> https://www.cloudbees.com/blog/polling-must-die-triggering
>> -jenkins-builds-git-hook
>>
>> 2017-03-03 16:12 GMT+01:00 Limor Shemesh <li...@gigaspaces.com>:
>>
>>> Hi
>>> I upgraded Jenkins to 2.4 and started migrate jobs to pipeline jobs.
>>> I have created JenkinsFile and configure the job to search it in github
>>> repo.
>>> The job works great but I cannot find the way to add poll scm.
>>> I want that the job will run on every push of the repo (master branch).
>>> Please help.
>>> Thanks.
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Jenkins Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to jenkinsci-use...@googlegroups.com.
>>> To view this discussion on the web visit https://groups.google.com/d/ms
>>> gid/jenkinsci-users/60ee6556-433b-4718-9589-d6310fdf4a13%
>>> 40googlegroups.com
>>> <https://groups.google.com/d/msgid/jenkinsci-users/60ee6556-433b-4718-9589-d6310fdf4a13%40googlegroups.com?utm_medium=email_source=footer>
>>> .
>>> 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/8b82d24f-130d-44d9-a358-b292ef36840e%40googlegroups.
> com
> <https://groups.google.com/d/msgid/jenkinsci-users/8b82d24f-130d-44d9-a358-b292ef36840e%40googlegroups.com?utm_medium=email_source=footer>
> .
>
> 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/CAPO77c2_kugNeKYb_hYew8XorBqFMYZGQAPh7M7OQafHK20NXw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins2 pileline poll scm

2017-03-03 Thread Michael Pailloncy
In the "Build Triggers" part inside your job configuration, you should have
a "Periodically if not otherwise run" property.

However, if you're able to configure webhooks on your SCM side to notify
your master about new commits/branches and PR, it's a better approach :
https://www.cloudbees.com/blog/polling-must-die-triggering-jenkins-builds-git-hook


2017-03-03 16:12 GMT+01:00 Limor Shemesh :

> Hi
> I upgraded Jenkins to 2.4 and started migrate jobs to pipeline jobs.
> I have created JenkinsFile and configure the job to search it in github
> repo.
> The job works great but I cannot find the way to add poll scm.
> I want that the job will run on every push of the repo (master branch).
> Please help.
> 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/60ee6556-433b-4718-9589-d6310fdf4a13%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/CAPO77c3YnAiVLqgqSmr3rbtcMT%2Be3YvSwaADvCj487UMnLtDuw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Upgrade Jenkins from 1.580 to 2.32.2

2017-02-26 Thread Michael Pailloncy
Few months ago, I've successfully upgraded from 1.6x to 2.x without any
issue. But it depends on your configuration and installed plugins.
Have a look at https://jenkins.io/doc/upgrade-guide/ and
https://jenkins.io/changelog/ to get changelog details and upgrade specific
instructions.

But since 1.580 is pretty old, I would recommend to upgrade to the latest
1.xx first, and then upgrade to 2.32.2 to avoid too many changes at the
same time. And of course, a backup is always recommended before any upgrade
:-)

2017-02-25 19:35 GMT+01:00 Raj :

> Hello,
> We have been stuck to a very old version of Jenkins for a while now.
> 1.580. we are on Centos 6.
>
> I am wondering if any one has upgraded from 1.580 to 2.32.2 via yum and
> including all plugins ?
>
> If someone could share their experience it will be really appreciated.
>
> apart from need for jdk 1.8, is there any other hard dependency for the
> upgrade?
> Regards,
> Raj
>
> --
> 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/4b262872-a494-4d29-9e3d-f390b5f14218%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/CAPO77c0rVpj8Grtc9rcDxXy_korLoiBXBMbEwtJCdf8hgX6Tnw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Human submit after job

2016-12-14 Thread Michael Pailloncy
Are you using Jenkins Pipeline ?

If yes, an "input" step exists to add a manual approval at any time during
your workflow (or pipeline, as you want) :
https://jenkins.io/doc/pipeline/steps/pipeline-input-step/#input-wait-for-interactive-input
=>
https://github.com/jenkinsci/pipeline-plugin/blob/master/TUTORIAL.md#pausing-flyweight-vs-heavyweight-executors
If no, you should really consider using it :-)

2016-12-14 9:33 GMT+01:00 Andreas Wuz :

> Hi,
>
> I am developing a little workflow through jenkins jobs. Now I need to
> submit manually after a job has succeeded. So for example: Job  -> manual
> submit -> job 2. I thought this could be accomplished with a button or
> something else. Is this possible, e.g. with a plugin?
>
> Best regards,
> Wuz
>
> --
> 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/8613cc52-47e5-4efc-b3e7-81cd22c83f57%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/CAPO77c0Er3YJQ0TfPTrrdqdyNEEsA45U%2Bu%2BvmuAhW%3DauEtQXvg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: pipeline: it seems pipeline-build-step (build job) ignores node assignment

2016-12-14 Thread Michael Pailloncy
IIUC, it's a normal behaviour.

The "build" pipeline step triggers the job job1 without any node "context"
(a bit like if you trigger it manually), so the default label of job1 is
used in this case.

If you want to trigger job1 with a specific label, you should have a look
to this plugin :
https://wiki.jenkins-ci.org/display/JENKINS/NodeLabel+Parameter+Plugin
However, I never used it inside a Jenkins Pipeline.

Michaël

2016-12-14 13:23 GMT+01:00 :

> Hi,
>
> I'm trying to run a job at the node assigned (not the master node), but
> the job runs at any free node available (often it is the master node
> actually).
>
> Here's my pipeline script:
>
> node('label1') {
>   echo "Actual node name: $env.NODE_NAME ."
>   build job: 'job1'
> }
> node('master') {
>   echo "Actual node name: $env.NODE_NAME ."
> }
>
> My master node is not labeled with label 'label1'.
> Only one of my slave nodes is labeled with label 'label1'.
>
> I see at a build's Console Output that the 1st echo is executed at the
> slave node with label 'label1'. And the 2nd echo is executed at the master
> node.
> But 'job1' is executed at the master node also.
> I think that for my pipeline script 'job1' should be executed at the slave
> node labeled with 'label1'.
> 'job1' is allowed to run at any node (this is configured at the job's
> configuration).
>
> Is this behavior is correct? Or is it a bug when build-job-step ignores
> pipeline node assignment?
>
> For now I use Jenkins 2.8 and Pipeline Plugin 2.4 .
> I've tried both Windows and Linux slaves node with this case (got the same
> result). My master node is on Linux.
>
> Best regards,
> Alexander.
>
> --
> 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/77c72577-5898-4ccb-b0eb-cb9d1dab1d7e%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/CAPO77c1_KFF_amMi-QCzj3Ab7sshHtZ4GuVs9c1hsrh%2Bw7PoAA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Gerrit build with a default REFSPEC value?

2015-10-22 Thread mpapo - Michael Pailloncy
Hi,

I think you can add "GERRIT_REFSPEC" parameter to this job (and all others 
needed parameters by your job) with a default value and it'll be overridden 
when triggered by a Gerrit event.
But the GERRIT_REFSPEC parameter, and some others Gerrit's parameters will 
change on each changeset. Not sure that you really want this behaviour.

If your usecase is to rebuild a previous build, you can use the "Retrigger" 
button on the build page. 

Michaël

Le mercredi 21 octobre 2015 15:12:32 UTC+2, John Mellor a écrit :
>
> I have a couple of prototype Gerrit integration builds up and running, 
> with some issues.  All of the builds are freestyle projects, in case that 
> matters.
>
>  
>
> One of the issues is that I do not seem to be able to kick off a build 
> manually because of the way that the sourcecode management has to be 
> configured.  I have to use a repo Refspec of $GERRIT_REFSPEC, which is not 
> valid unless the build is triggered by the Gerrit plugin.
>
>  
>
> For a build-now pushbutton build or a dependent build, how can I set this 
> value to some default that can be overloaded when triggered by Gerrit?
>

-- 
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/55932274-c6d5-4aa2-99f7-2034605e5357%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Questions about Heavy Job Plugin

2012-10-06 Thread mpapo - Michael Pailloncy
Hi all,

I've questions about 
https://wiki.jenkins-ci.org/display/JENKINS/Heavy+Job+Plugin

Configuration : 
- 1 node with 2 executors
- 3 jobs with one taking 2 executors with this plugin

If we run a first job taking one executor and a second taking two 
executors, the second is waiting for the end of the first.
But if a third (taking one executor) is launched, it take the other 
executor on the node and goes before the second.
I've seen this scenario repeated several times, leaving the second still 
waiting for space on the node. 

I think the Priority Sorter Plugin could help me. But it bothers me a 
little having to define a priority in this case. I do not necessarily want 
that job 2 has a higher priority compared to other, I just want that the 
order of the queue is respected.

Questions : 
- In your opinion, is it possible to improve the plugin to take account 
this kind of case ? The second job could take a 'virtual' place on the 
empty executor of the node.
- Is there another plugin or another way to do ?

Thanks in advance,
Michaël


Re: How to use different SVN workspace version on a slave?

2012-08-03 Thread Michael Pailloncy

Le 03/08/2012 21:30, Fritz Elfert a écrit :

I can't find any way to select the workspace
version per slave

Hi,
I'm not sure to clearly understand what you want.
If you have slaves with SVN 1.7 and slaves with 1.6 natively, you can 
add labels like svn1-6 to nodes with 1.6  version and svn1-7 to 
those with version 1.7.

So you can use the correct version depending on your job requirements.

But I think the best way would be to install both versions on all slaves.

Michaël Pailloncy




Re: How to use different SVN workspace version on a slave?

2012-08-03 Thread Michael Pailloncy

Le 03/08/2012 22:44, Fritz Elfert a écrit :

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Michael,

On 08/03/2012 10:00 PM, Michael Pailloncy wrote:

Le 03/08/2012 21:30, Fritz Elfert a écrit :

I can't find any way to select the workspace
version per slave

Hi,
I'm not sure to clearly understand what you want.
If you have slaves with SVN 1.7 and slaves with 1.6 natively, you can
add labels like svn1-6 to nodes with 1.6  version and svn1-7 to
those with version 1.7.

Suppose, I did label them, how would I tell jenkins to use different SVN
workspace per slave if there is only one global setting in jenkins'
config? (There's nothing configurable in the node setup GUI).

Perhaps more lengthly but clearly:

I have several Fedora17 hosts which come with svn-1.7, so in Jenkins'
global setting, I select 1.7. Now I have to build some projects for
older targets (RHEL6) as well. The RHEL6 slaves use svn-1.6 (there's no
official svn-1-7 package for RHEL6 - and frankly, i don't want to
install something custom on those, because that should be a clean
install). When I create a new job (pinned to RHEL6 of course) Jenkins
still does the checkout using svn-1.7 and later in the build itself the
commandline svn complains (rightfully) about the wrong svn version. If I
switch to 1.6 globally, the situation is reverse: RHEL6 slaves build
fine, but commandline-tools on Fedora17 complain.

So:
The global setting is useful as a *default* at best but should be
overridable per slave. (or perhaps an option to delegate checkout+update
to cmdline binaries on the slave would do).

In the meantime, I found out that there's an issue for this in JIRA already:
https://issues.jenkins-ci.org/browse/JENKINS-14157
Unfortunately, it's still unassigned.



So you can use the correct version depending on your job requirements.

But I think the best way would be to install both versions on all slaves.

Michaël Pailloncy



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEUEARECAAYFAlAcOEUACgkQboM4mAMyprAdCgCfYvclqpnawNU/K1+YuaP5WWnd
hOIAlRvnXIK2/6DOJGBTVSk3c/DOlzo=
=77eO
-END PGP SIGNATURE-


Ok ! I've misunderstand. It could be nice to add more than one SVN 
installation path like we can with Java, Maven, Git, .. and permit to 
choose it in job configuration.




Re: Create a pre-production environment for Jenkins

2012-06-12 Thread mpapo - Michael Pailloncy
Hi,

It seems that 'push' automatically updates of Jenkins and its plugins from 
pre-production to production is difficult.
However, it would be interesting to know how to create a sort of continuous 
integration of the continuous integration environment :)

Thank you for your answer. 

Le lundi 11 juin 2012 23:09:29 UTC+2, LesMikesell a écrit :

 On Mon, Jun 11, 2012 at 2:54 PM, mpapo - Michael Pailloncy 
 michael.paillo...@gmail.com wrote: 
  nobody ever had this problematic ? 

 I think most people do it the other way around.  That is they build 
 and test their test environment first, then after seeing that it 
 works, duplicate it into production.  But, I think you have a point 
 that there is no easy way to keep them loosely coordinated so you can 
 test changes in an ongoing way and be sure that they won't break jobs 
 that have evolved differently in production. 

 -- 
Les Mikesell 
   lesmikes...@gmail.com 



Create a pre-production environment for Jenkins

2012-06-11 Thread mpapo - Michael Pailloncy
Hi,

Currently, my Jenkins is used very frequently by teams and it's dangerous 
to update it directly in the production environment.
Do you have a specific methodology to update Jenkins before apply updates 
in the production environment ?

I plan to run a Jenkins (with a specific user and http port) on the same 
machine of my Jenkins master which will allow me to easily import jobs 
configurations (at least the most representative) from my production 
environment to the 'pre-production' environment and test Jenkins and its 
plugins updates before apply them to production.

However, I can't just copy them and start a build directly. Many have 
specific configuration to the production envionment (email notification, 
release configuration, number of build to preserve ...). 
So, I have to change them before run them. Automating this type of task 
seems difficult.

Furthermore, once pre-production is up to date and representatives jobs has 
been tested, if I want to apply these updates to production, I must repeat 
the same actions on my production envionment which may be a potential 
source of problems. It seems easy for plugins (copy the 
$JENKINS_HOME/plugins directory from pre-production to production), but 
does not seems reliable for Jenkins itself.

Has anyone ever looked for a strategy to create a pre-production 
environment for Jenkins ?


Thanks in advance,
Michaël Pailloncy


Re: Create a pre-production environment for Jenkins

2012-06-11 Thread mpapo - Michael Pailloncy
nobody ever had this problematic ?

Le lundi 11 juin 2012 14:32:32 UTC+2, mpapo - Michael Pailloncy a écrit :

 Hi,

 Currently, my Jenkins is used very frequently by teams and it's dangerous 
 to update it directly in the production environment.
 Do you have a specific methodology to update Jenkins before apply updates 
 in the production environment ?

 I plan to run a Jenkins (with a specific user and http port) on the same 
 machine of my Jenkins master which will allow me to easily import jobs 
 configurations (at least the most representative) from my production 
 environment to the 'pre-production' environment and test Jenkins and its 
 plugins updates before apply them to production.

 However, I can't just copy them and start a build directly. Many have 
 specific configuration to the production envionment (email notification, 
 release configuration, number of build to preserve ...). 
 So, I have to change them before run them. Automating this type of task 
 seems difficult.

 Furthermore, once pre-production is up to date and representatives jobs 
 has been tested, if I want to apply these updates to production, I must 
 repeat the same actions on my production envionment which may be a 
 potential source of problems. It seems easy for plugins (copy the 
 $JENKINS_HOME/plugins directory from pre-production to production), but 
 does not seems reliable for Jenkins itself.

 Has anyone ever looked for a strategy to create a pre-production 
 environment for Jenkins ?


 Thanks in advance,
 Michaël Pailloncy