Hi Jesse,

thanks for coming back to me.

On Friday, 15 May 2015 19:41:14 UTC+1, Jesse Glick wrote:
>
> On Fri, May 15, 2015 at 1:19 PM, Sven Erik Knop <[email protected] 
> <javascript:>> wrote: 
> >  No such DSL method git found among [archive, bat, build, catchError, 
> dir, 
> > echo, error, fileExists, input, load, mail, node, parallel, pwd, 
> readFile, 
> > retry, sh, sleep, stage, step, timeout, tool, unarchive, waitUntil, 
> withEnv, 
> > writeFile, ws] 
>
> Sounds like workflow-scm-step is not actually installed. Check that 
> you are using latest versions of all plugins. 
>
>
Not sure what is wrong with the Git workflow plugin, all plugins are on the 
latest release. Not a problem at the moment.

 

> > When I am trying to develop a new SCMStepDescriptor, I cloned 
> > jenkins/workflow-plugin 
>
> Huh?? You just need to create a fresh Jenkins plugin from archetype, 
> then add a dependency on workflow-scm-step. Create an SCMStep subclass 
> with an SCMStepDescriptor, then 
>
> mvn clean hpi:run 
>

I added the DSL for Perforce to the P4 Plugin at the moment, that seems to 
work fine.

Now I am trying to add a publish step. I am probably misunderstanding 
something here.

My DSL code looks like this

node {
  
  p4_stream charset: 'none', credential: 
'634a31d2-bd60-4c39-bf84-b09f057c5431', stream: '//stream/main'

  step([$class: 'TagNotifier', rawLabelDesc: 'Jenkins post-build label.', 
rawLabelName: 'jenkins-stream-test'])

}

The TagNotifier class is part of the P4 Plugin to perform a post-build step 
of labelling the source in Perforce. This works fine if I create a standard 
Freestyle Project.

In the DSL TagNotifier gets invoked but it lacks in two respects:

1. The "run" object that gets invoked has a getResult() value of null 
(preventing me from labelling only for successful builds)
2. The resulting build normally adds an extra attachment that links to a 
label page. The URL is incomplete. Usually the URL looks like this:

http://localhost:8080/jenkins/job/<build-name>/<job-number>/tagBuild/ 
for example:
http://localhost:8080/jenkins/job/p4-direct/2/tagBuild/

in my DSL case it is 
http://localhost:8080/jenkins/tagBuild/

and the link points into nowhere.

Is there something missing in the DSL code? 

Cheers

Sven Erik

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/f3626480-88fe-46ad-8ca4-acfa09375616%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to