Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-41318

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

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      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):

      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('{color:red}APP_Share_dev{color}')
      		            verbose('true')
      					useWorkspaceInPromotion(false)
      					usePromotionTimestamp(false)
      					transfers {
      						'jenkins.plugins.publish__over__cifs.CifsTransfer' {
      							sourceFiles('{color:red}app.ear{color}')
      							excludes('')
      							remoteDirectory("{color:red}app\\was\\ear{color}")
      							removePrefix('')
      							remoteDirectorySDF(false)
      							flatten(false)
      							cleanRemote(true)
      							noDefaultExcludes(false)
      							makeEmptyDirs(true)
      							patternSeparator('[, ]+')
      						}
      					}
      				}
      //			}
      		continueOnError('false')
      		failOnError('{color:red}true{color}')
      		alwaysPublishFromMaster('false')
      	}
      	}
      	}
      //	}
      }
      

      Am I missing something here? Please let me know if the above implementation is correct in the Groovy Script.

        Attachments

          Activity

          Hide
          maverick_219 Makarand Jadhav added a comment -

          Note that the jenkins Global Configuration has the CIFS Share APP_Share_dev configured & it connects using the credentials successfully

          Show
          maverick_219 Makarand Jadhav added a comment - Note that the jenkins Global Configuration has the CIFS Share APP_Share_dev configured & it connects using the credentials successfully
          Hide
          daspilker Daniel Spilker added a comment -

          Please post a minimal and proper formatted script that reproduces the problem.

          Show
          daspilker Daniel Spilker added a comment - Please post a minimal and proper formatted script that reproduces the problem.

            People

            Assignee:
            daspilker Daniel Spilker
            Reporter:
            maverick_219 Makarand Jadhav
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: