Re: Problem when configure Jenkins with LDAP

2016-11-16 Thread Frank Yu
There is only one group "Anonymous" now, I need fix the my problem first, 
then I need configure it.

Any idea about this?


在 2016年11月17日星期四 UTC+8下午3:41:06,Paxton, Darren写道:
>
> Did you configure matrix based security? 
>
>  
>
>  
>
> *From:* jenkins...@googlegroups.com  [mailto:
> jenkins...@googlegroups.com ] *On Behalf Of *Frank Yu
> *Sent:* 17 November 2016 04:30
> *To:* Jenkins Users
> *Subject:* Problem when configure Jenkins with LDAP
>
>  
>
> Hi All, 
>
>  
>
> I have a question when configure Jenkins with LDAP.
>
> I have two groups on my LDAP Server, one is "cn=testA", another one is 
> "cn=testB", I only want member of group "testA" can login my Jenkins, 
> member of group "testB" forbidden login.
>
> How should I configure below items?
>
>  
>
> Group search base
>
> Group search filter
>
> Group membership
>
>  
>
> BTW, now all members of groups "testA" and "testB" can login my Jenkins.
>
>  
>
>  
>
> Thanks All
>
>  
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-use...@googlegroups.com .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jenkinsci-users/a965352b-c486-4a8b-8bd1-792a6b93390a%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/b2e096fb-13e0-4a00-be2e-29c797ae3d5a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: Problem when configure Jenkins with LDAP

2016-11-16 Thread Paxton, Darren
Did you configure matrix based security?


From: jenkinsci-users@googlegroups.com 
[mailto:jenkinsci-users@googlegroups.com] On Behalf Of Frank Yu
Sent: 17 November 2016 04:30
To: Jenkins Users
Subject: Problem when configure Jenkins with LDAP

Hi All,

I have a question when configure Jenkins with LDAP.
I have two groups on my LDAP Server, one is "cn=testA", another one is 
"cn=testB", I only want member of group "testA" can login my Jenkins, member of 
group "testB" forbidden login.
How should I configure below items?

Group search base
Group search filter
Group membership

BTW, now all members of groups "testA" and "testB" can login my Jenkins.


Thanks All

--
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/a965352b-c486-4a8b-8bd1-792a6b93390a%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/2c143b10ee644f1191700c365f43fe3c%40GBBED11XG20CN04.mercer.com.
For more options, visit https://groups.google.com/d/optout.


Re: When Connecting to GitLab from Jenkins it is failing

2016-11-16 Thread Jun Wang
did you figure out how to fix it? I hit the same error ...

-- 
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/4b986fe5-722c-4c6e-b482-3a4267938776%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Problem when configure Jenkins with LDAP

2016-11-16 Thread Frank Yu
Hi All, 

I have a question when configure Jenkins with LDAP.
I have two groups on my LDAP Server, one is "cn=testA", another one is 
"cn=testB", I only want member of group "testA" can login my Jenkins, 
member of group "testB" forbidden login.
How should I configure below items?

Group search base
Group search filter
Group membership

BTW, now all members of groups "testA" and "testB" can login my Jenkins.


Thanks All

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/a965352b-c486-4a8b-8bd1-792a6b93390a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Alternative workaround for SECURITY-360?

2016-11-16 Thread Daniel Beck

> On 17.11.2016, at 02:50, Antonio Beyah  wrote:
> 
> If I set that property and point it to the list in the PR will that be 
> sufficient to workaround the vulnerability (assuming remoting version  >= 
> 2.53.2)?

It may depend on which Jenkins release you're on. If you haven't skipped 
another security update, I expect no problems.

FWIW https://jenkins.io/doc/upgrade-guide/2.19/#upgrading-to-jenkins-lts-2-19-3 
contains the list in the format the file is expected to use. And just now I 
notice we didn't explain how to confirm the blacklist is applied correctly -- 
I'll add this later. But here's how: Run the following in Manage Jenkins » 
Script Console:

hudson.remoting.ClassFilter.DEFAULT.isBlacklisted('com.sun.jndi.EvilClass')

As argument, use whatever should (not) match any of the regexes.

-- 
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/D69FC220-FAE3-4AA4-8AA1-9D299D83835D%40beckweb.net.
For more options, visit https://groups.google.com/d/optout.


Re: Duplicate commits listed in pipeline

2016-11-16 Thread Daniel Beck
Are you checking out the same repository multiple times?

> On 16.11.2016, at 22:46, tarocara...@gmail.com wrote:
> 
> Frequently my pipeline build lists duplicate commits in the "Stage View". I 
> just select my job (which is a pipeline) and look at the jobs listed in 
> "Stage View". When I hover over the dark gray box that lists all the commits 
> that went into the build often see duplicate revision numbers. 
> 
> I use the pipeline function Checkout() to do my checkout, and I don't use 
> polling.
> 
> Is there a update to a plugin that might fix this issue? I'm using Jenkins 
> 2.11 with Pipeline 2.4. 
> 
> 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/8adcb582-6cf1-4f72-bf33-931fd6f15166%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/EBAAA773-6C90-468D-B479-D592B8BF75A4%40beckweb.net.
For more options, visit https://groups.google.com/d/optout.


Re: Confused about unexpected path through Jenkinsfile

2016-11-16 Thread Daniel Beck

> On 16.11.2016, at 22:20, David Karr  wrote:
> 
> I've determined that this behavior is caused by the "@NonCPS" annotation.

You can't call Pipeline steps from @NonCPS annotated methods.

Basically:
Outside @NonCPS -- fancy Groovy features don't work
Inside @NonCPS -- Pipeline steps don't work

-- 
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/D51A1B38-2F02-4A6D-B912-DF204FE1D6FF%40beckweb.net.
For more options, visit https://groups.google.com/d/optout.


Re: Java Version on CentOS 7.2

2016-11-16 Thread Daniel Beck

> On 16.11.2016, at 21:36, Aaron K  wrote:
> 
> Is OpenJDK 1.8 supported on CentOS 7.2?  
> 
> We're installing with sudo yum install -y java-1.8.0-openjdk
> 
> Is there a Java compatibility list somewhere for Jenkins that I can reference?

I don't think we have specific requirements, but OpenJDK 8 on RHEL is expected 
to work.

CloudBees (my employer) offers commercial support for Jenkins and is more 
explicit about what's supported:
https://support.cloudbees.com/hc/en-us/articles/203601234-CloudBees-Jenkins-Platform-Supported-Java-Versions

If that says it's supported for CloudBees' Jenkins-based products, you can 
expect it to work with Jenkins.

-- 
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/20DA5632-4DD0-4A3C-96E3-DC1E9A939B2B%40beckweb.net.
For more options, visit https://groups.google.com/d/optout.


Jenkins can configure multiple send mail? A job corresponds to a mailbox.

2016-11-16 Thread easonjim1919
Hello,
   I'm use Email-ext plugin,can configure multiple send mail? A job 
corresponds to a mailbox.

-- 
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/b5664daa-ebd6-4f19-a045-af05c6c85da5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Alternative workaround for SECURITY-360?

2016-11-16 Thread Antonio Beyah
After looking at the code changes remoting/commit/b7ac85ed 

 there 
appears to be an override file that can be set via 
-Dhudson.remoting.ClassFilter.DEFAULTS_OVERRIDE_LOCATION.  If I set that 
property and point it to the list in the PR will that be sufficient to 
workaround the vulnerability (assuming remoting version  >= 2.53.2)?

We still require CLI access for some items so I am trying to avoid the 
workaround described in SECURITY-218 
, and an emergency upgrade 
is not ideal at this time.

Thanks,
Antonio

-- 
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/bd0fdbd4-37f4-4ff8-a119-9b0e70fbf53e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Duplicate commits listed in pipeline

2016-11-16 Thread tarocaravan
Frequently my pipeline build lists duplicate commits in the "Stage View". I 
just select my job (which is a pipeline) and look at the jobs listed in 
"Stage View". When I hover over the dark gray box that lists all the 
commits that went into the build often see duplicate revision numbers. 

I use the pipeline function Checkout() to do my checkout, and I don't use 
polling.

Is there a update to a plugin that might fix this issue? I'm using Jenkins 
2.11 with Pipeline 2.4. 

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/8adcb582-6cf1-4f72-bf33-931fd6f15166%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Confused about unexpected path through Jenkinsfile

