Re: New plugin developer: A View Plugin

2018-04-20 Thread Sverre Moe
t 5:18 PM, Sverre Moe <sverr...@gmail.com > > wrote: > > What kind of test is this? There is nothing in my newly created project. > > The Jenkins plugin build harness generates a synthetic test to verify > basic sanity aspects of your plugin. I

New plugin developer: A View Plugin

2018-04-18 Thread Sverre Moe
Let me begin starting with I have never written a plugin to Jenkins before. I have plenty of insight into the Jenkins API for Groovy scripting in script console and scripting Pipeline scripts. I am a Java developer for over 10 years (API/Spring, Swing/JavaFX), and have been using Jenkins for

Re: [DISCUSS] Time for Jenkins to require Java 8 to run

2016-10-14 Thread Sverre Moe
Its a good move SUSE distributions which has OpenJDK 8: SLES 12 SP1 OpenSUSE 13.2 OpenSUSE Leap 42.1 fredag 14. oktober 2016 10.11.27 UTC+2 skrev Daniel Beck følgende: > > > > On 14.10.2016, at 09:10, nicolas de loof > wrote: > > > > About system that don't have Java 8

Re: WorkflowMultiBranchProject getLastBuild

2016-08-09 Thread Sverre Moe
> > On Mon, Aug 8, 2016 at 4:31 AM, Sverre Moe <sverr...@gmail.com > > wrote: > > I just need the last build from an upstream dependency. The upstream > build > > cause might be an upstream dependency, or it may be an SCM cause. Such > that > > the ups

Re: WorkflowMultiBranchProject getLastBuild

2016-08-08 Thread Sverre Moe
On Fri, Aug 5, 2016 at 4:02 AM, Sverre Moe <sverr...@gmail.com > > wrote: > > Variable currentBuild irefers to the currently running build. What I > needed > > was the last build of a upstream dependency. > > Like JENKINS-31576 you mean? > -- You received

Re: WorkflowMultiBranchProject getLastBuild

2016-08-05 Thread Sverre Moe
rst() org.jenkinsci.plugins.workflow.job.WorkflowRun build = job.getLastBuild() hudson.model.Result result = build.getResult() List badges = build.getBadgeActions() torsdag 4. august 2016 16.53.54 UTC+2 skrev Jesse Glick følgende: > > On Wed, Aug 3, 2016 at 5:14 AM, Sverre Moe <sverr...@gmail.com > > wrote:

Re: WorkflowMultiBranchProject getLastBuild

2016-08-03 Thread Sverre Moe
lastBuild = job.getLastBuild() def completed = !lastBuild.isBuilding() Method getAllJobs() returns only one Job. Why is that? I guess that if I called getAllJobs on the Multibranch pipeline project I would get for all branches (for instance 4 branches = 4 jobs). onsdag 3. august 2016 11.14.33 UTC+2 sk

WorkflowMultiBranchProject getLastBuild

2016-08-03 Thread Sverre Moe
Have Jenkins projects as Multibranch pipeline: org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject extends jenkins.branch.MultiBranchProject extends com.cloudbees.hudson.plugins.folder.computed.ComputedFolder extends com.cloudbees.hudson.plugins.folder.AbstractFolder

Re: Calling scheduleBuild2 does not pass along parameters

2016-06-07 Thread Sverre Moe
I defined it in the wrong place it looks like This project is parameterized Boolean Parameter Then the parameter was passed to the downstream build tirsdag 7. juni 2016 13.11.05 UTC+2 skrev Sverre Moe følgende: > > I tried that > In the downstream job configuration: > Prepare an

Re: Calling scheduleBuild2 does not pass along parameters

2016-06-07 Thread Sverre Moe
I tried that In the downstream job configuration: Prepare an environment for the run -> Properties Content -> UPSTREAM_TRIGGERED=false Did not work. tirsdag 7. juni 2016 12.57.21 UTC+2 skrev Antonio Muñiz følgende: > > On Tue, Jun 7, 2016 at 12:52 PM, Sverre Moe <sverr...@gmail

Re: Calling scheduleBuild2 does not pass along parameters

2016-06-07 Thread Sverre Moe
vars). > You have to define the parameter (`UPSTREAM_TRIGGERED`) in the downstream > build. > > On Tue, Jun 7, 2016 at 9:39 AM, Sverre Moe <sverr...@gmail.com > > wrote: > > I am trying to pass a parameter to a scheduled build, but the build does > not > > get the

Calling scheduleBuild2 does not pass along parameters

2016-06-07 Thread Sverre Moe
I am trying to pass a parameter to a scheduled build, but the build does not get the parameter. When ProjectA schedule a build of ProjectB it should pass along a parameter I called UPSTREAM_TRIGGERED. When ProjectB starts building there are no parameters passed in from ProjectA. I have the

Re: Transfers artifacts using SCP with Groovy and Jenkins API

2016-05-27 Thread Sverre Moe
or at least know how? onsdag 15. april 2015 15.58.21 UTC+2 skrev Sverre Moe følgende: > > Instead of using "Send build artifacts over SSH" I would like to do the > same using a Groovy script (Groovy Postbuild, as it would have access to > the Jenkins API). > > I would rat

Re: Groovy project.save() does not always work

2016-04-18 Thread Sverre Moe
ng job properties, just > adding. So it's likely you just get the old one returned from your API > call, as the job properties list does not really support having two of the > same type (but doesn't prevent it either). Confirm by looking at the > config.xml. > > > On 18.04

Groovy project.save() does not always work

2016-04-18 Thread Sverre Moe
I am not sure what I am doing wrong with my groovy script. I have written a groovy update script to bulk update all my projects. Sometimes it does not take affect when I call project.save() I can afterwards open that project configuration page and everything looks right. The updated content is

Re: [JENKINS-27317] Request for developers

2015-12-03 Thread Sverre Moe
have "much time to look more into this", then your other > solution is to pay someone to do this. > There are many people/companies available for this > <https://wiki.jenkins-ci.org/display/JENKINS/Commercial+Support>. > > Cheers > > 2015-10-13 14:46 GMT+02:

New to Developing Jenkins Plugins: Nexus problem

2015-10-07 Thread Sverre Moe
I have checked out Jenkins template-project-plugin in an effort to fix an issue https://issues.jenkins-ci.org/browse/JENKINS-27317 I have followed the instruction to add Jenkins Maven Repository to my existing Nexus, in order to build with Maven.

Re: FilePath act fails with an exception

2015-04-16 Thread Sverre Moe
I changed the code to extend MasterToSlaveFileCallable, but the exception is still the same. Changed: private static class RemoteListDir implements FileCallableSetString { To: private static class RemoteListDir extends MasterToSlaveFileCallableSetString { Caused by: java.io.IOException:

Re: Adding a build trigger does add upstream project

2015-04-15 Thread Sverre Moe
Yes, that did the trick. As an end notice. Using only project.save(), it took aprox. 20 minutes before the project main page to show the upstream project. onsdag 15. april 2015 13.33.51 UTC+2 skrev Jesse Glick følgende: On Wed, Apr 15, 2015 at 2:54 AM, Sverre Moe sverr...@gmail.com

Re: Adding a build trigger does add upstream project

2015-04-15 Thread Sverre Moe
, Sverre Moe sverr...@gmail.com javascript: wrote: What am I missing? project.save() perhaps? Not sure if addTrigger implies that. -- You received this message because you are subscribed to the Google Groups Jenkins Developers group. To unsubscribe from this group and stop receiving emails

Adding a build trigger does add upstream project

2015-04-14 Thread Sverre Moe
I am able to add a build trigger to a project, but it does not get added to the list of upstream projects. import jenkins.triggers.ReverseBuildTrigger import hudson.model.Result def jenkinsInstance = jenkins.model.Jenkins.getInstance() def project = jenkinsInstance.getItem(myLib2) def trigger

Re: FilePath act fails with an exception

2015-03-25 Thread Sverre Moe
classes as parent). Am 24.03.2015 um 18:03 schrieb Sverre Moe sverr...@gmail.com javascript:: Trying the following in Jenkins Script Console: import hudson.FilePath.FileCallable import hudson.remoting.VirtualChannel def jenkinsInstance = jenkins.model.Jenkins.getInstance() def project

Re: FilePath act fails with an exception

2015-03-25 Thread Sverre Moe
: java.io.IOException: Remote call on Development-opensuse-x86_64 failed onsdag 25. mars 2015 10.03.35 UTC+1 skrev Sverre Moe følgende: I have added checkRoles within my FileCallable implementation, but it still fails. Though this time with a different message. remote file operation failed

FilePath act fails with an exception

2015-03-24 Thread Sverre Moe
Trying the following in Jenkins Script Console: import hudson.FilePath.FileCallable import hudson.remoting.VirtualChannel def jenkinsInstance = jenkins.model.Jenkins.getInstance() def project = jenkinsInstance.getItem(myMatrixProject) def rootProject = project.getRootProject() def someWorkspace

Run Groovy script only on Matrix parent

2015-03-18 Thread Sverre Moe
The groovy script executed by Groovy Postbuild does not run on Matrix parent if this Post build publisher comes from a template project. There is an issue for this: https://issues.jenkins-ci.org/browse/JENKINS-27317 I order for the script to run on my several hundred jobs I would have to

Re: Run Groovy script only on Matrix parent

2015-03-18 Thread Sverre Moe
remains in the groovy script file. onsdag 18. mars 2015 12.24.23 UTC+1 skrev Sverre Moe følgende: The groovy script executed by Groovy Postbuild does not run on Matrix parent if this Post build publisher comes from a template project. There is an issue for this: https://issues.jenkins-ci.org

Re: Project doBuild with Stapler

2015-03-17 Thread Sverre Moe
QueueTaskFuture. On 17.03.2015, at 10:34, Sverre Moe sverr...@gmail.com javascript: wrote: Trying to call doBuild on a project in Groovy. I cannot find any examples on how to use this method when it comes down to StaplerRequest and StaplerResponse. I am tempted to just call newBuild

Project doBuild with Stapler

2015-03-17 Thread Sverre Moe
Trying to call doBuild on a project in Groovy. I cannot find any examples on how to use this method when it comes down to StaplerRequest and StaplerResponse. I am tempted to just call newBuild(), but I guess that would not get me a hook into that build process/result. I am iterating through a

Groovy Postbuild: Run script only on matrix parent

2015-03-10 Thread Sverre Moe
Would it possible to have Groovy Postbuild to the script only run on matrix parent? Would be a great feature to get in this plugin. I have a groovy script I want to run once after all matrix configurations have been triggered and completed. I need to check the Cause not being an UpstreamCause,