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

WebLogic deployer does not expand variables

    Details

    • Similar Issues:

      Description

      I would like to use a base directory relative to ${WORKSPACE}.
      In other plugins, I can just write ${WORKSPACE}/foo/bar/baz.
      This does not work on the wl-deployer.

      It would be nice to have this in all configuration options (e.g. global + per-job options)

      See first answer here for a hint on how to implement this:
      http://stackoverflow.com/questions/23800416/jenkins-inject-environment-variable-in-jelly-field

        Attachments

          Activity

          Hide
          raphc Raphael CHAUMIER added a comment -

          I'll just add the possibility to expand variables for path(s).

          Show
          raphc Raphael CHAUMIER added a comment - I'll just add the possibility to expand variables for path(s).
          Hide
          jurkas74 Jurek Malinowski added a comment -

          I think it still doesn't work as expected (weblogic-deployer-plugin-3.2).
          If I set base directory to ${WORKSPACE}\build\dist I'll get error during deployment that "the base directory specified ${WORKSPACE}\build\dist is invalid". I looked at plugin's code and such string doesn't match pattern ENV_VAR_PATTERN at ParameterValueResolver class. Maybe it would be better to use in FreeStyleJobArtifactSelectorImpl instead of:

          String resolvedBaseDirectory = ParameterValueResolver.resolveEnvVar(baseDirectory, VarUtils.getEnvVars(build, listener));

          something like:
          EnvVars vars = build.getEnvironment(listener);
          String resolvedBaseDirectory = vars.expand(baseDirectory);

          Show
          jurkas74 Jurek Malinowski added a comment - I think it still doesn't work as expected (weblogic-deployer-plugin-3.2). If I set base directory to ${WORKSPACE}\build\dist I'll get error during deployment that "the base directory specified ${WORKSPACE}\build\dist is invalid". I looked at plugin's code and such string doesn't match pattern ENV_VAR_PATTERN at ParameterValueResolver class. Maybe it would be better to use in FreeStyleJobArtifactSelectorImpl instead of: String resolvedBaseDirectory = ParameterValueResolver.resolveEnvVar(baseDirectory, VarUtils.getEnvVars(build, listener)); something like: EnvVars vars = build.getEnvironment(listener); String resolvedBaseDirectory = vars.expand(baseDirectory);
          Hide
          stargazer66 Jeff Huston added a comment -

          What's the status on this? The documentation specifically cites ${WORKSPACE} within base directory, however, this doesn't seem to be getting expanded?

          Show
          stargazer66 Jeff Huston added a comment - What's the status on this? The documentation specifically cites ${WORKSPACE} within base directory, however, this doesn't seem to be getting expanded?
          Hide
          raphc Raphael CHAUMIER added a comment - - edited

          Hi,

          This issue is not fixed yet. The wiki is outdated or was too quickly updated

          I don't have time to work on it for now. Is this issue prevent you to use the plugin?

          Show
          raphc Raphael CHAUMIER added a comment - - edited Hi, This issue is not fixed yet. The wiki is outdated or was too quickly updated I don't have time to work on it for now. Is this issue prevent you to use the plugin?
          Hide
          raphc Raphael CHAUMIER added a comment -

          Hi Jeff Huston

          I've just released a new version (3.3) with your fix. Tell me if it's ok for you.

          Regards

          Show
          raphc Raphael CHAUMIER added a comment - Hi Jeff Huston I've just released a new version (3.3) with your fix. Tell me if it's ok for you. Regards

            People

            • Assignee:
              raphc Raphael CHAUMIER
              Reporter:
              christophlinder Christoph Linder
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: