Looking for advice on node level metadata

2019-02-01 Thread Adam von Nieda

   Hi folks,

   I’m wanting to make available to pipelines detailed metadata about what 
resides on specific nodes, in terms of applications, path names etc. Some 
nodes may have multiple applications on them, so I need to be able to loop 
through the application metadata on a node. If I were to visualize it in 
JSON, it would look something like below. At first I thought maybe node 
level environmental variables would be the way to go, but that makes it 
kind of ugly for nodes with multiple apps. I’ve kind of settled on using 
readJSON I’n my pipelines to get the metadata. Is there a better way to do 
this? 

   Thanks!

{ 
  “nodes": [{
"Hostname": hostname1.domain.com",
  "Applications": {
"DEVL": {
  "ApplUser": "appldevl",
  "OraUser": "oradevl",
  "OracleHome": "/findevdb/DEVL/db/tech_st/12.1.0",
  "StartScript": "/opt/app/oracle/startup_scripts/start_devl.sh",
  "StartScriptUser": "root",
  "StopScript": "/opt/app/oracle/startup_scripts/start_devl.sh",
  "StopScriptUser": "root"
},
"PTCH": {
  "ApplUser": "applptch",
  "OraUser": "oraptch",
  "OracleHome": "/findevdb/PTCH/db/tech_st/12.1.0",
  "StartScript": "/opt/app/oracle/startup_scripts/start_ptch.sh",
  "StartScriptUser": "root",
  "StopScript": "/opt/app/oracle/startup_scripts/start_ptch.sh",
  "StopScriptUser": "root"
}
  }
},
{
"Hostname": "hostname2.domain.com",
  "Applications": {
"TEST": {
  "ApplUser": "appltest",
"OraUser": "oratest",
"OracleHome": "/fintestdb/TEST/db/tech_st/12.1.0",
"StartScript": "/opt/app/oracle/startup_scripts/start_test.sh",
"StartScriptUser": "root",
"StopScript": "/opt/app/oracle/startup_scripts/stop_test.sh",
"StopScriptUser": "root"
  },
"QUAL": {
  "ApplUser": "applqual",
  "OraUser": "oraqual",
  "OracleHome": "/fintestdb/QUAL/db/tech_st/12.1.0",
  "StartScript": "/opt/app/oracle/startup_scripts/start_qual.sh",
  "StartScriptUser": "root",
  "StopScript": "/opt/app/oracle/startup_scripts/stop_qual.sh",
   "StopScriptUser": "root"
}
  }
}
  ]
}

-- 
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/69feb907-031d-4dfc-832f-159082d70905%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How can I access the Jenkins build console log from postbuild email section of Jenkins job

2019-01-11 Thread Adam von Nieda

   Use “Editable Email Notification” and choose “Attach build log” from the 
selector at the bottom. 

--
Adam vonNieda
a...@vonnieda.org




> On Jan 11, 2019, at 4:06 PM, RAJENDRA PRASAD  
> wrote:
> 
> Hi all,
> I am trying to setup a mail notification in Jenkins  and mail should have 
> console log of the build /job.
> 
> How  can I access the Jenkins build console  log from postbuild email section 
> of Jenkins job?
> 
> Thanks in Advance,
> Rajendra
> 
> -- 
> 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/CAMrg02Sz%2BSwgpir-CPp1X7RPz3feMVY2dJborh7BwOW-2masAg%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/C6721F20-487F-4C7E-894A-AD2EAD2E134B%40vonnieda.org.
For more options, visit https://groups.google.com/d/optout.


Re: How to copy all the Jenkins jobs config.xmls with folder names and excluding other jobs related files in single shell command?

2019-01-11 Thread Adam von Nieda

Here’s a few examples, all run from $JENKINS_HOME/jobs

#!/bin/bash

export JENKINS_HOME=/opt/jenkins

cd $JENKINS_HOME/jobs

#
# Copy directory and config.xml to /tmp
#
find . -name config.xml -exec ls {} \; | while read dir_file
do
   cp --parents $dir_file /tmp
done

#
# tar up directories and config.xml
#
find . -name config.xml -exec ls {} \; | xargs tar cvf backup.tar

#
# Copy directories and config.xml only to remote server
#
find . -name config.xml -exec ls {} \; | xargs tar cf - | ssh user@remotehost 
"cd /jenkins_home/jobs;tar xvf -"

--
Adam vonNieda
a...@vonnieda.org




> On Jan 11, 2019, at 4:02 PM, RAJENDRA PRASAD  
> wrote:
> 
> Hi all,
> I am trying to implement Jenkins jobs backup on existing Jenkins instance and 
> restore on new jenkins server mechanism.
> 
> For that I need to copy/backup all the jobs from each jenkins instance .
> 
> I am using Linux OS and I need to use shell command for that.
> 
> Can anybody help me in with shell command that can only copy job folder name 
> and its config.xml file alone for each job recursively.
> 
> Thanks,
> Rajendra
> 
> 
> 
> -- 
> 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/CAMrg02RZiNdom2ZQBeOjN5iqgBm2jV3L00mU7279KghF17YU4Q%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/B139107B-51D3-444C-A919-8661BCEC99A8%40vonnieda.org.
For more options, visit https://groups.google.com/d/optout.


Re: How to take a backup of specific project in jenkins workspaces after successfull / failed build ?

2018-12-25 Thread Adam von Nieda

   If you want to back up the project XML file, (assuming Linux), you could do 
a script step like this. You should be able to extend this after you get the 
idea. 

config_file="$JENKINS_HOME/jobs/$JOB_NAME/config.xml"
cp $config_file $config_file.`date +'%F_%H_%M_%S’`

   Or something like
cp $config_file /some/backup/dir/config.xml.`date +'%F_%H_%M_%S’`


--
Adam vonNieda
a...@vonnieda.org




> On Dec 24, 2018, at 9:52 PM, Poovaraj Thangamariappan 
>  wrote:
> 
> Hi,
> 
> I want to take a backup of specific project in jenkins workspaces after 
> successfull / failed every build ? Plesae let me know how to take a backup ?
> 
> Regards,
> Poovaraj
> 
> -- 
> 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/ac4611ca-b620-4ab4-9fa8-00f610134a77%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/163208D1-B4FE-4547-A147-68E8B51C2275%40vonnieda.org.
For more options, visit https://groups.google.com/d/optout.


Re: How to attach a file in email after build successful in Jenkins?

2018-12-24 Thread Adam von Nieda

   Choose “Editable email notification” as a post-build action. It has an input 
box for specifying attachments, and has the following text below it. 

   Can use wildcards like 'module/dist/**/*.zip'. See the @includes of Ant 
fileset  for the exact format. 
The base directory is the workspace 
.

--
Adam vonNieda
a...@vonnieda.org




> On Dec 24, 2018, at 7:31 AM, Poovaraj Thangamariappan 
>  wrote:
> 
> Hi,
> 
> I want to attach a file in email after successful build in Jenkins. Please 
> let me know how to a file in email using Jenkins email configuration ?
> 
> -- 
> 
> Regards,
> Poovaraj
> 
> 
> 
> -- 
> 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/CAMu9-ZWBc%2BbsFKoNJvMN_itV7rm3tM%3DhCL11Lq5hdDw5GAXw3g%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/728979CF-BF7F-4FC2-B3FE-0E7D176E94EF%40vonnieda.org.
For more options, visit https://groups.google.com/d/optout.


Strange mismatched quote problem trying to run a shell command from script console

2018-12-20 Thread Adam von Nieda

   Hi folks,

   I’m trying to run a local shell command from the script console, and a 
mismatched quote error is kicking my butt. The entire command is surrounded by 
double quotes, and the command executed from the “-c” is surrounded by single 
quotes. There’s not a typo, I swear! Any ideas? The strange this is that it 
only seems to happen if there’s multiple items separated by spaces in the 
single quotes. If I do a single executable like ‘ls’, that works fine. 

import hudson.util.RemotingDiagnostics
import jenkins.model.Jenkins

def String target_database = "testdb"
def String version = "7.6.5.4"

def sout = new StringBuffer(), serr = new StringBuffer()
def proc = "sudo su oracle -c 
'/home/oracle/scripts/datapump/refresh_database.sh ${target_database} 
${version}'".execute()

proc.consumeProcessOutput(sout, serr)
proc.waitForOrKill(1000)
println "STDOUT\n $sout"
println "STDERR\n $serr"

STDOUT
 
STDERR
 testdb: -c: line 0: unexpected EOF while looking for matching `''
testdb: -c: line 1: syntax error: unexpected end of file


-- 
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/B83C39DA-406A-460E-BF45-4AA9E7F70C56%40vonnieda.org.
For more options, visit https://groups.google.com/d/optout.


Re: Can you specify a host / agent for a single build step in a freestyle project?

2018-12-07 Thread Adam von Nieda

   Thanks for the reply Eric, yeah that’s a workaround I could try. I was 
hoping there was some plugin that I hadn’t been able to find that made it 
simple, but I guess not. 

   Best regards,

  -Adam 

--
Adam vonNieda
a...@vonnieda.org




> On Dec 7, 2018, at 8:12 AM, Eric Pyle  wrote:
> 
> This isn't exactly what you asked, but you could:
> 1. Break up each step into its own freestyle job, and give each of those 
> sub-jobs a parameter of type Node or Label.
> 2. In the main job, call each sub-job using the build step "Trigger/call 
> builds on other projects", passing the desired agent as a parameter. You 
> could also pass "Current build parameters" or environment variables to give 
> the build step what it needs.
> 
> -Eric
> 
> On 12/6/2018 6:52 PM, Adam von Nieda wrote:
>> 
>>   Thanks very much for the reply Jan, I’m aware of being able to do this 
>> with a pipeline. I’ll ask again in case anyone else wants to respond. By the 
>> way, a freestyle project is not necessarily isolated to a single node, you 
>> can specify labels or individual servers using the NodeLabel plugin. That’s 
>> different from what I’m asking below though.  
>> 
>> 
>> I’m able to split parts of a build across multiple nodes using a pipeline, 
>> is there any way to do that with a freestyle project? Maybe a plugin I 
>> haven’t run across? 
>> 
>> For example, my project might look like the following..
>> 
>> Step1: Execute on node 2
>> Step 2: Execute on node 3
>> Step 3: Execute on node 1
>> Step 4: Execute on node 2
>> 
>>   I have steps that have to run on specific nodes. 
>> 
>>   Thanks for any insight you might have!
>> 
>> --
>> Adam vonNieda
>> a...@vonnieda.org <mailto:a...@vonnieda.org>
>> 
>> 
>> 
>> 
>>> On Dec 6, 2018, at 5:22 PM, Jan Monterrubio >> <mailto:janmonterru...@gmail.com>> wrote:
>>> 
>>> I think a declarative pipeline might be able to accomplish this with the 
>>> “agent” closure. 
>>> 
>>> Iirc the free style project will run all in a single node. 
>>> 
>>> On Thu, Dec 6, 2018 at 16:06 Adam von Nieda >> <mailto:a...@vonnieda.org>> wrote:
>>> 
>>>Hi folks,
>>> 
>>>I’m able to split parts of a build across multiple nodes using a 
>>> pipeline, is there any way to do that with a freestyle project? Maybe a 
>>> plugin I haven’t run across? 
>>> 
>>> For example, my project might look like the following..
>>> 
>>> Step1: Execute on node 2
>>> Step 2: Execute on node 3
>>> Step 3: Execute on node 1
>>> Step 4: Execute on node 2
>>> 
>>>I have steps that have to run on specific nodes. 
>>> 
>>>Thanks for any insight you might have!
>>> 
>>>-Adam vonNieda
>>> 
>>> -- 
>>> 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 
>>> <mailto:jenkinsci-users%2bunsubscr...@googlegroups.com>.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/jenkinsci-users/A6478625-CB00-49F8-9602-DE745B034D3E%40vonnieda.org
>>>  
>>> <https://groups.google.com/d/msgid/jenkinsci-users/A6478625-CB00-49F8-9602-DE745B034D3E%40vonnieda.org>.
>>> For more options, visit https://groups.google.com/d/optout 
>>> <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 
>>> <mailto:jenkinsci-users+unsubscr...@googlegroups.com>.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/jenkinsci-users/CADgiF9JvTROpgoCrK6SMr%2BBFfuLCZb%3D_4WfxoyaT3NwMTbzi6Q%40mail.gmail.com
>>>  
>>> <https://groups.google.com/d/msgid/jenkinsci-users/CADgiF9JvTROpgoCrK6SMr%2BBFfuLCZb%3D_4WfxoyaT3NwMTbzi6Q%40mail.gmail.com?utm_medium=email_source=footer>.
>>> For more options, visit https://groups.google.com/d/optout 
>>> <https://groups.google.com/d/optout>.
>> 
>> -- 
>> You received this message because you are subscribed to the Google Groups

Re: Can you specify a host / agent for a single build step in a freestyle project?

2018-12-06 Thread Adam von Nieda

  Thanks very much for the reply Jan, I’m aware of being able to do this with a 
pipeline. I’ll ask again in case anyone else wants to respond. By the way, a 
freestyle project is not necessarily isolated to a single node, you can specify 
labels or individual servers using the NodeLabel plugin. That’s different from 
what I’m asking below though.  


I’m able to split parts of a build across multiple nodes using a pipeline, is 
there any way to do that with a freestyle project? Maybe a plugin I haven’t run 
across? 

For example, my project might look like the following..

Step1: Execute on node 2
Step 2: Execute on node 3
Step 3: Execute on node 1
Step 4: Execute on node 2

  I have steps that have to run on specific nodes. 

  Thanks for any insight you might have!

--
Adam vonNieda
a...@vonnieda.org




> On Dec 6, 2018, at 5:22 PM, Jan Monterrubio  wrote:
> 
> I think a declarative pipeline might be able to accomplish this with the 
> “agent” closure. 
> 
> Iirc the free style project will run all in a single node. 
> 
> On Thu, Dec 6, 2018 at 16:06 Adam von Nieda  <mailto:a...@vonnieda.org>> wrote:
> 
>Hi folks,
> 
>I’m able to split parts of a build across multiple nodes using a pipeline, 
> is there any way to do that with a freestyle project? Maybe a plugin I 
> haven’t run across? 
> 
> For example, my project might look like the following..
> 
> Step1: Execute on node 2
> Step 2: Execute on node 3
> Step 3: Execute on node 1
> Step 4: Execute on node 2
> 
>I have steps that have to run on specific nodes. 
> 
>Thanks for any insight you might have!
> 
>-Adam vonNieda
> 
> -- 
> 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 
> <mailto:jenkinsci-users%2bunsubscr...@googlegroups.com>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jenkinsci-users/A6478625-CB00-49F8-9602-DE745B034D3E%40vonnieda.org
>  
> <https://groups.google.com/d/msgid/jenkinsci-users/A6478625-CB00-49F8-9602-DE745B034D3E%40vonnieda.org>.
> For more options, visit https://groups.google.com/d/optout 
> <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 
> <mailto:jenkinsci-users+unsubscr...@googlegroups.com>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jenkinsci-users/CADgiF9JvTROpgoCrK6SMr%2BBFfuLCZb%3D_4WfxoyaT3NwMTbzi6Q%40mail.gmail.com
>  
> <https://groups.google.com/d/msgid/jenkinsci-users/CADgiF9JvTROpgoCrK6SMr%2BBFfuLCZb%3D_4WfxoyaT3NwMTbzi6Q%40mail.gmail.com?utm_medium=email_source=footer>.
> For more options, visit https://groups.google.com/d/optout 
> <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/9FA3D883-1C4C-410E-B971-357859C44F09%40vonnieda.org.
For more options, visit https://groups.google.com/d/optout.


Can you specify a host / agent for a single build step in a freestyle project?

2018-12-06 Thread Adam von Nieda


   Hi folks,

   I’m able to split parts of a build across multiple nodes using a pipeline, 
is there any way to do that with a freestyle project? Maybe a plugin I haven’t 
run across? 

For example, my project might look like the following..

Step1: Execute on node 2
Step 2: Execute on node 3
Step 3: Execute on node 1
Step 4: Execute on node 2

   I have steps that have to run on specific nodes. 

   Thanks for any insight you might have!

   -Adam vonNieda

-- 
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/A6478625-CB00-49F8-9602-DE745B034D3E%40vonnieda.org.
For more options, visit https://groups.google.com/d/optout.


Re: A script that expects input, is there a way?

2018-11-29 Thread Adam von Nieda

  Thanks for the reply, Jeff. 

   That pretty well answers my question. I don’t have a problem making an 
interactive script non-interactive, I just wanted to make sure I wasn’t 
overlooking functionality within Jenkins that would do the same. 

   -Adam 

--
Adam vonNieda
a...@vonnieda.org




> On Nov 29, 2018, at 4:05 PM, Jeff Pearce  wrote:
> 
> It's not a Jenkins problem per-se, it's about how to use an interactive 
> script in non-interactive mode.
> 
> There are some ideas here: 
> https://askubuntu.com/questions/439432/passing-arguments-to-an-interactive-script-which-will-run-in-background
> 
> On 11/29/18, 2:00 PM, "jenkinsci-users@googlegroups.com on behalf of Adam 
> von Nieda"  
> wrote:
> 
>   I’ve got to run a bash script via Jenkins, and it expects several input 
> values / carriage returns. Before I go down a rabbit hole, is there some 
> standard way to handle something like this within Jenkins? I’d be running 
> this as a pipeline stage. 
> 
> 
> 
> -- 
> 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/A69A628C-FAE7-42F4-BD60-36D46133F1AC%40godaddy.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/6E8963AF-E3C6-43CA-BE8A-62A845294605%40vonnieda.org.
For more options, visit https://groups.google.com/d/optout.


A script that expects input, is there a way?

2018-11-29 Thread Adam von Nieda


   Hi folks,

   I’ve got to run a bash script via Jenkins, and it expects several input 
values / carriage returns. Before I go down a rabbit hole, is there some 
standard way to handle something like this within Jenkins? I’d be running this 
as a pipeline stage. 

   Thanks! 

  -Adam 

-- 
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/81D98953-F2C5-49D5-AE81-FA3802B1FA11%40vonnieda.org.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins - Add a dynamic label to a build

2018-11-28 Thread Adam von Nieda

   Suresh, can’t help you with #4, but for #3, look at “Log Parser” plugin. 
It’s specifically for parsing the build log. 

--
Adam vonNieda
a...@vonnieda.org




> On Nov 28, 2018, at 10:34 AM, Suresh Parimi  wrote:
> 
> Veena,
> 
> Interestingly I am also looking for the same solution since this evening. Do 
> you mind sharing how you achieved step 3. How did you parse the jenkins 
> cosole output. 
> 
> I am haing robot framework to execute test cases using jenkins. 
> 
> my task is: label build as smoke if ghe tag= Smoke tests passed to the script 
> execution command.
> 
> Anyone have any ideas/experience with this?
> 
> Thank you,
> Suresh
> 
> On Wed, Nov 28, 2018 at 9:00 PM Veena Thomas  > wrote:
> I am trying to achieve the following task in Jenkins: 1) Build a maven 
> project 2) When running the test cases I print certain messages to the 
> console output 3) Parse the console output of the build and determine if 
> certain patterns exist in the output 4) If the pattern exists I want to label 
> the build with a specific string
> 
> I have achieved steps 1-3. I am not able to create a dynamic label and tie it 
> to a build. I have a Groovy script that parses the console output and 
> determines if the pattern exists in the build's output.
> 
> 
> 
> Bamboo provides this feature to label a build based on regular expressions 
> present in the build's console output. Link - 
> https://confluence.atlassian.com/bamboo0606/using-bamboo/jobs-and-tasks/configuring-jobs/configuring-miscellaneous-settings-for-a-job/configuring-automatic-labeling-of-job-build-results
>  
> 
> 
> I have gone through various existing Jenkins plugins but have not been 
> successful in achieving this functionality. Is there a plugin to achieve this 
> functionality or can I add additional lines in the Groovy script to create a 
> dynamic build label. Any help is appreciated.
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com 
> .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jenkinsci-users/aa8c942b-c370-48dc-b087-23dafff17b42%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/CAE%2BRaT5ULR52_R9SdWk24%3DLrAubyWann11noXyVeF9KpF%2BkkwQ%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/6B43379B-E0F6-41B7-973C-7E7752875E0F%40vonnieda.org.
For more options, visit https://groups.google.com/d/optout.


Re: Is there a way to force reconnect / redeploy of nodes after a Java update?

2018-11-01 Thread Adam von Nieda

  Thanks very much Jan, that’s very helpful, and I appreciate the response :) 

  -Adam 

--
Adam vonNieda
a...@vonnieda.org




> On Nov 1, 2018, at 6:14 PM, Jan Monterrubio  wrote:
> 
> Yeah, you can access the agents via Jenkins.getNodes()
> 
> Then in a loop do something like:
> 
> agent.setOffline() 
> agent.reconnect()
> 
> Here’s some references that might help. 
> 
> 1: 
> https://javadoc.jenkins.io/jenkins/model/Jenkins.html#getNodes-- 
> <https://javadoc.jenkins.io/jenkins/model/Jenkins.html#getNodes-->
> 2: 
> https://wiki.jenkins.io/plugins/servlet/mobile?contentId=63144072#content/view/63144072
>  
> <https://wiki.jenkins.io/plugins/servlet/mobile?contentId=63144072#content/view/63144072>
> 
> On Thu, Nov 1, 2018 at 08:05 Adam von Nieda  <mailto:a...@vonnieda.org>> wrote:
> 
>Hi folks,
> 
>My situation is that I have to keep OpenJDK up to date on all of my Redhat 
> 7 Linux boxes, and updating Java does not necessarily mean a system boot. Is 
> there a way that I can tell the agents on a number of machines (preferably by 
> label) to redeploy / restart, so that they will pick up the new Java? What 
> happens is I update the JDK, and then jobs start failing because libraries no 
> longer exist for the previous version of java, which is still running 
> “remoting.jar”. 
> 
>Thanks very much for the advice,
> 
>   -Adam 
> 
> --
> Adam vonNieda
> a...@vonnieda.org <mailto:a...@vonnieda.org>
> 
> 
> 
> -- 
> 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 
> <mailto:jenkinsci-users+unsubscr...@googlegroups.com>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jenkinsci-users/168289C0-76F3-4C7D-9605-C34EB4DEF986%40vonnieda.org
>  
> <https://groups.google.com/d/msgid/jenkinsci-users/168289C0-76F3-4C7D-9605-C34EB4DEF986%40vonnieda.org?utm_medium=email_source=footer>.
> For more options, visit https://groups.google.com/d/optout 
> <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 
> <mailto:jenkinsci-users+unsubscr...@googlegroups.com>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jenkinsci-users/CADgiF9Lxp-KfwJBrF--wSEg-w8MLbZOCWnBo47fNaYdwbQGtrQ%40mail.gmail.com
>  
> <https://groups.google.com/d/msgid/jenkinsci-users/CADgiF9Lxp-KfwJBrF--wSEg-w8MLbZOCWnBo47fNaYdwbQGtrQ%40mail.gmail.com?utm_medium=email_source=footer>.
> For more options, visit https://groups.google.com/d/optout 
> <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/C1FC8183-1A80-4412-99EB-716E1A90EC22%40vonnieda.org.
For more options, visit https://groups.google.com/d/optout.


Is there a way to force reconnect / redeploy of nodes after a Java update?

2018-11-01 Thread Adam von Nieda

   Hi folks,

   My situation is that I have to keep OpenJDK up to date on all of my Redhat 7 
Linux boxes, and updating Java does not necessarily mean a system boot. Is 
there a way that I can tell the agents on a number of machines (preferably by 
label) to redeploy / restart, so that they will pick up the new Java? What 
happens is I update the JDK, and then jobs start failing because libraries no 
longer exist for the previous version of java, which is still running 
“remoting.jar”. 

   Thanks very much for the advice,

  -Adam 

--
Adam vonNieda
a...@vonnieda.org


-- 
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/168289C0-76F3-4C7D-9605-C34EB4DEF986%40vonnieda.org.
For more options, visit https://groups.google.com/d/optout.


Re: Script for backing up Jenkins

2018-10-16 Thread Adam von Nieda

  I have a similar setup for Disaster Recovery, and rsync the entire stack. 
Works like a charm, and I’ve tested within the last week. 

--
Adam vonNieda
a...@vonnieda.org




> On Oct 16, 2018, at 11:05 AM, Sam K  wrote:
> 
> Hi
>  I have a backup mechanism in place. I have a second Jenkins instance and 
> I've been using rsync in a cronjob to keep sending all config.xmls and 
> basically everything except build information and artifacts to the backup 
> Jenkins. It send the information every 2 mins. 
> 
>  I remember testing it once and it worked as expected.  But it's been more 
> than a year since the last testing to be honest. 
> 
> -- 
> 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/f475689a-c2d8-4c9a-8894-2682528f84ce%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/BDFEECE5-DB14-4A94-B604-64EC374309C9%40vonnieda.org.
For more options, visit https://groups.google.com/d/optout.


Groovy script to create a Dashboard?

2018-10-02 Thread Adam von Nieda

   Hi folks,

   Just getting started with Groovy, and I need to create some 30 or so 
dashboards. Given a list of the names, can someone help me with a Groovy 
script to create them? 

I've got a top level view, and I want to list the dashboards underneath, 
one each for a number of hosts to manage. The top level url is

https://jenkins/view/TopFolder/

   Any insight would be appreciated! 

Jenkins version: 2.121.3 LTS
Dashboard view plugin version: 2.9.11 
(https://wiki.jenkins.io/display/JENKINS/Dashboard+View) 

Thanks very much!

   -Adam vonNieda

-- 
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/8339fb88-151b-4908-93c8-31e061691374%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.