java.lang.IllegalArgumentException: Null value not allowed as an environment variable: REPOVERSION

Jenkins JIRA | Andres Garcia | 5 months ago
  1. 0

    Builds are not triggered via Poll SCM. This error is solved when server is restart. {noformat} ERROR: Build step failed with exception java.lang.IllegalArgumentException: Null value not allowed as an environment variable: REPOVERSION at hudson.EnvVars.put(EnvVars.java:356) at hudson.model.StringParameterValue.buildEnvironment(StringParameterValue.java:56) at hudson.model.ParametersAction.buildEnvVars(ParametersAction.java:89) at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:953) at hudson.plugins.gradle.Gradle.performTask(Gradle.java:127) at hudson.plugins.gradle.Gradle.perform(Gradle.java:118) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:785) at hudson.model.Build$BuildExecution.build(Build.java:205) at hudson.model.Build$BuildExecution.doRun(Build.java:162) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:537) at hudson.model.Run.execute(Run.java:1741) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:408) Build step 'Invoke Gradle script' marked build as failure ERROR: Failed to evaluate groovy script. java.lang.IllegalArgumentException: Null value not allowed as an environment variable: REPOVERSION at hudson.EnvVars.put(EnvVars.java:356) at hudson.model.StringParameterValue.buildEnvironment(StringParameterValue.java:56) at hudson.model.ParametersAction.buildEnvVars(ParametersAction.java:89) at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:953) at hudson.model.AbstractBuild$getEnvironment.call(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116) at notifybuild.run(notifybuild.groovy:12) at groovy.lang.GroovyShell.evaluate(GroovyShell.java:580) at groovy.lang.GroovyShell.evaluate(GroovyShell.java:627) at groovy.lang.Script.evaluate(Script.java:219) at groovy.lang.Script$evaluate.callCurrent(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:46) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141) at Script1.run(Script1.groovy:1) at groovy.lang.GroovyShell.evaluate(GroovyShell.java:580) at groovy.lang.GroovyShell.evaluate(GroovyShell.java:618) at groovy.lang.GroovyShell.evaluate(GroovyShell.java:589) at org.jvnet.hudson.plugins.groovypostbuild.GroovyPostbuildRecorder.perform(GroovyPostbuildRecorder.java:276) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:785) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:726) at hudson.model.Build$BuildExecution.post2(Build.java:185) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:671) at hudson.model.Run.execute(Run.java:1766) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:408) Build step 'Groovy Postbuild' marked build as failure {noformat} Version of Jenkins this bug is occurring {noformat} Jenkins ver. 1.625.3 {noformat} Version of groovy plugin {noformat} ver. 1.14 {noformat} Version of groovy postbuild plugin {noformat} ver. 1.8 {noformat} Groovy script {noformat} import groovyx.net.http.RESTClient import static groovyx.net.http.ContentType.* import hudson.model.* def repoversion = "X" def env = build.getEnvironment() def projectName = build.project.getName() def commit = env['GIT_COMMIT'] int CONNECTION_TIMEOUT = 30*1000; int SOCKET_TIMEOUT = 45*1000; try{ def solnet = new RESTClient( 'http://ip_adress/' ) solnet.getClient().getParams().setParameter("http.connection.timeout", new Integer(CONNECTION_TIMEOUT)) solnet.getClient().getParams().setParameter("http.socket.timeout", new Integer(SOCKET_TIMEOUT)) def resp = solnet.get( path : 'repo_get_version.php', query: ['name':projectName,'revision':commit]) if(resp.status == 200){ repoversion = resp.data.version } } catch(Exception e){ println e.getMessage() } def pa = new ParametersAction([ new StringParameterValue("REPOVERSION", repoversion) ]) // add variable to current job Thread.currentThread().executable.addAction(pa) {noformat}

    Jenkins JIRA | 5 months ago | Andres Garcia
    java.lang.IllegalArgumentException: Null value not allowed as an environment variable: REPOVERSION
  2. 0

    Builds are not triggered via Poll SCM. This error is solved when server is restart. {noformat} ERROR: Build step failed with exception java.lang.IllegalArgumentException: Null value not allowed as an environment variable: REPOVERSION at hudson.EnvVars.put(EnvVars.java:356) at hudson.model.StringParameterValue.buildEnvironment(StringParameterValue.java:56) at hudson.model.ParametersAction.buildEnvVars(ParametersAction.java:89) at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:953) at hudson.plugins.gradle.Gradle.performTask(Gradle.java:127) at hudson.plugins.gradle.Gradle.perform(Gradle.java:118) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:785) at hudson.model.Build$BuildExecution.build(Build.java:205) at hudson.model.Build$BuildExecution.doRun(Build.java:162) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:537) at hudson.model.Run.execute(Run.java:1741) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:408) Build step 'Invoke Gradle script' marked build as failure ERROR: Failed to evaluate groovy script. java.lang.IllegalArgumentException: Null value not allowed as an environment variable: REPOVERSION at hudson.EnvVars.put(EnvVars.java:356) at hudson.model.StringParameterValue.buildEnvironment(StringParameterValue.java:56) at hudson.model.ParametersAction.buildEnvVars(ParametersAction.java:89) at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:953) at hudson.model.AbstractBuild$getEnvironment.call(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116) at notifybuild.run(notifybuild.groovy:12) at groovy.lang.GroovyShell.evaluate(GroovyShell.java:580) at groovy.lang.GroovyShell.evaluate(GroovyShell.java:627) at groovy.lang.Script.evaluate(Script.java:219) at groovy.lang.Script$evaluate.callCurrent(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:46) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141) at Script1.run(Script1.groovy:1) at groovy.lang.GroovyShell.evaluate(GroovyShell.java:580) at groovy.lang.GroovyShell.evaluate(GroovyShell.java:618) at groovy.lang.GroovyShell.evaluate(GroovyShell.java:589) at org.jvnet.hudson.plugins.groovypostbuild.GroovyPostbuildRecorder.perform(GroovyPostbuildRecorder.java:276) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:785) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:726) at hudson.model.Build$BuildExecution.post2(Build.java:185) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:671) at hudson.model.Run.execute(Run.java:1766) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:408) Build step 'Groovy Postbuild' marked build as failure {noformat} Version of Jenkins this bug is occurring {noformat} Jenkins ver. 1.625.3 {noformat} Version of groovy plugin {noformat} ver. 1.14 {noformat} Version of groovy postbuild plugin {noformat} ver. 1.8 {noformat} Groovy script {noformat} import groovyx.net.http.RESTClient import static groovyx.net.http.ContentType.* import hudson.model.* def repoversion = "X" def env = build.getEnvironment() def projectName = build.project.getName() def commit = env['GIT_COMMIT'] int CONNECTION_TIMEOUT = 30*1000; int SOCKET_TIMEOUT = 45*1000; try{ def solnet = new RESTClient( 'http://ip_adress/' ) solnet.getClient().getParams().setParameter("http.connection.timeout", new Integer(CONNECTION_TIMEOUT)) solnet.getClient().getParams().setParameter("http.socket.timeout", new Integer(SOCKET_TIMEOUT)) def resp = solnet.get( path : 'repo_get_version.php', query: ['name':projectName,'revision':commit]) if(resp.status == 200){ repoversion = resp.data.version } } catch(Exception e){ println e.getMessage() } def pa = new ParametersAction([ new StringParameterValue("REPOVERSION", repoversion) ]) // add variable to current job Thread.currentThread().executable.addAction(pa) {noformat}

    Jenkins JIRA | 5 months ago | Andres Garcia
    java.lang.IllegalArgumentException: Null value not allowed as an environment variable: REPOVERSION
  3. 0

    Allow empty value in uno-choice widgets

    GitHub | 2 years ago | bes3
    java.lang.IllegalArgumentException: Null value not allowed as an environment variable: MY_VARIABLE
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    A user in a cloud setup in which there was one Maven installation defined, with no static installation directory but a plugin offering a location for cloud slaves, ran Subversion polling on a job and got this error: {code:none} java.lang.IllegalArgumentException: Null value not allowed as an environment variable: M2_HOME at hudson.EnvVars.put(EnvVars.java:172) at hudson.tasks.Maven$MavenInstallation.buildEnvVars(Maven.java:489) at hudson.maven.MavenModuleSetBuild.getEnvironment(MavenModuleSetBuild.java:172) at hudson.scm.SubversionSCM.compareRemoteRevisionWith(SubversionSCM.java:1230) at hudson.scm.SCM._compareRemoteRevisionWith(SCM.java:356) at hudson.scm.SCM.poll(SCM.java:373) at hudson.model.AbstractProject._poll(AbstractProject.java:1521) at hudson.model.AbstractProject.poll(AbstractProject.java:1446) at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:439) at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:468) at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:118) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) {code}

    Jenkins JIRA | 3 years ago | Jesse Glick
    java.lang.IllegalArgumentException: Null value not allowed as an environment variable: M2_HOME
  6. 0

    [JENKINS-21279] java.lang.IllegalArgumentException: Null value not allowed as an environment variable: POM_PACKAGING - Jenkins JIRA

    jenkins-ci.org | 1 year ago
    java.lang.IllegalArgumentException: Null value not allowed as an environment variable: POM_PACKAGING

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IllegalArgumentException

      Null value not allowed as an environment variable: REPOVERSION

      at hudson.EnvVars.put()
    2. Hudson
      AbstractBuild$getEnvironment.call
      1. hudson.EnvVars.put(EnvVars.java:356)
      2. hudson.model.StringParameterValue.buildEnvironment(StringParameterValue.java:56)
      3. hudson.model.ParametersAction.buildEnvVars(ParametersAction.java:89)
      4. hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:953)
      5. hudson.model.AbstractBuild$getEnvironment.call(Unknown Source)
      5 frames
    3. Groovy
      AbstractCallSite.call
      1. org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
      2. org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
      3. org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
      3 frames
    4. Unknown
      notifybuild.run
      1. notifybuild.run(notifybuild.groovy:12)
      1 frame
    5. Groovy
      AbstractCallSite.callCurrent
      1. groovy.lang.GroovyShell.evaluate(GroovyShell.java:580)
      2. groovy.lang.GroovyShell.evaluate(GroovyShell.java:627)
      3. groovy.lang.Script.evaluate(Script.java:219)
      4. groovy.lang.Script$evaluate.callCurrent(Unknown Source)
      5. org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:46)
      6. org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133)
      7. org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141)
      7 frames
    6. Unknown
      Script1.run
      1. Script1.run(Script1.groovy:1)
      1 frame
    7. Groovy
      GroovyShell.evaluate
      1. groovy.lang.GroovyShell.evaluate(GroovyShell.java:580)
      2. groovy.lang.GroovyShell.evaluate(GroovyShell.java:618)
      3. groovy.lang.GroovyShell.evaluate(GroovyShell.java:589)
      3 frames
    8. org.jvnet.hudson
      GroovyPostbuildRecorder.perform
      1. org.jvnet.hudson.plugins.groovypostbuild.GroovyPostbuildRecorder.perform(GroovyPostbuildRecorder.java:276)
      1 frame
    9. Hudson
      Executor.run
      1. hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      2. hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:785)
      3. hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:726)
      4. hudson.model.Build$BuildExecution.post2(Build.java:185)
      5. hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:671)
      6. hudson.model.Run.execute(Run.java:1766)
      7. hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      8. hudson.model.ResourceController.execute(ResourceController.java:98)
      9. hudson.model.Executor.run(Executor.java:408)
      9 frames