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

Job-dsl-plugin support for envInject plugin

    Details

    • Similar Issues:

      Description

      Hi,

      I would like to create jobs using the envInject plugin using the job-dsl-plugin though this doesn't seem to be supported yet

      Thanks

        Attachments

          Activity

          Hide
          hibbs82 Andrew Hibbert added a comment -

          In particular the "Evaluated Groovy script" bit

          Show
          hibbs82 Andrew Hibbert added a comment - In particular the "Evaluated Groovy script" bit
          Hide
          hibbs82 Andrew Hibbert added a comment -

          I receive this error

          Processing DSL script BuildJenkinsBaseMasterImageDSL.groovy
          ERROR: (BuildJenkinsBaseMasterImageDSL.groovy, line 27) No signature of method: javaposse.jobdsl.dsl.jobs.FreeStyleJob.envInjectJobProperty() is applicable for argument types: (BuildJenkinsBaseMasterImageDSL$_run_closure1$_closure3) values: [BuildJenkinsBaseMasterImageDSL$_run_closure1$_closure3@60c21744]
          Show
          hibbs82 Andrew Hibbert added a comment - I receive this error Processing DSL script BuildJenkinsBaseMasterImageDSL.groovy ERROR: (BuildJenkinsBaseMasterImageDSL.groovy, line 27) No signature of method: javaposse.jobdsl.dsl.jobs.FreeStyleJob.envInjectJobProperty() is applicable for argument types: (BuildJenkinsBaseMasterImageDSL$_run_closure1$_closure3) values: [BuildJenkinsBaseMasterImageDSL$_run_closure1$_closure3@60c21744]
          Hide
          daspilker Daniel Spilker added a comment -

          This is supported by the Automatically Generated DSL:

          job(String name) {
            properties {
              envInjectJobProperty {
                info {
                  // Gives a file path of a properties file.
                  propertiesFilePath(String value)
                  // Give a set of key/value (one variable per line): KEY=VALUE.
                  propertiesContent(String value)
                  // Execute a script file aimed at setting an environment such a create folders, copying files, and so on.
                  scriptFilePath(String value)
                  // Execute a script file aimed at setting an environment such as creating folders, copying files, and so on.
                  scriptContent(String value)
                  // Evaluate a Groovy script and inject a map result.
                  groovyScriptContent(String value)
                  // Load files (properties or scripts) from the master node.
                  loadFilesFromMaster(boolean value)
                }
              }
            }
          } 
          
          Show
          daspilker Daniel Spilker added a comment - This is supported by the Automatically Generated DSL : job( String name) { properties { envInjectJobProperty { info { // Gives a file path of a properties file. propertiesFilePath( String value) // Give a set of key/value (one variable per line): KEY=VALUE. propertiesContent( String value) // Execute a script file aimed at setting an environment such a create folders, copying files, and so on. scriptFilePath( String value) // Execute a script file aimed at setting an environment such as creating folders, copying files, and so on. scriptContent( String value) // Evaluate a Groovy script and inject a map result. groovyScriptContent( String value) // Load files (properties or scripts) from the master node. loadFilesFromMaster( boolean value) } } } }
          Hide
          hibbs82 Andrew Hibbert added a comment - - edited

          Thanks. Was able to get this working

          Show
          hibbs82 Andrew Hibbert added a comment - - edited Thanks. Was able to get this working

            People

            • Assignee:
              daspilker Daniel Spilker
              Reporter:
              hibbs82 Andrew Hibbert
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: