Re: variable within a variable

2020-10-26 Thread cw
TemplateEngine().createTemplate(pathname) > def template = { host -> templateMessage.make(host: host)} > def result = template(MAL) >return result > } > > > > > On Monday, October 26, 2020 at 2:41:09 PM UTC-4 cw wrote: > >> I wonder

Re: variable within a variable

2020-10-26 Thread cw
@riftio.com wrote: > I think it is failing on this line: > echo("MAL is ${MAL}") > > > > On Monday, October 26, 2020 at 11:51:19 AM UTC-4 cw wrote: > >> Also I'm confused why I'm getting a NotSerializableException related to >> SimpleTemplateEngine$SimpleTe

Re: variable within a variable

2020-10-26 Thread cw
Also I'm confused why I'm getting a NotSerializableException related to SimpleTemplateEngine$SimpleTemplate when I'm in a try/except block which is running an sshCommand which is not trying to call the SimpleTemplateEngine. On Monday, October 26, 2020 at 10:04:59 AM UTC-4 cw wrote: > The c

Re: variable within a variable

2020-10-26 Thread cw
uspect that you are in a function and you may need to use the > @NONCPS decorator > > On Friday, October 23, 2020 at 4:31:55 PM UTC-4 cw wrote: > >> That's great, thank you very much. I was able to take your code, >> substitute MAL for HOST, for instance, and t

Re: failed build

2020-10-26 Thread cw
Looks like this is part (or all) of the problem: Server returned HTTP response code: 401 for URL: http://ec2138-86-151.us-east-2.compute.amazonaws.com:8080/manager/text/list ... *The username and password you

Re: variable within a variable

2020-10-23 Thread cw
/\${host}/foo/bar" > > def templateMessage = new > SimpleTemplateEngine().createTemplate(pathname) > > def result = { host -> templateMessage.make(host: host)} > def HOST = "myhost" > > println(result(HOST)) > } > }

Re: variable within a variable

2020-10-23 Thread cw
ls > /srv/jboss/server/${MAL}/log/" but MAL on the far end is empty. So you need > to complete the expansion before calling ssh. > > This might get you on the right track -- > https://stackoverflow.com/questions/28997518/groovy-string-interpolation-with-value-only-known-at-runtime

variable within a variable

2020-10-22 Thread cw
I'm trying to set up a string parameter which will reference a variable which will be created within the pipeline. For instance, when building a parameterized build, the user enters a file path in this format: /srv/jboss/server/${MAL}/log/ Where MAL is assigned via the pipeline and then I try

Re: sshget is showing the entire contents of the file in console output log

2020-05-08 Thread cw
am working again, in case anyone else runs across this. Craig On Thursday, May 7, 2020 at 2:25:00 PM UTC-4, cw wrote: > > Thanks, I opened Jira ticket JENKINS-62208. > > Craig > > On Thursday, May 7, 2020 at 12:15:40 PM UTC-4, slide wrote: >> >> This sounds like

Re: Declarative pipeline dynamic stage names?

2020-05-08 Thread cw
Not sure about declarative pipelines, but I have it working in a scripted pipeline: stage("Run log gather script on ${server}") On Friday, May 8, 2020 at 8:10:02 AM UTC-4, Lyubomir Grigorov wrote: > > Hello, > Do you know if it is possible, for a declarative jenkins pipeline, to have > stage

Re: sshget is showing the entire contents of the file in console output log

2020-05-07 Thread cw
Thanks, I opened Jira ticket JENKINS-62208. Craig On Thursday, May 7, 2020 at 12:15:40 PM UTC-4, slide wrote: > > This sounds like a bug in the plugin, I would file an issue in Jira. > > On Thu, May 7, 2020 at 6:02 AM cw > > wrote: > >> Does anyone have any ideas o

Re: sshget is showing the entire contents of the file in console output log

2020-05-07 Thread cw
logs. ssh 2.6.1 true ssh-agent 1.17 true ssh-credentials 1.18 true ssh-steps 2.0.0 true On Tuesday, May 5, 2020 at 4:32:49 PM UTC-4, cw wrote: > > When executing the following in a scripted pipeline: > > sshGet remote: soc_remote, from: > "/srv/jboss/server/${MAL}/log/${sourcefi

sshget is showing the entire contents of the file in console output log

2020-05-05 Thread cw
When executing the following in a scripted pipeline: sshGet remote: soc_remote, from: "/srv/jboss/server/${MAL}/log/${sourcefile}", into: FileName, override: true The file is downloaded successfully from the remote server into the local directory on the Jenkins server. However, the console