Skip to content

Unable to include non-string env vars #9

Description

@ipsi

If I have an env section like:

env:
  SKIP_SSL_VALIDATION: true

Then I get the following error:

java.lang.ClassCastException: java.lang.Boolean cannot be cast to java.lang.String
    at com.hpe.cloudfoundryjenkins.DeploymentInfo.expandTokenMacros(DeploymentInfo.java:304)
    at com.hpe.cloudfoundryjenkins.DeploymentInfo.<init>(DeploymentInfo.java:57)
    at com.hpe.cloudfoundryjenkins.CloudFoundryPushPublisher.perform(CloudFoundryPushPublisher.java:175)
    at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
    at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
    at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723)
    at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.post2(MavenModuleSetBuild.java:1047)
    at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668)
    at hudson.model.Run.execute(Run.java:1763)
    at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:531)
    at hudson.model.ResourceController.execute(ResourceController.java:98)
    at hudson.model.Executor.run(Executor.java:410)

I would not expect that error. It can be worked around by quoting the manifest value, e.g.

env:
  SKIP_SSL_VALIDATION: "true"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions