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

EnvInject Plugin doesn't work correctly with combination of Subversion Plugin and Pre SCM BuildStep Plugin

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • envinject-plugin
    • None
    • Jenkins LTS 1.625.2
      OS - CentOS 7.1
      Subversion Plugin - 2.5.4
      EnvInject Plugin - 1.92.1
      Pre SCM BuildStep Plugin - 0.3

      If I add a Build Step "Inject environment variables" in the section which appears after clicking "Run buildstep before SCM runs" in order to inject environment variable USE_VER then "Subversion plugin" will not set SVN_* environment variables.

      Job configuration config.xml-bad
      Console output consoleText-bad

      This works fine also if instead of "Inject environment variables" I use "Execute system Groovy script" Build Step from Groovy Plugin

      import hudson.model.ParametersAction
      import hudson.model.StringParameterValue

      def paSvnUrl = new ParametersAction([
      new StringParameterValue("USE_VER", "1712454")
      ])
      build.addAction(paSvnUrl)

      See config.xml-good
      See consoleText-good

      Another way to make it work is to set a node environment variable with the same name and any numeric value. In this case the value set for node environment variable is ignored. On the other hand if node environment variable is set to a non-numeric value then the problem still happens.

      This is not a bug in Subversion Plugin - see https://issues.jenkins-ci.org/browse/JENKINS-31520

        1. config.xml-bad
          3 kB
        2. config.xml-good
          3 kB
        3. consoleText-bad
          0.7 kB
        4. consoleText-good
          0.7 kB

          [JENKINS-31602] EnvInject Plugin doesn't work correctly with combination of Subversion Plugin and Pre SCM BuildStep Plugin

          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

          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

            Unassigned Unassigned
            slawomir_czarko Slawomir Czarko
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: