Have you tried to use http://job-dsl.herokuapp.com/ ?

I tried your snippet and it seems it got some missing brackets. In any 
case, can you edit those steps with the UI and see the config.xml of the 
job to compare with?

Cheers


On Thursday, 26 January 2017 13:39:13 UTC, Makarand Jadhav wrote:
>
> I am using the below groovy DSL script for populating the 
> "publish_*over*_cifs"(v0.3) 
> in the Build step for sending files to Windows Share from a Linux 
> jenkins(v1.640) server from a seed job. The code seems to generate the 
> "Publish Over CIFS" plugin in the job but the values(highlighted in Red 
> color below) set in the Groovy script does not seem to get populated after 
> the plugin is generated from the groovy script & JobDSL plugin(v1.45):
> Note that the jenkins Global Configuration has the CIFS Share 
> APP_Share_dev configured & it connects using the credentials successfully
>
> job('test3_app') {
> logRotator(-1, 10)
> jdk('JDK7')
> scm {
> }
> triggers {
> }
> steps
> { gradle('clean build') }
>
> //steps {
> configure { project ->
> // Configure Publish over CIFS
> project / 'builders' / 
> 'jenkins.plugins.publish_*over*_cifs.CifsBuilderPlugin'(plugin="publish-over-cifs@0.3")
>  
> {
> delegate.publishers {
> consolePrefix('CIFS:')
> 'jenkins.plugins.publish_*over*_cifs.CifsPublisher' {
> Name('APP_Share_dev')
> verbose('true')
> useWorkspaceInPromotion(false)
> usePromotionTimestamp(false)
> transfers {
> 'jenkins.plugins.publish_*over*_cifs.CifsTransfer' {
> sourceFiles('app.ear')
> excludes('')
> remoteDirectory("app\\ws
> ear")
> removePrefix('')
> remoteDirectorySDF(false)
> flatten(false)
> cleanRemote(true)
> noDefaultExcludes(false)
> makeEmptyDirs(true)
> patternSeparator('[, ]+')
> }
> }
> continueOnError('false')
> failOnError('true')
> alwaysPublishFromMaster('false')
> }
> }
> }
> }
>
> Am I missing something here? Please let me know if the above 
> implementation is correct in the Groovy Script.
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/7e1c6818-b1ef-40bb-b62c-e1f59f8cef36%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to