Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Null value not allowed as an environment variable: DOCKER_CONTAINER_ID #759

Closed
cpfeiffer opened this issue Nov 4, 2019 · 1 comment · Fixed by #764
Closed

Null value not allowed as an environment variable: DOCKER_CONTAINER_ID #759

cpfeiffer opened this issue Nov 4, 2019 · 1 comment · Fixed by #764

Comments

@cpfeiffer
Copy link

cpfeiffer commented Nov 4, 2019

  • docker-plugin 1.1.8
  • matrix project plugin 1.1.4
  • build name and description setter 2.0.3
  • token macro plugin 2.10
  • Jenkins 2.190.2

This probably happens early when there is no node yet, so getEnvironment() should make this an empty string in that case.
Actually this happens at the end of the build. We configured
Set build name before build starts and NOT
Set build name after build ends, so I don't quite understand why this happens in endBuild().

java.lang.IllegalArgumentException: Null value not allowed as an environment variable: DOCKER_CONTAINER_ID
	at hudson.EnvVars.put(EnvVars.java:379)
	at io.jenkins.docker.DockerComputer.getEnvironment(DockerComputer.java:51)
	at jenkins.model.CoreEnvironmentContributor.buildEnvironmentFor(CoreEnvironmentContributor.java:30)
	at hudson.model.Run.getEnvironment(Run.java:2350)
	at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:864)
	at org.jenkinsci.plugins.tokenmacro.TokenMacro.expandAll(TokenMacro.java:220)
	at org.jenkinsci.plugins.tokenmacro.TokenMacro.expandAll(TokenMacro.java:207)
	at org.jenkinsci.plugins.buildnamesetter.Executor.evaluateMacro(Executor.java:75)
	at org.jenkinsci.plugins.buildnamesetter.Executor.setName(Executor.java:30)
	at org.jenkinsci.plugins.buildnamesetter.BuildNameSetter$2.endBuild(BuildNameSetter.java:117)
	at hudson.matrix.MatrixBuild$MatrixBuildExecution.post2(MatrixBuild.java:433)
	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
	at hudson.model.Run.execute(Run.java:1840)
	at hudson.matrix.MatrixBuild.run(MatrixBuild.java:323)
	at hudson.model.ResourceController.execute(ResourceController.java:97)
	at hudson.model.Executor.run(Executor.java:429)
@pjdarton
Copy link
Member

Code changes went into released of docker-plugin version 1.1.9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants