File as parameter not working

2016-05-17 Thread Jonathan Hodgson
Hi, I'm running Jenkins on Debian, still very new to it. I'm currently trying to set up a pipeline job... just a test one so I can make sure the structure I have in mind works. Anyway, part of the requirement is to upload a file, so I've made the build parameterized, and added a "File as Param

Re: File as parameter not working

2016-05-17 Thread Jonathan Hodgson
I've been experimenting, and if I do what appears to be exactly the same thing with a Freestyle project, file upload is successful. I can't state yet whether the freestyle/pipeline job difference coinciding with a failure to upload the file is a coincidence, or the deciding factor. -- You rece

Re: File as parameter not working

2016-05-18 Thread Jonathan Hodgson
line job I got the same error as above. On Wednesday, May 18, 2016 at 2:21:11 AM UTC+1, Jonathan Hodgson wrote: > > I've been experimenting, and if I do what appears to be exactly the same > thing with a Freestyle project, file upload is successful. > > I can't state yet

How do I use a file parameter in a pipeline project?

2016-05-18 Thread Jonathan Hodgson
Documentation on this seems to be non-existent, so I don't know whether it's broken or I'm just doing things wrong. But the file doesn't seem to be uploading, and certainly isn't being placed in the workspace. Surely I can't be the only person who needs this functionality? -- You received this

Re: File as parameter not working

2016-05-18 Thread Jonathan Hodgson
though they are not coming to > mind. (In our use cases all resources needed in the workspace come from > *checkout* steps against a source repo and some custom scripting to grab > binary artifacts from Artifactory.) > > On Wednesday, May 18, 2016 at 12:53:13 AM UTC-7, Jonathan H

Re: File as parameter not working

2016-05-19 Thread Jonathan Hodgson
kspace with the *writeFile *step but that was several revisions back >> with Pipeline. Instead I do the same with a Groovy script executed via a >> *sh/bat* step, inside a *node* block. But that fit my use case. >> >> On Wednesday, May 18, 2016 at 9:39:10 AM UTC-7, Jonat

Re: File as parameter not working

2016-05-19 Thread Jonathan Hodgson
ild. > > On Thursday, May 19, 2016 at 4:15:06 AM UTC-7, Jonathan Hodgson wrote: >> >> The remote machine currently isn't sharing the file, that's part of the >> point of uploading it in the http POST, sorting out a share seems like it >> would be an issue, it needs

Re: File as parameter not working

2016-05-23 Thread Jonathan Hodgson
ss it vias stdin without losing quotes), but it seems to work... at least for a small test diff. On Thursday, May 19, 2016 at 7:39:55 PM UTC+1, Jonathan Hodgson wrote: > > The problem is, right now I'm not getting it to the build... but the idea > is that the diff is generated locally

Non Github organization folder?

2016-05-23 Thread Jonathan Hodgson
I have a number of Mercurial repositories, for which I am setting up pipeline scripts. I would like to autobuild them all, and when I add new repository, have it automatically added to the autobuilds. The concept of the Github Organization Folder project seems ideal, except for the obvious fla

Cannot log into ssh server

2016-05-23 Thread Jonathan Hodgson
Hi, I set up the SSH server on the "Configure System" page, and now my SSH client (Bitviz on windows) can find it. But it can't seem to log in, Jenkins is set to use its own user list (which currently contains just me), so I've used that user name and password in the SSH client, but it fails t

Pipeline Global Library repository access

2016-05-24 Thread Jonathan Hodgson
Hi, I appear to have Jenkin's ssh server set up correctly, and can connect to it and run who-am-i as on this page https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+SSH whereupon it responds with Authenticated as: Jon Authorities: authenticated But when I try to clone the workflowlibs git

Re: Pipeline Global Library repository access

2016-05-24 Thread Jonathan Hodgson
sing ssh inside git-bash. The issue may be obvious to many people, but I'm primarily a mercurial user, not a git one. regards Jon On Tuesday, May 24, 2016 at 2:30:30 PM UTC+1, Eric Pyle wrote: > > It may be that you need to specify workflowLibs (note capital "L"). >

Re: Pipeline Global Library repository access

2016-05-25 Thread Jonathan Hodgson
, May 24, 2016 at 4:01:15 PM UTC+1, Jonathan Hodgson wrote: > > Well, in my best Homer Simpson voice.. > > "Doh!" > > I had it right on my windows machine (more on this in a moment), but when > I tried switching to a linux one (since instructions for using ssh tend to

String parameter oddness, something I'm not seeing, or a bug?

2016-07-01 Thread Jonathan Hodgson
Ok, so I have a project that receives a diff (it's a "try before commit" project) as a string parameter (it's a pipeline project, so I can't send it as a file parameter, or at least I couldn't last time I checked, they don't work in pipelne projects). This was all working fine, at least for the

Re: String parameter oddness, something I'm not seeing, or a bug?

2016-07-01 Thread Jonathan Hodgson
Aha!! I had wondered about something along those lines but I was looking at quotes for the answer and not finding it. I will try modifiying my submission code accordingly. Thanks On Friday, July 1, 2016 at 1:01:33 PM UTC+1, Daniel Beck wrote: > > > > On 01.07.2016, at 13:

Re: String parameter oddness, something I'm not seeing, or a bug?

2016-07-01 Thread Jonathan Hodgson
Thanks, that seems to have worked. Now to get the patch working on slaves as well as the master... On Friday, July 1, 2016 at 1:38:36 PM UTC+1, Jonathan Hodgson wrote: > > Aha!! I had wondered about something along those lines but I was looking > at quotes for the answer and not f

Where do groovy generated temp files go on a windows slave?

2016-07-01 Thread Jonathan Hodgson
I have a diff in a build string parameter. To apply it to the repository I need to write it to a file, which is then accessed as part of a shell/batch script. On the master (running linux) this works fine def checkOutWithPatch(url, credentials, destination, revision, diff) { checkout([$cl

Re: Where do groovy generated temp files go on a windows slave?

2016-07-02 Thread Jonathan Hodgson
Well on further investigation it seems I can write the file using the writeFile step, so this is no longer stopping me from making progress. But I would still like to know where the temp file goes! -- You received this message because you are subscribed to the Google Groups "Jenkins Users" gro

Does the sh pipeline step not work in windows with cygwin?

2016-07-02 Thread Jonathan Hodgson
Hi, I have cygwin installed (and the cygpath plugin), and the slave seems to find it, but it can't find the script that I assume is first generated by the jenkins slave before calling sh. [C:\Jenkins\workspace\pipeline-test] Running shell script sh: C:\Jenkins\workspace\pipeline-test@tmp\durabl

Re: Does the sh pipeline step not work in windows with cygwin?

2016-07-02 Thread Jonathan Hodgson
to the windows one. On Saturday, July 2, 2016 at 11:50:38 PM UTC+1, slide wrote: > > Did you specify the path to sh on the file system in the shell area in the > global configuration? > > On Sat, Jul 2, 2016 at 12:37 PM Jonathan Hodgson > wrote: > >> Hi, >> >>

pipeline exceptions and project information - documentation

2016-07-04 Thread Jonathan Hodgson
Hi, In order to properly implement my pipeline script I need to deal with exceptions, and also to have access to various bits of information about the current build.. build name, url , workspace folder etc. I'ev managed to find out a little by googling, but is this stuff documented anywhere,

pipeline : extend "node" ?

2016-07-04 Thread Jonathan Hodgson
Hi, I'm still very new to groovy, so please forgive me if the answer to this seems obvious. In my pipeline project, there are things I want to do at the start of every node, so they would look something like node { do_common_stuff build_project } node { do_common_stuff test_

Re: pipeline : extend "node" ?

2016-07-04 Thread Jonathan Hodgson
Thanks guys, looks like exactly what I was looking for. > > -- 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 vi

extra information in the stage view?

2016-07-05 Thread Jonathan Hodgson
Hi, I'm currently setting up a try-before-commit pipeline project, so developers can check their code on multiple platforms, with testing etc before commiting. The project is a bit of a "one size fits all", so what each individual build can vary quite a bit, set by various parameters for the b

pipeline - Avoiding repeating work if nodes execute on same build executor?

2016-07-05 Thread Jonathan Hodgson
Hi, My project workflow is 1) Checkout revision from repository 2) Apply patch 3) Build various versions (debug/release, 32/64 bit etc). Now right now I only have one executor, so the various builds will have to happen sequentially, but I would prefer to write the script such that if I add ext

A build can start before the last one has finished?

2016-07-05 Thread Jonathan Hodgson
Hi, I trigger builds of my pipeline project remotely using the /build page of the job (using a python script that sends various options as parameters) This is working fine, but I just noticed that I could launch a new build while the last one was still running, and rather than waiting for the

Pipeline : Can I display information on the build page

2016-07-06 Thread Jonathan Hodgson
Hi, right now, when I do a build with my try-before-commit project, the build page shows 1) A red exclamation mark telling me the build failed 2) A build number and date 3) Who started the build 4) The repository revision being used... which is displayed 3 times (I check it out on three differe

Re: Pipeline : Can I display information on the build page

2016-07-06 Thread Jonathan Hodgson
Doh! Scratch issue "c" It hadn't clicked with me that it displays as a sidebar in the project page, but not on the build page. that makes sense to me. -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop

Can I add a "publish" button to a build page

2016-07-12 Thread Jonathan Hodgson
Hi, If a build is successful (compiled correctly, passed all tests), I may then want to send it out to beta testers. Which means copying the built binary to a location where they can find it, and sending out emails. I don't want to do this for exery successful build though. A sensible solution

Displaying information on build page that changes

2016-07-19 Thread Jonathan Hodgson
Hi, I'm working on a pipeline job that builds several versions of my code on different slaves, and then will be extended to run tests, create installers etc. I would like to keep the user informed of the progress of these various steps on the build page, and give access to log files etc as the

pipeline: mutex or locks which are local to a slave.

2016-07-21 Thread Jonathan Hodgson
Hi, I have three platforms I want to build on.. XCode, Win32 and Win64. So I want to execute these in parallel, no problem, use the "parallel" build step with three nodes The problem is that the Win32 and Win64 builds could well end up happening on the same slave (in fact to start wih they mos

Organizing artifacts?

2016-08-11 Thread Jonathan Hodgson
Hi, I'm winding up with quite a lot of artifacts, logs, built code, test results etc. Is there a way that I could organize these so that it's not just a flat list on the build page? regards Jon -- You received this message because you are subscribed to the Google Groups "Jenkins Users" gro

Access-Control-Allow-Origin different for userContent rather than build pages?

2016-08-14 Thread Jonathan Hodgson
Hi, I have anartifacts, which are xml logs from MSBuild. Now in my build description I have a HTML and some javascript which reads those files and shows me which architectures and configurations have warnings or errors. That bit works fine, as each build completes, its associated cell in the

Re: Pipeline: Can I use html in currentBuild.description?

2016-08-16 Thread Jonathan Hodgson
Use the Pegdown formatter plugin, Markdown allows for HTML tags. I've even got javascript working quite happily in the description, so things update as certain artifacts are created. On Monday, August 15, 2016 at 9:58:08 PM UTC+1, Greg Smith wrote: > > > Hi, > > Is there some simple way to allow

Re: Pipeline: Can I use html in currentBuild.description?

2016-08-16 Thread Jonathan Hodgson
On Tuesday, August 16, 2016 at 10:53:16 AM UTC+1, Jonathan Hodgson wrote: > > Use the Pegdown formatter plugin, Markdown allows for HTML tags. > > I've even got javascript working quite happily in the description, so > things update as certain artifacts are created. Not o

"I forgot my password" plugin?

2016-09-23 Thread Jonathan Hodgson
Hi, Is there a way to implementt the sort of "I forgot my password" email reset functionality which is pretty well standard on the internet these days? It would also be handy to be able to invite new users throiugh the same sort of process, rather than either leaving the site open for anyone to

pipeline - read artifact into node?

2016-10-10 Thread Jonathan Hodgson
Hi, My pipelne starts with code on the master that creates a file, which I artifact. I need ti use that file in nodes running on the slaves. How do I do that? -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group an

Is there any way to make eclipse run Groovy with the same limiyations as the Pipeline Plugin?

2016-10-14 Thread Jonathan Hodgson
Hi, Testing out new Groovy code inside Jenkins is slow and painful. Whereas I can run a bit of code in a second on my local system inside Eclipse, it can be minutes on Jenkins (because it is part of a build), even if I strip everything out that I possibly can it's at least an order of magnitude

Any tips on how to test Jenkins/Plugin updates before commiting to them?

2016-10-14 Thread Jonathan Hodgson
Hi, I've recently encountered issues because updates to Jenkins and/or plugins have broken things that were previously working. When my autobuild goes live, this would be bad news indeed. So ideally I need to test updates before making them live. Probably running a full set of builds over the

Pipeline Groovy Madness

2016-10-14 Thread Jonathan Hodgson
Hi, I'm trying to get some Groovy code working in the pipeline. The code used to work fine, somewhere in the endless stream of updates of jenkins and plugins, it stopped. It used to look like this (I've stripped the bits that do actual work out for brevity) @NonCPS def isPlatformActive(platfo

Re: Pipeline Groovy Madness

2016-10-14 Thread Jonathan Hodgson
On Friday, October 14, 2016 at 1:47:24 PM UTC+1, Daniel Beck wrote: > > > > On 14.10.2016, at 13:25, Jonathan Hodgson > wrote: > > > > All I've done is move that one line, and for the record at the moment > it's being called without OSX being

pipeline - groovy - file paths on windows?

2016-10-14 Thread Jonathan Hodgson
Hi, I have a bit of code that looks like this def source_folder_name = "${pwd()}/${destination}" def source_folder = new File(source_folder_name) if (!source_folder.exists()) { echo "Source folder ${source_folder_name} does not exist" }

Pipeline plugin - How do I find directories?

2016-10-15 Thread Jonathan Hodgson
Hi, I need to find all the folders with a given name which are in my workspace (well in fact I need to find their parent folders) A quick test with findFiles indicates it only finds files, not folders. -- You received this message because you are subscribed to the Google Groups "Jenkins Users

Re: Pipeline plugin - How do I find directories?

2016-10-16 Thread Jonathan Hodgson
On Sunday, October 16, 2016 at 7:17:46 AM UTC+1, Baptiste Mathus wrote: > > IIRC look in the pipeline-utility-steps plugin. > > Cheers > >> >> That's the FindFiles I already tried, which seems to find files, but not folders. -- You received this message because you are subscribed to the Googl

Re: Pipeline plugin - How do I find directories?

2016-10-16 Thread Jonathan Hodgson
On Saturday, October 15, 2016 at 5:55:53 PM UTC+1, Rachel wrote: > > Hi Jonathan, > > I think that utility is not available. Alternatively, it's possible to use > find command (if Linux): > > node { >stage 'Create folders in workspace for showing' >sh '''#!/bin/bash +x > mkdir -

Re: pipeline - groovy - file paths on windows?

2016-10-17 Thread Jonathan Hodgson
On Saturday, October 15, 2016 at 6:05:45 PM UTC+1, Rachel wrote: > > Hi Jonathan, > > You might check: > >- When it's said "Source folder does not exist", check that > really exists and it's right. >- Jenkins process on slave has permissions on that path. > > I hope be useful. > > B

Re: pipeline - groovy - file paths on windows?

2016-10-17 Thread Jonathan Hodgson
I've just done some experimentation, and testfile = new File("/tmp/CheckOnServer.txt") if (testfile.exists()) { echo "It's looking on the master" } else { echo "It's not looking on the master" } gives [Pipeline] [Windows] echo[Windows] It's looking

Re: pipeline - groovy - file paths on windows?

2016-10-17 Thread Jonathan Hodgson
I've tried every path variation I can think of def paths = [ "c:", "c:\\", "c:\\Jenkins", "c:\\Jenkins\\workspace\\", "c:\\Jenkins\\workspace\\WPF-TryBuild", "c:/", "c:/Jenkins", "c:/Jenkins/workspace/", "c:/Jenkins

Re: pipeline - groovy - file paths on windows?

2016-10-17 Thread Jonathan Hodgson
On Monday, October 17, 2016 at 8:36:55 PM UTC+1, Martina wrote: > > So you solved the issue of it running on the wrong system, right? > No, I haven't solved the issue. I thought perhaps it was running on the wrong system because it didn't have an absolute path that it recognized as such, so I

Re: pipeline - groovy - file paths on windows?

2016-10-17 Thread Jonathan Hodgson
I hope be useful. > > Best regards, > Rachel > > > El lunes, 17 de octubre de 2016, 22:07:09 (UTC+2), Jonathan Hodgson > escribió: >> >> >> >> On Monday, October 17, 2016 at 8:36:55 PM UTC+1, Martina wrote: >>> >>> So you solved the issue

Re: pipeline - groovy - file paths on windows?

2016-10-17 Thread Jonathan Hodgson
Well I can confirm that it has nothing to do with it being windows, just tried FileNameFinder on my OSX slave and it also looks on the master On Monday, October 17, 2016 at 9:44:03 PM UTC+1, Jonathan Hodgson wrote: > > But I don't want to restrict where the job runs, just where th

Pipeline : Confused about file access on slaves

2016-10-17 Thread Jonathan Hodgson
Hi, I've touched on this stuff in a previous thread where I thought it was about running on Windows, in turns out it's the same for any slave So I'm starting a new thread now I'm clearer what the issue is I have code that basically works like this node('master') { // Master is running Linus

Re: pipeline - groovy - file paths on windows?

2016-10-17 Thread Jonathan Hodgson
Rachel and Martina, Thanks for trying to help me on this, I've started a new thread now that I've realized the issue isn't to do with windows or paths, but rather to do with slaves and masters. On Monday, October 17, 2016 at 11:27:08 PM UTC+1, Jonathan Hodgson wrote: > &g

Re: Pipeline : Confused about file access on slaves

2016-10-18 Thread Jonathan Hodgson
Further investigation.. I thiought the solution might lie in FilePath as per here http://stackoverflow.com/questions/30608444/in-jenkins-job-create-file-using-system-groovy-in-current-workspace/32514581#32514581 But it seems that doesn't apply to Groovy in the pipeline, If I try to declare a F

Re: Pipeline : Confused about file access on slaves

2016-10-18 Thread Jonathan Hodgson
Hi Daniel, thanks for trying to help, however On Tuesday, October 18, 2016 at 12:28:18 PM UTC+1, Daniel Beck wrote: > > > > On 18.10.2016, at 00:58, Jonathan Hodgson > wrote: > > > > The documentation says that File operates on "the current machine&q

Re: Pipeline : Confused about file access on slaves

2016-10-18 Thread Jonathan Hodgson
Ok, well it seems the "unable to resolve class" issue was due to me not importing the class. Got thrown by the fact that File is there, hadn't really clicked that FilePath was a hudson specific class rather than standard Groovy. Still looking for how to find the channel -- You received this m

Re: Pipeline : Confused about file access on slaves

2016-10-18 Thread Jonathan Hodgson
On Tuesday, October 18, 2016 at 3:21:09 PM UTC+1, Jesse Glick wrote: > > On Tuesday, October 18, 2016 at 8:09:56 AM UTC-4, Jonathan Hodgson wrote: >> >> Did you miss my last post? I tried FilePath, but I get a "unable to >> resolve class" error. >> &

Is there a way to make jenkins serve up script generated pages?

2016-10-19 Thread Jonathan Hodgson
Okay, so here's the situation. I have build logs in xml format, and an sxlt file to convert them to nice pretty html. Currently the way I'm doing this is with an html and js file in userContent to apply the xslt on the client end, so I have a ;link on my build page that is /userContent/msbuil

Re: Is there a way to make jenkins serve up script generated pages?

2016-10-19 Thread Jonathan Hodgson
On Thursday, October 20, 2016 at 12:13:01 AM UTC+1, Teichner Peter wrote: > > On Linux you have a tool called xsltproc which basically does the > transformation. Assuming your Jenkins is Windows you could get something > similar I'm sure. > > To display the HTML there is a plugin for Jnkins th

pipeline: Is there a plugin to give a "better console"??

2016-10-20 Thread Jonathan Hodgson
Hi, I'm developing a pipeline job. The console is indispensible in this, not surprisingly. But it's getting harder and harder to find what I need in the endless stream of text, combining the outputs from what is currently a master and two slaves (I expect the number of slaves will grow). Is t

Re: pipeline: Is there a plugin to give a "better console"??

2016-10-21 Thread Jonathan Hodgson
On Thursday, October 20, 2016 at 5:02:34 PM UTC+1, Trever wrote: > > This plugin advertises to allow collapsing sections of the console > > https://wiki.jenkins-ci.org/display/JENKINS/Collapsing+Console+Sections+Plugin > > > Yes, I saw that, and it might be useful, but it doesn't seem to work wit

Re: pipeline: Is there a plugin to give a "better console"??

2016-10-21 Thread Jonathan Hodgson
On Friday, October 21, 2016 at 1:09:07 PM UTC+1, Vincent Latombe wrote: > > Did you give a try to Blue Ocean? https://jenkins.io/projects/blueocean/ > > >> I did, It seems promising, but really not that great at the moment. The steps view is close to what I'd like to see, the facility to click

Re: Pipeline : Confused about file access on slaves

2016-10-21 Thread Jonathan Hodgson
On Friday, October 21, 2016 at 6:11:28 PM UTC+1, Baptiste Mathus wrote: > > One thing to understand is that your pipeline is actually always to be run > from/on the master. Each "instruction" if actually sent from the master the > requested node, then kind of checkpointed before going further.

Is there a way to use Apache and Matrix based security together?

2016-10-25 Thread Jonathan Hodgson
Hi, I'm running an Apache server, so it makes sense to use that as a proxy for Jenkins, and since the people on the project already have logins and passwords to access other project related pages, it makes sense to me to use that autorization. But within Jenkins, I'd like to be able to set up

Re: Is there a way to use Apache and Matrix based security together?

2016-10-25 Thread Jonathan Hodgson
On Tuesday, October 25, 2016 at 10:48:04 AM UTC+1, Teichner Peter wrote: > > It depends how you store your original login details for the users – is it > coming from an LDAP server? Perhaps for you it would make sense to use > apache as a proxy but let Jenkins do the authentication by connectin

Get jenkins prefix in pipeline groovy

2016-10-26 Thread Jonathan Hodgson
Hi, My jenkins instance is accessible on http://MyWebsite.com/jenins with "jenkins" being set by --prefix=jenkins in the jenkins defailt file. Standard. Since I'd like my scripts to be portable, I don't want to hardcode the "jenkins" into paths in the script, so how can I get this value from

Troubleshooting reverse proxy setup

2016-10-26 Thread Jonathan Hodgson
Hi, I'm currently getting a "It appears that your reverse proxy set up is broken." message on the Manage Jenkins Page. I'm using Apache as a proxy to Jenkins (which is on another machine). My proxy setup looks like thsi ProxyPass /jenkins http://192.168.0.6:8080/jenkins nocanon ProxyPa

Re: Troubleshooting reverse proxy setup

2016-10-26 Thread Jonathan Hodgson
I should probably add that although I can access jenkins through the browser from my slave machines, connecting them as slaves no longer works. It was fine when I accessed jenkins directly, but now I've set up the proxy, neither the launch button (which I use with my windows slave) nor the "jav

Cannot launch slaves now I'm using an Apache proxy

2016-10-26 Thread Jonathan Hodgson
Hi, Does anybody have a working example apache conf running jenkins on a different machine to apache? Things were working fine whilst I was accessing jenkins directly, but I need to do it through Apache. Jenkins is running on a different machine to Apache. Access to Jenkins works, with a redi

Re: Cannot launch slaves now I'm using an Apache proxy

2016-10-27 Thread Jonathan Hodgson
Well I've made some progress. It turns out I was missing a forward slash in my jenkins URL setting (there really should be a syntax check there IMHO) So now it no longer reports that the reverse proxy is not working. But launching a slave fails in both cases. In windows, from the browser, I am

Anybody using the CORS Support Plugin?

2016-10-31 Thread Jonathan Hodgson
Hi, Is so, then have you found it reliable? I had it set up so everything was working fine, but now it doesn't seem to be adding any headers to the files served by Jenkins. Either that or Apache is stripping them off. But I don't think I've changed any settings in either since I had it workin

Pipeline shared libraries, can I have a constructor when I don't explicitly declare the enclosing class?

2016-11-07 Thread Jonathan Hodgson
Hi, I'm setting up a folder library as per here. Now in one of their examples they talk about not declaring the enclosing class (so as to allow access to steps) This works fine, in the file MyClass.groovy @package my.package def myMethod(data) { // do stuff with data } return this I

Multibranch pipeline : where can the script find out about the current build?

2016-11-09 Thread Jonathan Hodgson
Hi, Having finally got the core of my try-before-commit project working, I'm shortly going to move on to the building of committed projects. Since I have multiple branches of some projects, the Multibranch pipeline looks like a good solution (having multiple projects all using the same framewo

Pipeline groovy.. very confused by the way the same code works differently in libraries

2016-11-10 Thread Jonathan Hodgson
Hi, I have a global library class, HelperFunction, which includes a getKeySet function. package mylib @NonCPS def getKeySet(m) { def key_set = m.keySet() key_set.toArray(new String[key_set.size()]) } return this Now I use this function in two places. One is in a script which is loa

Pipeline: What do I have to do to get the scm to inject environment variables?

2016-11-11 Thread Jonathan Hodgson
Hi, I apologize if this is basic stuff I have a pipeline job with a jenkinsfile, as a result when the pipeline runs there is an scm object, hudson.plugins.mercurial.MercurialSCM I notice in the source code that there is public void buildEnvVars(AbstractBuild build, Map env) Which injects

pipeline groovy - can somebody please explain why variable value passing is working like this?

2016-11-13 Thread Jonathan Hodgson
Ok, so having got my script working, I decided to move part of it into a shared library as per the section marked Define more structured DSL here https://github.com/jenkinsci/workflow-cps-global-lib-plugin But I'm getting what to me seems like very odd behaviour with the variables. My primary

Re: pipeline groovy - can somebody please explain why variable value passing is working like this?

2016-11-14 Thread Jonathan Hodgson
I'm sorry, but am I supposed to know what that means? On Monday, November 14, 2016 at 10:25:12 AM UTC, Thomas Keller wrote: > > /sub -- 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

Pipeline build crashes depending on who started it?

2016-11-24 Thread Jonathan Hodgson
Hi, I've set up a try-before-commit build using the pipeline, and a script on the client that sends a diff and starts a build. Now if I run this, it works fine (the jenkins machines are on my local network, but I access them through a global url) However if my colleague runs it, then everythin

Re: Pipeline build crashes depending on who started it?

2016-11-24 Thread Jonathan Hodgson
After deleting the relevant workspace folder and getting my colleague to trigger another build, I get a different, but I suspect related, error java.io.IOException: remote file operation failed: C:\Jenkins\workspace\WPF\TryBuild\Hugo Brangwyn\PluginWrapper at hudson.remoting.Channel@6b81cdda:C

Re: Pipeline build crashes depending on who started it?

2016-11-24 Thread Jonathan Hodgson
o get these autobuilds to the point where I thought they could be rolled out, only to run into this On Thursday, November 24, 2016 at 4:32:36 PM UTC, Jonathan Hodgson wrote: > > > After deleting the relevant workspace folder and getting my colleague to > trigger another build, I get a

Re: Pipeline build crashes depending on who started it?

2016-11-25 Thread Jonathan Hodgson
I'm not quite sure what you mean. The other user logs on to jenkins on the server (or triggers a build with his name and password in the url, same thing in effect), but the slave is started by me and runs in my user space (which has admin priviledges).. or so I thought, the fact that things fai

Re: pipeline - build job with FileParameterValue

2016-11-28 Thread Jonathan Hodgson
That was pretty much the first problem I ran into! File Parameters don't currently work with pipelines https://issues.jenkins-ci.org/browse/JENKINS-27413 On Monday, November 28, 2016 at 11:53:52 AM UTC, José Coelho wrote: > > I am trying to invoke a job that accepts a file: > > build job: 'U

pipeline : Get the username from the last commit

2016-11-29 Thread Jonathan Hodgson
Hi, When a build happens after a push to the repository, I would like to email the person who did the push (or the last commit, which usually amounts to the same thing) with the result. Is there a way to get the user's name and email? -- You received this message because you are subscribed to

pipeline.. sometimes slaves just hang

2016-12-01 Thread Jonathan Hodgson
Hi, Right now I'm looking at a pipelne job which has been hung on two slaves for over two hours. Both slaves (one windows, one OSX) show as being connected, and the slave is still running on both, but both are stalled... one on starting a batch script, the other either in the shell script or j

Re: pipeline.. sometimes slaves just hang

2016-12-01 Thread Jonathan Hodgson
It seems it was the windows slave specifically that was blocking things. When I stopped the slave app the OSX slave kicked into action. The questions above still apply. On Thursday, December 1, 2016 at 1:39:33 PM UTC, Jonathan Hodgson wrote: > > Hi, > > Right now I'm looking

Re: pipeline.. sometimes slaves just hang

2016-12-02 Thread Jonathan Hodgson
that-continues-if-timeout-is-reached-using-a-default-value > > On Thursday, 1 December 2016 13:39:33 UTC, Jonathan Hodgson wrote: >> >> Hi, >> >> Right now I'm looking at a pipelne job which has been hung on two slaves >> for over two hours. >> >&g

Re: pipeline.. sometimes slaves just hang

2016-12-02 Thread Jonathan Hodgson
; build time and set that as the timeout if the agent execution is happening > inside the script rather than as a separate job > > On Friday, 2 December 2016 13:03:57 UTC, Jonathan Hodgson wrote: >> >> Thanks, but I'm not sure this does what I need. >> >> T

pipeline : remote file operation on the windows slave no longer work

2016-12-03 Thread Jonathan Hodgson
} } bombs out with Started by user Jonathan Hodgson [Pipeline] stage [Pipeline] { (testing) [Pipeline] node Running on Asus K51 in C:\Jenkins\workspace\pipeline-test2 [Pipeline] { [Pipeline] echo Substage running on Windows [Pipeline] bat [Pipeline] } [Pipeline] // node [Pipeline] } [Pipel

Re: pipeline : remote file operation on the windows slave no longer work

2016-12-06 Thread Jonathan Hodgson
NKINS/Pipeline+Stage+Step+Plugin. > Your bat step was also a little verbose I think. Given that by default it > will echo the output to the console. > > You didn't say what versions your running but the above snippet ran as > expected in my latest and greatest 2.35 and

Why does JNLP4 not work

2016-12-07 Thread Jonathan Hodgson
Hi, I'm having some issues with my windows slave.. remote file operations are failing, also the connection is unreliable. Now this may have no connection, but I notice that when I run the slave I get Server reports protocol JNLP4-connect not supported, skipping Server reports protocol JNLP4-pla

Re: Why does JNLP4 not work

2016-12-07 Thread Jonathan Hodgson
gt; > On Wednesday, 7 December 2016, Jonathan Hodgson > wrote: > >> Hi, >> >> I'm having some issues with my windows slave.. remote file operations are >> failing, also the connection is unreliable. >> >> Now this may have no connection, but I no

Re: Why does JNLP4 not work

2016-12-07 Thread Jonathan Hodgson
Apache is filtering the headers > (specifically blocking the header that reports enabled protocols) > > On Wednesday, 7 December 2016, Jonathan Hodgson > wrote: > >> I'm the latest version of jenkins (2.35), updated today via apt-get on >> debian, and downloaded s

Re: Why does JNLP4 not work

2016-12-07 Thread Jonathan Hodgson
new thread, as the JNLP4 issue is solved - if > you want to get further. > > Stack traces are usually helpful > > On Wednesday, 7 December 2016, Jonathan Hodgson > wrote: > >> Thanks, I hadn't seen those setting on the security page. >> >> JNLP4 now seems

pipeline : slave throws an exception on trying to create a tmp folder, despite creating the workspace and a subfolder just fine

2016-12-08 Thread Jonathan Hodgson
D) dirStep(nodeID) testUnstash(nodeID) } } stage("testing") { node ("master") { writeFile file:"toStash.txt",text:"Testing stashing and unstashing" stash name:"myStash", include:"toStash.tx

Re: pipeline : slave throws an exception on trying to create a tmp folder, despite creating the workspace and a subfolder just fine

2016-12-11 Thread Jonathan Hodgson
s. But if permissions allow the creation of pipeline-test2 by the slave, they should also allow the creation of pipeline-test2@tmp right next to it surely? On Thursday, December 8, 2016 at 5:59:15 PM UTC, Jonathan Hodgson wrote: > > Hi, > > I've been experiementing trying to get s

Re: pipeline : slave throws an exception on trying to create a tmp folder, despite creating the workspace and a subfolder just fine

2016-12-11 Thread Jonathan Hodgson
> > Ok, adding to the confusion... > I just tried changing the slave configuration to give a compleely new root folder (C:\Jenkins2 rather than C:\Jenkins) Ran the same same job Failed to mkdirs: C:\Jenkins2\workspace\pipeline-test2 hudson.FilePath.mkdirs(FilePath.java:1169) org.jenkinsci.plu

Re: pipeline : slave throws an exception on trying to create a tmp folder, despite creating the workspace and a subfolder just fine

2016-12-11 Thread Jonathan Hodgson
On Sunday, December 11, 2016 at 4:36:24 PM UTC, Daniel Beck wrote: > > Is this a file system that doesn't like the @ character? > Seems unlikely, since 1) I created the folder manually without issue (and then things worked correctly) 2) Jenkins previously created those folders just fine, this

Re: pipeline : slave throws an exception on trying to create a tmp folder, despite creating the workspace and a subfolder just fine

2016-12-11 Thread Jonathan Hodgson
Further to the above. I just forced it to run multiple builds simultaneously, and it generates new folders for them as pipeline-test2@2 and pipelin-test2@3. So the @ symbol is most certainly not the issue. On Sunday, December 11, 2016 at 7:23:01 PM UTC, Jonathan Hodgson wrote: > >

pipeline: Jenkins slave cannot create nested directories

2016-12-13 Thread Jonathan Hodgson
Hi, This is a follow on from a previous thread, where I thought the issue was specifically tmp folders, but now after a little experimentation, things are a bit clearer. Firstly, I want to state that this problem did not originally exist on this slave, SOMETHING (not the pipeline code) has cha