2016-11-16 Thread David Karr
On Wednesday, November 16, 2016 at 9:43:39 AM UTC-8, David Karr wrote:
>
> Using Jenkins 2.19.2 on Linux.
>
> I'm perplexed by the behavior of my Jenkinsfile, or at least what it's 
> reporting to me.  I had it basically working, but then I added some simple 
> additional lines to gather some additional information, and now it somehow 
> just stops executing the script at some point, without any explanation or 
> stack trace.
>
> The following is the method called from a catch block in a stage where I 
> first start to see a problem:
> @NonCPS
> def notifyFailure(String stageName) {
> println 
> "result[${currentBuild.rawBuild.getPreviousBuild()?.getResult()}]"
> println "SUCCESS[${hudson.model.Result.SUCCESS}]"
> println "was.SUCCESS[${hudson.model.Result.SUCCESS == 
> currentBuild.rawBuild.getPreviousBuild()?.getResult()}]"
> try {
> println "About to call bFNMT."
> Stringbody= buildFailureNotificationMessageText(stageName)
> println "Returned from bFNMT."
> println "body[${body}]"
> }
> catch (err) {
> err.printStackTrace()
> }
> try {
> String emailAddressesStr = getLastCommitsEmails()
> println "emailAddressesStr[${emailAddressesStr}]"
> }
> catch (err) {
> err.printStackTrace
> }
> def emailAddressesList = emailAddressesStr.split(",")
> println "emailAddressesList[${emailAddressesList}]"
> emailAddressesList.each { address -> println "address[${address}]" }
> def uidsList = emailAddressesList.collect { address -> address.split(
> "@")[0] }
> println "uidsList[${uidsList}]"
> sendQMessageToUsers(["dk068x"], body)
> emailext body:body.replaceAll('\\n', ''),
>  mimeType:'text/html',
>  subject: 'BUILD FAILURE - ' + env.JOB_NAME,
>  to: 'dk0...@att.com'
> }
>
> The following is the tail of the console output, starting at the first 
> println in this method:
> result[FAILURE]
> [Pipeline] echo
> SUCCESS[SUCCESS]
> [Pipeline] echo
> was.SUCCESS[false]
> [Pipeline] echo
> About to call bFNMT.
> [Pipeline] echo
> In bFNMT.
> [Pipeline] echo
> job[unified-service-layer-build-pipeline] stageName[DEPLOY] bu[http:...]
> [Pipeline] echo
> In gLCT.
> [Pipeline] sh
> [workspace] Running shell script
> + git log -5 --date=short '--pretty=format:%cN: %cd : %s'
> [Pipeline] }
> [Pipeline] // stage
> [Pipeline] }
> [Pipeline] // node
> [Pipeline] End of Pipeline
> [DOSSIER] Response Code: 0
> [DOSSIER] Backup file created: /home/jenkins/...
> [DOSSIER] Seconds to input data: 0
> ERROR: script returned exit code 1
> Finished: FAILURE
>
> Here are the two other relevant methods that are called in this sequence:
> @NonCPS
> def buildFailureNotificationMessageText(String stageName) {
> println "In bFNMT."
> println "job[${env.JOB_NAME}] stageName[${stageName}] 
> bu[${env.BUILD_URL}]"
> def result = "${env.JOB_NAME}  color=\"red\">FAILED (stage ${stageName}).\n" +
>  "\n" +
>  "Last commits:\n" +
>  getLastCommitsText() + "\n" +
>  "\n" +
>  env.BUILD_URL
>
> println "At end of bFNMT."
> return result
> }
>
> @NonCPS
> def getLastCommitsText() {
> println "In gLCT."
> def result= sh(returnStdout:true, script:'git log -5 --date=short 
> --pretty=format:"%cN: %cd : %s"')
> println "At end of gLCT."
> return result
> }
>
> If you look at the console output, you'll see it printed "In gLCT" and 
> then it shows the "git log" command line. Then, it just seems to skip the 
> rest of the flow and jump to the end of the stage and node.
>
> Also note that this is the "DEPLOY" stage. There was a "BUILD" stage 
> before this, that executed similar methods.  It also executed a method that 
> executed a "git log" command line, and in the console output I saw the 
> first "In ..." message, then the "Running shell script" message followed by 
> the "+ git log ..." line, and then just like in the "DEPLOY" stage, it just 
> skipped to the end of the stage.  In this case, it went onto the "DEPLOY" 
> stage, so this "skipping" behavior didn't cause a failure.
>
> I'm at a loss to understand what this is doing here.
>

I've determined that this behavior is caused by the "@NonCPS" annotation.  
Once I removed them, this went back to behaving normally. I've read 
explanations of what @NonCPS is for, and I still don't fully understand 
it.  I believe I read somewhere that "collection.each {}" doesn't work 
properly without it, which is why I first started using it (although that 
code is commented out right now). I guess I'll backtrack now and see if I 
can get "each" working.  If not, I'll use an old loop.

-- 
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 

Java Version on CentOS 7.2

2016-11-16 Thread Aaron K
Is OpenJDK 1.8 supported on CentOS 7.2?  

We're installing with sudo yum install -y java-1.8.0-openjdk

Is there a Java compatibility list somewhere for Jenkins that I can 
reference?

-- 
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/826c7cd8-abbe-4d34-b42a-ced3f57e4827%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RHEL slave

2016-11-16 Thread Peter Berghold
Got it working finally.  Put the SSH slaves plugin on the master, added
some credentials and from there it worked great.

Thanks to all that replied to my original thread

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


Re: Reset password on accounts.jenkins.io , but password not recognised on issues.jenkins-ci.org

2016-11-16 Thread Baptiste Mathus
Hello, please either better use the INFRA ML or the #jenkins-infra IRC
channel for possibly more live interactions if needed (and if the time
matches the TZ of the main admin, hint: San Francisco TZ :))

2016-11-15 11:45 GMT+01:00 Asfand Yar Qazi :

> Hi,
>
> Can anyone help me with this, or direct me to someone who can?
>
> Thanks
>
> On Monday, 14 November 2016 17:01:01 UTC, Asfand Yar Qazi wrote:
>>
>> Hello,
>>
>> I have an old account on jenkins-ci.org . I tried resetting the
>> password, was redirected to jenkins.io , where I successfully changed my
>> password.
>>
>> However, when I now try to log in at issues.jenkins-ci.org , I get a
>> password incorrect error.
>>
>> Can someone help me with this?
>>
>> 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/7520567b-392c-4b3f-a075-af4a274b81d6%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/CANWgJS7U-LxCprs0kaLqr92CVMaCTWHFZ%2BRz4LXyVPng%2BmBpXg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Re-8: Copy files from remote Jenkins workspace

