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

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

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

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

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 exac

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

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

2018-12-07 Thread Adam von Nieda
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 mu

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

2018-12-06 Thread Adam von Nieda
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, > >

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 St

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

2018-11-29 Thread Adam von Nieda
active-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

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

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

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

2018-11-01 Thread Adam von Nieda
i.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: > >

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

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 insta

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 mana