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

    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

          maverick_219 Makarand Jadhav created issue -
          maverick_219 Makarand Jadhav made changes -
          Field Original Value New Value
          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_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' {
          {color:red}Name('APP_Share_dev'){color}
          verbose('true')
          useWorkspaceInPromotion(false)
          usePromotionTimestamp(false)
          transfers {
          'jenkins.plugins.publish__over__cifs.CifsTransfer' {
          {color:red}sourceFiles('app.ear'){color}
          excludes('')
          {color:red}remoteDirectory("app\\ws\\ear"){color}
          removePrefix('')
          remoteDirectorySDF(false)
          flatten(false)
          {color:red}cleanRemote(true){color}
          noDefaultExcludes(false)
          {color:red}makeEmptyDirs(true){color}
          patternSeparator('[, ]+')
          }
          }
          continueOnError('false')
          {color:red}failOnError('true'){color}
          alwaysPublishFromMaster('false')
          }
          }
          }
          }

          Am I missing something here? Please let me know if the above implementation is correct in the Groovy Script.
          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.
          slide_o_mix Alex Earl made changes -
          Assignee bap [ bap ] Alex Earl [ slide_o_mix ]
          slide_o_mix Alex Earl made changes -
          Component/s job-dsl-plugin [ 16720 ]
          slide_o_mix Alex Earl made changes -
          Assignee Alex Earl [ slide_o_mix ] Daniel Spilker [ daspilker ]
          daspilker Daniel Spilker made changes -
          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.
          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):

          {code}
          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')
          }
          }
          }
          // }
          }
          {code}

          Am I missing something here? Please let me know if the above implementation is correct in the Groovy Script.
          daspilker Daniel Spilker made changes -
          Resolution Cannot Reproduce [ 5 ]
          Status Open [ 1 ] Resolved [ 5 ]
          daspilker Daniel Spilker made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

          People

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

            Dates

              Created:
              Updated:
              Resolved: