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

Pipeline support in EnvInject

    XMLWordPrintable

    Details

    • Epic Name:
      Pipeline support in EnvInject
    • Similar Issues:

      Description

      EnvInject does not support Pipeline now. Though there are many workarounds, it would be useful to address particular integration use-cases

        Attachments

          Issue Links

            Activity

            Hide
            basil Basil Crow added a comment -

            Hi Oleg Nenashev, I don't think I am missing anything. Thanks for addressing this! I have now posted two pull requests in order to add pipeline support to the URL Trigger plugin, using envinject-api 1.2 in order to do so.

            Show
            basil Basil Crow added a comment - Hi Oleg Nenashev , I don't think I am missing anything. Thanks for addressing this! I have now posted two pull requests in order to add pipeline support to the URL Trigger plugin, using envinject-api 1.2 in order to do so.
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            Unfortunately I will not have time to work on EnvInject issues for a while. I decided to unassign all issues so that somebody can take them and finalize.

            Context: The plugin has been waiting for adoption for ~2 years. During all this time I was trying to keep this plugin afloat by reviewing the incoming pull requests, fixing defects and keeping the codebase up to date to simplify the handover. But I have not been using this plugin on my own so that such maintenance was a bit lame. I invite all active users to contribute to the plugin by taking ownership of this plugin and of EnvInject API. I am happy to provide any required knowledge transfers and do some assistance during the first months of maintenance

            Show
            oleg_nenashev Oleg Nenashev added a comment - Unfortunately I will not have time to work on EnvInject issues for a while. I decided to unassign all issues so that somebody can take them and finalize. Context: The plugin has been waiting for adoption for ~2 years. During all this time I was trying to keep this plugin afloat by reviewing the incoming pull requests, fixing defects and keeping the codebase up to date to simplify the handover. But I have not been using this plugin on my own so that such maintenance was a bit lame. I invite all active users to contribute to the plugin by taking ownership of this plugin and of EnvInject API. I am happy to provide any required knowledge transfers and do some assistance during the first months of maintenance
            Hide
            gvswanand Swanand Gajendragadkar added a comment -

            As per description, there are multiple workarounds. Can anybody put link to workaround page, or mention some workarounds here?

            Show
            gvswanand Swanand Gajendragadkar added a comment - As per description, there are multiple workarounds. Can anybody put link to workaround page, or mention some workarounds here?
            Hide
            cmchoi Charles Choi added a comment - - edited

            In pipeline "Properties Content",Path=$Path;$JAVA
            bin;C:
            Program Files (x86)\\PuTTY;C:\\NGS\\bin;C:\\Python27;C:
            Python27
            Scripts

            $Path is not evaluated.

            How to "Inject environment variables" using pipeline syntax?

            I would like to see workarounds documentation.

            Show
            cmchoi Charles Choi added a comment - - edited In pipeline "Properties Content",Path=$Path;$JAVA bin;C: Program Files (x86)\\PuTTY;C:\\NGS\\bin;C:\\Python27;C: Python27 Scripts $Path is not evaluated. How to "Inject environment variables" using pipeline syntax? I would like to see workarounds documentation.
            Hide
            alexz Alex Z added a comment - - edited

            Pass text-yaml variable to job:

            like

            EXTRA_VARIABLES_YAML:

            variabl1: value1

            then, merge extra data into job env:

            def mergeEnv(envVar, extraVars) {
             try {
             def extraParams = readYaml text: extraVars
             for(String key in extraParams.keySet()) {
             envVar[key] = extraParams[key]
             println("Parameter ${key} is updated from EXTRA vars.")
             }
             } catch (Exception e) {
            println("Can't update env parameteres, because: ${e.toString()}")
             }
            }
            
             
            
            extraVarsYAML = env.EXTRA_VARIABLES_YAML.trim() ?: ''
            if (extraVarsYAML) {
            mergeEnv(env, extraVarsYAML)
             extraVars = readYaml text: extraVarsYAML
            } else {
             extraVars = [:]
            }
            
            
            Show
            alexz Alex Z added a comment - - edited Pass text-yaml variable to job: like EXTRA_VARIABLES_YAML: variabl1: value1 then, merge extra data into job env: def mergeEnv(envVar, extraVars) { try { def extraParams = readYaml text: extraVars for(String key in extraParams.keySet()) { envVar[key] = extraParams[key] println("Parameter ${key} is updated from EXTRA vars.") } } catch (Exception e) { println("Can't update env parameteres, because: ${e.toString()}") } }   extraVarsYAML = env.EXTRA_VARIABLES_YAML.trim() ?: '' if (extraVarsYAML) { mergeEnv(env, extraVarsYAML) extraVars = readYaml text: extraVarsYAML } else { extraVars = [:] }

              People

              • Assignee:
                Unassigned
                Reporter:
                oleg_nenashev Oleg Nenashev
              • Votes:
                20 Vote for this issue
                Watchers:
                29 Start watching this issue

                Dates

                • Created:
                  Updated: