Re: Publisher Over CIFS(CifsBuilderPlugin) seems not to be working when configuring the plugin using groovy DSL script

2017-02-02 Thread Makarand Jadhav
Another interesting thing I found that when I use the following "project / 
'builders' / 'jenkins.plugins.publish__over__cifs.CifsPublisherPlugin'" 
instead of CifsBuilderPlugin in the groovy script, it seems to populate the 
values in the plugin in Jenkins Job configuration but I believe it gives me 
the publisher view in "Build Step" which is not what I want. Also, on 
saving the job configuration, the plugin seems to disappear. Not sure if 
anyone has seen this issue or am I doing something wrong here!

On Thursday, January 26, 2017 at 1:39:13 PM 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/54120890-ab4c-4e92-ace9-04a982a68b4a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Publisher Over CIFS(CifsBuilderPlugin) seems not to be working when configuring the plugin using groovy DSL script

2017-01-26 Thread Makarand Jadhav
Victor, Thanks for your response. I believe that was my mistake on 
copy-paste. I do use the DSL playground you mentioned.
I have manually configured the plugin and checked the config.xml for the 
job and it generates same XML as generated from my Groovy DSL script(as 
below), except that it does not populate the values I configure in the 
Groovy script but picks up plugin default value from the Jenkins.

job('test3_ccms') {
logRotator(-1, 10)
jdk('IBMJDK7')
scm {
}
triggers {
 }
steps {
gradle('clean build')
}
//steps {
 configure { project ->
// Configure Publish over CIFS
 //   project / publishers / 
'jenkins.plugins.publish__over__cifs.CifsBuilderPlugin'(plugin: 
'publish-over-cifs@0.3') {
project / 'builders' / 
'jenkins.plugins.publish__over__cifs.CifsBuilderPlugin'(plugin: 
'publish-over-cifs@0.3') {
// delegate.publishers {
 publishers {
  consolePrefix('CIFS:')
//  delegate.publishers {
//'jenkins.plugins.publish__over__cifs.CifsPublisher' {
'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\\was\\ear")
   removePrefix('')
   remoteDirectorySDF(false)
   flatten(false)
   cleanRemote(true)
   noDefaultExcludes(false)
   makeEmptyDirs(true)
   patternSeparator('[, ]+')
  }
 }
}
//   }
  continueOnError('false')
  failOnError('true')
  alwaysPublishFromMaster('false')
 }
 }
 }
// }
}

On Thursday, January 26, 2017 at 1:39:13 PM 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/a8e1bfe2-60f5-4a00-a22c-a390c46d5ba8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Publisher Over CIFS(CifsBuilderPlugin) seems not to be working when configuring the plugin using groovy DSL script

2017-01-26 Thread Victor Martinez
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.