2016-11-16 Thread Baptiste Mathus
Hello Jovan,

Thank you very much for your help in general. It's much appreciated.
Could you please see to configure your mailer so that it does not change
the subject by prefixing it by "Re'-" and the email number or something? I
does create a new thread locally in Gmail for me, so I guess I'm not the
same (though the WebUI of the googlegroups seems to handle that).

Thank you

2016-11-15 7:21 GMT+01:00 Jovan Jevric :

> Workspace per definition is space you gave jenkins to store all the builds
> executed on master. If you run 50 Jobs from JobA all builds including
> artefacts will be stored on master. So you'll run out of memory defenitelly
> if you don't care about housekeepings. Local workspace you mean is
> workspace acquired on jenkins slave for a job execution. Keep on working on
> your basics dude;-)
>
>
> Don't archive artefacts and get the artefacts from slave on your own. On
> that way none artefacts are put on your master machine. But keep in mind,
> that none artefacts can be accessed in your job history if not archived.
>
> Cheers
>
>
>
> Original Message processed by david®
>
> *Re: Re-6: Copy files from remote Jenkins workspace* (14-Nov-2016 12:41)
> *From:*   Eran Yanay 
> *To:*
> jenkinsci-users@googlegroups.com
>
> My workspace is already very slim, because I override it for every build.
> So I dont really have any housekeeping, as each build only stores
> information like console output, and since all my work is done inside the
> workspace, I never go out of space.
> If I now make artifacts of my workspace for every build, Is it possible to
> remove only the artifact once its downloaded to my master node?
>
> On Mon, Nov 14, 2016 at 12:14 PM, Jovan Jevric 
> wrote:
>
>> You'll have to do some housekeeping anywayOtherwise you'll run out of
>> memory very fast.
>> By archiving all the artefacts generated(mainly needed for release steps
>> or similar) on your own you'll be able to keep your jenkins workspace very
>> slim. This is an advantage and practicable.
>>
>> Keeping Console Output by simply archiving is possible. I do so on the
>> following way:
>> -Use Log Parser Plugin which generates a Log.txt or similar in your
>> project on slave workspace and include it as post build step('Console
>> output(build log)parsing')
>> -Get your Console Output from slaves by scp/ssh or similar e.g.
>>
>>
>>
>> Original Message processed by david®
>>
>> *Re: Re-4: Copy files from remote Jenkins workspace* (14-Nov-2016 10:41)
>> *From:*   Eran Yanay 
>> *To:*
>> jenkinsci-users@googlegroups.com
>>
>> Discarding older builds means it discards my console output of these
>> builds as well, I wish to keep it.
>>
>> On Mon, Nov 14, 2016 at 11:40 AM, Jovan Jevric 
>> wrote:
>>
>>> Do archive the artefacts elsewhere by running a post-build job, as you
>>> proposed. And simply parametrize your job that way, that elder jobs on your
>>> host are being deleted automatically. In other words - simply discard old
>>> builds, doing that is very simple.
>>>
>>>
>>>
>>>
>>> Original Message processed by david®
>>>
>>> *Re: Re-2: Copy files from remote Jenkins workspace* (14-Nov-2016 10:15)
>>> *From:*   buddy123 
>>> *To:*
>>> Jenkins Users 
>>>
>>> I'll look into pipeline, though it seems very complicated.
>>> Regarding artifacts, I've thought about it, but I cant figure out how to
>>> delete the artifacts once I finished the job, otherwise my disk space will
>>> get empty very quickly.
>>> Is it possilble to mark files as artifacts, pull them from slave, and
>>> then erase them?
>>> I want to keep the console output of every build though, just dont care
>>> about the artifacts because I store them elsewhere
>>>
>>>
>>> On Monday, November 14, 2016 at 11:12:08 AM UTC+2, jje wrote:

 What about archiving artefacts. On that way all output marked as
 artefacts could be found on master so far, couldn't it?



 Original Message processed by david®

 *Re: Copy files from remote Jenkins workspace* (13-Nov-2016 15:39)
 *From:*   Baptiste Mathus
 *To:*
 jenkins...@googlegroups.com

 Look for pipeline jobs. Might be far easier to achieve that.


 https://jenkins.io/pipeline/getting-started-pipelines/[jenkins.io]
 


 2016-11-13 11:23 GMT+01:00 buddy123 :

>
> down votefavorite[stackoverflow.com]
> 

Re: facing issue to connect jenkins to bitbucket

2016-11-16 Thread sai tharun neleballi
Yes, I am able to checkout that repo to my local mission using tortoise git

On Wednesday, November 16, 2016 at 11:07:20 AM UTC-7, Paxton, Darren wrote:
>
> ERROR: Timeout after 10 minutes
>
>  
>
> Seems pretty clear – have you manually checked you’re able to check out 
> that repository from your location?
>
> *From:* jenkins...@googlegroups.com  [mailto:
> jenkins...@googlegroups.com ] *On Behalf Of *sai tharun 
> neleballi
> *Sent:* 16 November 2016 18:03
> *To:* Jenkins Users
> *Subject:* facing issue to connect jenkins to bitbucket
>
>  
>
> Hi,
>
>  
>
> I am not able to resolve this issue I have no idea what I have done wrong, 
> can anyone please help me regarding this issue. I have attached the error 
> message in the attachment.
>
> -- 
> 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/53d26edd-db05-4906-a253-c48d904e6080%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/e08aaa3d-ef7b-4a27-83bc-6801be90c5a4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: facing issue to connect jenkins to bitbucket

2016-11-16 Thread sai tharun neleballi
What should I change to clear that error, In my other laptop it is showing
timeout 10 as minutes but there it is working fine

On Wed, Nov 16, 2016 at 11:06 AM, Paxton, Darren 
wrote:

> ERROR: Timeout after 10 minutes
>
>
>
> Seems pretty clear – have you manually checked you’re able to check out
> that repository from your location?
>
> *From:* jenkinsci-users@googlegroups.com [mailto:jenkinsci-users@
> googlegroups.com] *On Behalf Of *sai tharun neleballi
> *Sent:* 16 November 2016 18:03
> *To:* Jenkins Users
> *Subject:* facing issue to connect jenkins to bitbucket
>
>
>
> Hi,
>
>
>
> I am not able to resolve this issue I have no idea what I have done wrong,
> can anyone please help me regarding this issue. I have attached the error
> message in the attachment.
>
> --
> 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/53d26edd-db05-4906-a253-c48d904e6080%40googlegroups.
> com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Jenkins Users" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/jenkinsci-users/DPzwOwSwQN0/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jenkinsci-users/6f94c716328c4a1197405ef6b3675e
> 77%40GBBED11XG20CN04.mercer.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Thanks & Regards,
Sai Tharun

-- 
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/CAKnoas5cHdq%2B0ZojuUKSWQRwTW2JTimCs5-9%3DavTwfr_qRVDmw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


RE: facing issue to connect jenkins to bitbucket

2016-11-16 Thread Paxton, Darren
ERROR: Timeout after 10 minutes

Seems pretty clear – have you manually checked you’re able to check out that 
repository from your location?
From: jenkinsci-users@googlegroups.com 
[mailto:jenkinsci-users@googlegroups.com] On Behalf Of sai tharun neleballi
Sent: 16 November 2016 18:03
To: Jenkins Users
Subject: facing issue to connect jenkins to bitbucket

Hi,

I am not able to resolve this issue I have no idea what I have done wrong, can 
anyone please help me regarding this issue. I have attached the error message 
in the attachment.
--
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/53d26edd-db05-4906-a253-c48d904e6080%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/6f94c716328c4a1197405ef6b3675e77%40GBBED11XG20CN04.mercer.com.
For more options, visit https://groups.google.com/d/optout.


facing issue to connect jenkins to bitbucket

2016-11-16 Thread sai tharun neleballi
Hi,

I am not able to resolve this issue I have no idea what I have done wrong, 
can anyone please help me regarding this issue. I have attached the error 
message in the attachment.

-- 
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/53d26edd-db05-4906-a253-c48d904e6080%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Building in workspace C:\Program Files (x86)\Jenkins\workspace\test
 > git.exe rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git.exe config remote.origin.url 
 > https://saitharu...@bitbucket.org/mmanche_bitbucket/winzonepoc.git # 
 > timeout=10
Fetching upstream changes from 
https://saitharu...@bitbucket.org/mmanche_bitbucket/winzonepoc.git
 > git.exe --version # timeout=10
using GIT_ASKPASS to set credentials 
 > git.exe fetch --tags --progress 
 > https://saitharu...@bitbucket.org/mmanche_bitbucket/winzonepoc.git 
 > +refs/heads/*:refs/remotes/origin/*
ERROR: Timeout after 10 minutes
ERROR: Error fetching remote repo 'origin'
hudson.plugins.git.GitException: Failed to fetch from 
https://saitharu...@bitbucket.org/mmanche_bitbucket/winzonepoc.git
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:797)
at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1051)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1082)
at hudson.scm.SCM.checkout(SCM.java:495)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1278)
at 
hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
at 
hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
at hudson.model.Run.execute(Run.java:1728)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:404)
Caused by: hudson.plugins.git.GitException: Command "git.exe fetch --tags 
--progress https://saitharu...@bitbucket.org/mmanche_bitbucket/winzonepoc.git 
+refs/heads/*:refs/remotes/origin/*" returned status code -1:
stdout: 
stderr: 
at 
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1752)
at 
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1495)
at 
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:64)
at 
org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:315)
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:795)
... 11 more
ERROR: null
Finished: FAILURE

-- 


Confused about unexpected path through Jenkinsfile

2016-11-16 Thread David Karr
Using Jenkins 2.19.2 on Linux.

I'm perplexed by the behavior of my Jenkinsfile, or at least what it's 
reporting to me.  I had it basically working, but then I added some simple 
additional lines to gather some additional information, and now it somehow 
just stops executing the script at some point, without any explanation or 
stack trace.

The following is the method called from a catch block in a stage where I 
first start to see a problem:
@NonCPS
def notifyFailure(String stageName) {
println 
"result[${currentBuild.rawBuild.getPreviousBuild()?.getResult()}]"
println "SUCCESS[${hudson.model.Result.SUCCESS}]"
println "was.SUCCESS[${hudson.model.Result.SUCCESS == 
currentBuild.rawBuild.getPreviousBuild()?.getResult()}]"
try {
println "About to call bFNMT."
Stringbody= buildFailureNotificationMessageText(stageName)
println "Returned from bFNMT."
println "body[${body}]"
}
catch (err) {
err.printStackTrace()
}
try {
String emailAddressesStr = getLastCommitsEmails()
println "emailAddressesStr[${emailAddressesStr}]"
}
catch (err) {
err.printStackTrace
}
def emailAddressesList = emailAddressesStr.split(",")
println "emailAddressesList[${emailAddressesList}]"
emailAddressesList.each { address -> println "address[${address}]" }
def uidsList = emailAddressesList.collect { address -> address.split("@"
)[0] }
println "uidsList[${uidsList}]"
sendQMessageToUsers(["dk068x"], body)
emailext body:body.replaceAll('\\n', ''),
 mimeType:'text/html',
 subject: 'BUILD FAILURE - ' + env.JOB_NAME,
 to: 'dk0...@att.com'
}

The following is the tail of the console output, starting at the first 
println in this method:
result[FAILURE]
[Pipeline] echo
SUCCESS[SUCCESS]
[Pipeline] echo
was.SUCCESS[false]
[Pipeline] echo
About to call bFNMT.
[Pipeline] echo
In bFNMT.
[Pipeline] echo
job[unified-service-layer-build-pipeline] stageName[DEPLOY] bu[http:...]
[Pipeline] echo
In gLCT.
[Pipeline] sh
[workspace] Running shell script
+ git log -5 --date=short '--pretty=format:%cN: %cd : %s'
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
[DOSSIER] Response Code: 0
[DOSSIER] Backup file created: /home/jenkins/...
[DOSSIER] Seconds to input data: 0
ERROR: script returned exit code 1
Finished: FAILURE

Here are the two other relevant methods that are called in this sequence:
@NonCPS
def buildFailureNotificationMessageText(String stageName) {
println "In bFNMT."
println "job[${env.JOB_NAME}] stageName[${stageName}] 
bu[${env.BUILD_URL}]"
def result = "${env.JOB_NAME} FAILED 
(stage ${stageName}).\n" +
 "\n" +
 "Last commits:\n" +
 getLastCommitsText() + "\n" +
 "\n" +
 env.BUILD_URL
   
println "At end of bFNMT."
return result
}

@NonCPS
def getLastCommitsText() {
println "In gLCT."
def result= sh(returnStdout:true, script:'git log -5 --date=short 
--pretty=format:"%cN: %cd : %s"')
println "At end of gLCT."
return result
}

If you look at the console output, you'll see it printed "In gLCT" and then 
it shows the "git log" command line. Then, it just seems to skip the rest 
of the flow and jump to the end of the stage and node.

Also note that this is the "DEPLOY" stage. There was a "BUILD" stage before 
this, that executed similar methods.  It also executed a method that 
executed a "git log" command line, and in the console output I saw the 
first "In ..." message, then the "Running shell script" message followed by 
the "+ git log ..." line, and then just like in the "DEPLOY" stage, it just 
skipped to the end of the stage.  In this case, it went onto the "DEPLOY" 
stage, so this "skipping" behavior didn't cause a failure.

I'm at a loss to understand what this is doing 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/8d2b23ac-e753-448c-a030-d7554eb8fa7a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Start up Jenkins from another Windows User Account

2016-11-16 Thread jerome
my Jenkins managed part is as follow:

Home Directory: c:\Jenkins
Workspace RootDirectory: d:/JenkinsWorkspace/${ITEM_FULL_NAME}
Build Record Root Directory: ${ITEM_ROOTDIR}/builds

Assuming the above:
Your jobs info should be locate into C:/Jenkins/jobs
The system no matter what should them from this emplacement, make sure this 
folder is accessible by both user. This is THE folder with the jobs 
configuration and settings. It also contain the jobs results. I 
successfully exported those and restore them into another Jenkins.

You may want to check the log just to make sure that nothing went wrong 
with plugin version, etc...
jenkins.err.log
jenkins.out.log

I always use the service, I changed the user of the service. So I always 
use the jenkins.xml to start the wars, your args seem to be right, the only 
thing I see into the file that may change something is the env setting:

My guess is that you need to do the equivalent into your batch file. maybe 
make sure the env is set properly. Try to print both user environment to 
see the difference. But make sure to set this variables into the 
environment before launching:

set JENKINS_HOME="c:\Jenkins"
"C:\Program Files\Java\jre1.8.0_102\bin\java" -Xmx3048m -mx1024m -jar 
${JENKINS_HOME}\jenkins.war

Not sure it will change anythiong but worth the try.


-- 
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/fb14da6d-b3e3-49f6-af3e-7d9e8a850b9a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Crafting a plugin for Jenkins

2016-11-16 Thread Peter Berghold
One of the tasks I've assigned to Jenkins is managing packages for release
to the test environment and to the production environment (two tasks?).  I
do this by creating two file trees for the packages to live in called "qa"
and "released" with their purpose being rather intuitive.   If the package
tree is being sent to the testing environment qa and released are merged
and then RSync'ed to the test environment and for production releases just
the released tree is tar-ed up and made available to operations.

I say all that to say this:  I know how to write Java code to handle file
uploads and subsequent storage in a file tree.  I've looked at a few
tutorials on writing Jenkins plugins.  What I haven't seen in my random
wanderings around is an example that would become a menu item in the left
had menu bar and manage the UI.

Is there something in github or elsewhere that I could look at that would
do something similar to what I'm after?   From a decent starting place I
can figure out the rest.

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


Re: Jenkins and the IBM i Series

2016-11-16 Thread Phil Craig
Hi Allen,

I'm working on the same thing but not making much progress. I have the IBMi 
box defined as a slave node on our Jenkins server and have 
-Dfile.encoding=ISO8859_1 and -text defined on the slave jar startup config 
but I still get garbage (presumably ebcdic chars) back in the console log.

Have you got any further than this?

Phil

On Friday, 21 October 2016 20:38:52 UTC+1, Allen Fisher wrote:
>
> Hello Everyone—
>
>  
>
> I’ve been brought in to work on build processes in a very specialized 
> environment. We make software for the IBM iSeries which has Windows 
> components and iSeries components. Has anyone out there used Jenkins to 
> drive processes on the iSeries? I’ve not had much luck finding anything. 
> I’m completely fine blazing a new trail, but I’d rather check first and see 
> if anyone’s working in this sort of environment.
>
>  
>
> Thanks!
>
>  
>
> Allen
>
>  
>
> [image: 
> http://static.helpsystems.com/hs/email/templates/signatures-final/images/hs-logo2.png]
>
> Allen Fisher 
> Build and Release Engineer
>
> e. allen@helpsystems.com  
> w. www.helpsystems.com
>
> [image: 
> http://static.helpsystems.com/hs/email/templates/signatures-final/images/social-linkedin.jpg]
>  
>  [image: 
> http://static.helpsystems.com/hs/email/templates/signatures-final/images/social-twitter.jpg]
>  
> 
>
>  
>
>  
>

-- 
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/b874d43b-c480-43b2-8f8b-1d4ba1aaa117%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Jenkins job termination needs serious engineering help

2016-11-16 Thread Rinaldo DiGiorgio
It has been over a year of dealing with Job termination in jenkins 
requiring one to find an html link in a console output file that is 
scrolling at a very fast rate. It is mind boggling that an action like that 
is not sent to some queue in a reasonable interface for someone to act on. 
 Let's not even discuss it is using a javascript dialog which give you no 
additional information.


-- 
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/22d01ce2-9c1c-4607-80da-daf22609a0ba%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: jenkins2 Perform release error svn: E230001

2016-11-16 Thread Nicolas M
Hi,

I think that you must accept the certificate permanently by running an svn 
command-line client.
Under Windows, you might have to copy paste the files generated in 
C:\Users\yourUser\AppData\Roaming\Subversion\auth to the directory of the 
user running Jenkins.
By default, Jenkins runs with the system user 
(C:\Windows\System32\config\systemprofile\AppData\Roaming\Subversion\auth)


Le mardi 8 novembre 2016 22:03:22 UTC+1, Philippe Couas a écrit :
>
> Hi,
>
> I have following error message on jenkins2 only when i made an 
> perform-release, no problem on build.
>
> l'erreur est
> [code]
> Command output:
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-release-plugin:2.5.2:prepare (default-cli) 
> on project YYY: Unable to commit files
> [ERROR] Provider message:
> [ERROR] The svn command failed.
> [ERROR] Command output:
> svn: E170013: Commit failed (details follow):
> svn: E170013: Unable to connect to a repository at URL '
> https://zz.com:8443/svn/XXX/YYY/trunk'
> svn: E230001: Server SSL certificate verification failed: certificate 
> issued for a different hostname, issuer is not trusted
>
>
> at 
> org.apache.maven.shared.release.phase.AbstractScmCommitPhase.checkin(AbstractScmCommitPhase.java:165)
> at 
> org.apache.maven.shared.release.phase.AbstractScmCommitPhase.performCheckins(AbstractScmCommitPhase.java:145)
> at 
> org.apache.maven.shared.release.phase.ScmCommitPreparationPhase.runLogic(ScmCommitPreparationPhase.java:76)
> at 
> org.apache.maven.shared.release.phase.AbstractScmCommitPhase.execute(AbstractScmCommitPhase.java:78)
> at 
> org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:234)
> at 
> org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:169)
> at 
> org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:146)
> at 
> org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:107)
> at 
> org.apache.maven.plugins.release.PrepareReleaseMojo.prepareRelease(PrepareReleaseMojo.java:286)
>
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute 
> goal org.apache.maven.plugins:maven-release-plugin:2.5.2:prepare 
> (default-cli) on project YYY: Unable to commit files
> Provider message:
> The svn command failed.
>
>
> [/code]
> I have tried without succes
> - 1 delete directory "Subversion/auth" p
> - 2 command "svn list" without problem, but NOT perform-release jenkins2 ??
> [code]
> svn list https://zz.com:8443/svn/XXX/YYY/trunk
> [/code]
>
> On Jenkins2 perform command :
> [code]
> Release goals and options : -Dresume=false release:prepare release:perform
> DryRun goals and options: -Dresume=false -DdryRun=true release:prepare
> [/code]
>
> POM
> [code]
> http://maven.apache.org/POM/4.0.0; xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation="
> http://maven.apache.org/POM/4.0.0 
> http://maven.apache.org/xsd/maven-4.0.0.xsd;>
> 4.0.0
> fr.toto.receive
> receiveMail
> jar
> receive
> 1.0.0-SNAPSHOT
> Reception Email
>
>
> scm:svn:https://zz.com:8443/svn/XXX/YYY/trunk
> 
> scm:svn:https://zz.com:8443/svn/XXX/YYY/trunk
> 
>   https://zz.com:8443/svn/XXX/YYY/trunk
> 
>
> 
> src
> 
>
> 
> ${src.dir}
> 
> 
> 
> org.apache.maven.plugins
> maven-compiler-plugin
> 3.6.0
> 
> 1.7
> 1.7
> 
> 
> 
> org.apache.maven.plugins
> maven-jar-plugin
> 3.0.2
> 
> ReceiveMail   
> 
> 
>
> 
> 
> 
> 
>   maven-release-plugin
> 2.5.2
>
>   
> org.sonarsource.scanner.maven
> sonar-maven-plugin
> 3.1.1
>   
> 
>   
> 
> 
> 
> org.apache.maven.plugins
> maven-clean-plugin
> 3.0.0
> 
> 
> javax.activation
> activation
> 1.1.1
> jar 
> provided
> 
> 
> commons-codec
> commons-codec
> 1.8
> jar 
> provided
> 
> 
>dnsjava
> dnsjava
>2.1.1
>jar 
> provided
> 
> 
>net.sourceforge.htmlcleaner
> htmlcleaner
> 2.10
> jar 
> provided
> 
> 
> javax.mail
> mail
> 1.4
> 
>  

Re: Creating groovy script to configure slave node properties >> "Restrict jobs execution at node"

2016-11-16 Thread chowhan . adi
Hi All 
>
> i am also trying to achieve the similar thing where will be passing the 
parameters as string in Jenkins so  In the above solution tried to modify 
to my requirement as i wanted to add "new SSHLauncher("172.17.1.55",22,
"root","root","","","","",""),"
but it fails to find the class could some share your thoughts

Thanks in advance 
Aditya

/**
 * This script is meant to be executed by a parameterized job in Jenkins 
and will then create new agents (slaves) as per the parameters
 *
 * SUGGESTED PAIRED PARAMETERS IN JENKINS (type, name, default values, 
description):
 *
 * Text - AgentList - "TestAutoAgent" - Name of agents to create, 
optionally more than one (each line makes one agent)
 * String - AgentDescription - "Auto-created Jenkins agent" - Description 
that'll be set for _every_ created agent
 * String - AgentHome - "D:\JenkinsAgent" - Remote filesystem root for the 
agent
 * String - AgentExecutors - 2 - Number of executors for the agent
 */

import hudson.model.Node.Mode
import hudson.slaves.*
import jenkins.model.Jenkins
import hudson.plugins.sshslaves.*
import java.util.List;
/*
//Handy debug logging
Jenkins.instance.nodes.each {
println "BEFORE - Agent: $it"
}
*/

// The "build" object is added by the Jenkins Groovy plugin and can resolve 
parameters and such
String agentList = build.buildVariableResolver.resolve('AgentList')
String agentDescription = 
build.buildVariableResolver.resolve('AgentDescription')
String agentHome = build.buildVariableResolver.resolve('AgentHome')
String agentExecutors = 
build.buildVariableResolver.resolve('AgentExecutors')

agentList.eachLine {

// There is a constructor that also takes a list of properties (env 
vars) at the end, but haven't needed that yet
DumbSlave dumb = new DumbSlave(it,  // Agent name, usually matches the 
host computer's machine name
agentDescription,   // Agent description
agentHome,  // Workspace on the agent's computer
agentExecutors, // Number of executors
Mode.NORMAL,// "Usage" field, EXCLUSIVE is 
"only tied to node", NORMAL is "any"
"", // Labels
new SSHLauncher(),
RetentionStrategy.INSTANCE) // Is the "Availability" field and 
INSTANCE means "Always"

Jenkins.instance.addNode(dumb)
println "Agent '$it' created with $agentExecutors executors and home 
'$agentHome'"
}

/*
Jenkins.instance.nodes.each {
println "AFTER - Agent: $it"
}
*/

-- 
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/7f31cf34-a941-4e57-9c67-84d6f691e996%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.