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

Environment variables for build session not available for use in plugin text fields.

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • cloudfoundry-plugin
    • None
    • Windows or Linux server

      When using the plugin Environment variables are not seed correctly using the standard token syntax for Jenkins provided by the token-macro plugin. This is a show stopper for our projects as we need to pass org and space information dynamically using parameters to jobs.

      For a parameter "space" The error is:

      Cloud Foundry Plugin:
      java.lang.IllegalArgumentException: No matching organization and space found for org: my-organization space: ${space}
      

          [JENKINS-31208] Environment variables for build session not available for use in plugin text fields.

          I have the same problem: I try to use string parameters to pass dynamically the organization and space but they are not passed.
          The error is:
          Cloud Foundry Plugin:
          java.lang.IllegalArgumentException: No matching organization and space found for org: my-organization space: ${space}

          The ${space} is not managed.

          It's really a big issue for automatization and parametrized deployment.

          Romain Schlick added a comment - I have the same problem: I try to use string parameters to pass dynamically the organization and space but they are not passed. The error is: Cloud Foundry Plugin: java.lang.IllegalArgumentException: No matching organization and space found for org: my-organization space: ${space} The ${space} is not managed. It's really a big issue for automatization and parametrized deployment.

          Steven Swor added a comment -

          jasonbarrios and/or rschlick - Can you check if this is still an issue in the 2.x version of the plugin? My guess is it's still an issue but I want to confirm.

          Steven Swor added a comment - jasonbarrios and/or rschlick - Can you check if this is still an issue in the 2.x version of the plugin? My guess is it's still an issue but I want to confirm.

          Haluk Ozen added a comment - - edited

          Hi sworisbreathing we are currently on 2.2.0 version and problem still seems like continue, 

          do you have any plans for the fix. ?

          Regards

          Haluk Ozen added a comment - - edited Hi sworisbreathing we are currently on 2.2.0 version and problem still seems like continue,  do you have any plans for the fix. ? Regards

          Yusuf Chang added a comment - - edited

          Has same problem with version 2.2.0, try to use parameterized string to pass dynamically org and space.

          Cloud Foundry Plugin:
          java.lang.IllegalArgumentException: Organization $org does not exist
          	at org.cloudfoundry.util.ExceptionUtils.illegalArgument(ExceptionUtils.java:45)

          Any plan for the fix?

          Best Regards,
          Yusuf 

          Yusuf Chang added a comment - - edited Has same problem with version 2.2.0, try to use parameterized string to pass dynamically org and space. Cloud Foundry Plugin: java.lang.IllegalArgumentException: Organization $org does not exist at org.cloudfoundry.util.ExceptionUtils.illegalArgument(ExceptionUtils.java:45) Any plan for the fix? Best Regards, Yusuf 

          Steven Swor added a comment -

          Hi jasonbarrios, rschlick, halukozen, and yusufchang,

          I've started working on this on my fork today. See PR #18. Happy to take further input on the specifics of that approach as comments on the PR.

          Apologies for the delay - it's been hard to find the time to work on the plugin. And it's taken a bit longer than expected to understand where and how to do the token macro substitution.

          Steven Swor added a comment - Hi jasonbarrios , rschlick , halukozen , and yusufchang , I've started working on this on my fork today. See PR #18 . Happy to take further input on the specifics of that approach as comments on the PR. Apologies for the delay - it's been hard to find the time to work on the plugin. And it's taken a bit longer than expected to understand where and how to do the token macro substitution.

          Steven Swor added a comment - - edited

          Fixed in 2.3.0

          Steven Swor added a comment - - edited Fixed in 2.3.0

          Steven Swor added a comment -

          whoops I forgot to add token expansion for a few more settings. Will push up a fix soon

          Steven Swor added a comment - whoops I forgot to add token expansion for a few more settings. Will push up a fix soon

          Steven Swor added a comment -

          Fixed in 2.3.1

          Steven Swor added a comment - Fixed in 2.3.1

            sworisbreathing Steven Swor
            jasonbarrios Jason Barrios
            Votes:
            5 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: