• Icon: Bug Bug
    • Resolution: Postponed
    • Icon: Major Major
    • multijob-plugin
    • None

      For some reason the condition you type inside "Enable condition" field is always downcased:
      https://github.com/jenkinsci/tikal-multijob-plugin/blob/master/src/main/java/com/tikal/jenkins/plugins/multijob/MultiJobBuilder.java#L136
      (introduced in https://github.com/jenkinsci/tikal-multijob-plugin/blob/4260fc5c317ea1328129777e0987a2fceceffd15/src/main/java/com/tikal/jenkins/plugins/multijob/MultiJobBuilder.java#L103)

      This makes it nearly unusable – you can't retrieve variables like BUILD_ID, you can't call functions like toUpperCase()

          [JENKINS-27025] Condition for phase job is always downcased

          ronil, itaior, itai I've sent a pullrequest for that, please take a look if you can merge it: https://github.com/jenkinsci/tikal-multijob-plugin/pull/63

          BTW, the tickets get assigned to nobody. Are you no longer supporting the plugin? Do you know to whom should I write to change the default assignee for the component?

          Timur Batyrshin added a comment - ronil , itaior , itai I've sent a pullrequest for that, please take a look if you can merge it: https://github.com/jenkinsci/tikal-multijob-plugin/pull/63 BTW, the tickets get assigned to nobody. Are you no longer supporting the plugin? Do you know to whom should I write to change the default assignee for the component?

          Daniel Beck added a comment -

          Default assignee can be changed by Jenkins core devs. Best to email the jenkinsci-dev list with your request.

          Daniel Beck added a comment - Default assignee can be changed by Jenkins core devs. Best to email the jenkinsci-dev list with your request.

          I approve this fix. If you need downcased, you can call toLowerCase in the condition (ex: "${Parameter}".toLowerCase() == "munch").

          This plugin is supported, but it doesn't have default assignee.

          Mathieu Cantin added a comment - I approve this fix. If you need downcased, you can call toLowerCase in the condition (ex: "${Parameter}".toLowerCase() == "munch"). This plugin is supported, but it doesn't have default assignee.

          Paul Milliken added a comment -

          I've just hit this in an integration build. Specifically, I've got one phase that depends on whether a previous build generated a particular file (we use this to allow certain expensive parts of the build to be skipped if the relevant components haven't been affected).

          !new FilePath(Jenkins.instance.getJob('otherjob').lastBuild.workspace,"flag.file").exists()

          works perfectly in the Jenkins script console, but when used as a phase condition gives

          Script1.groovy: 1: unable to resolve class filepath

          This makes the condition feature almost useless. I tried wrapping the phase in a conditional build step instead, but that doesn't let me check for a file's existence in a different job's workspace.

          Paul Milliken added a comment - I've just hit this in an integration build. Specifically, I've got one phase that depends on whether a previous build generated a particular file (we use this to allow certain expensive parts of the build to be skipped if the relevant components haven't been affected). !new FilePath(Jenkins.instance.getJob('otherjob').lastBuild.workspace,"flag.file").exists() works perfectly in the Jenkins script console, but when used as a phase condition gives Script1.groovy: 1: unable to resolve class filepath This makes the condition feature almost useless. I tried wrapping the phase in a conditional build step instead, but that doesn't let me check for a file's existence in a different job's workspace.

          Josh Davidson added a comment -

          Similar situation to Paul's. I was trying to do something like the following:

          new File('somefilehere').exists()) != true

          Josh Davidson added a comment - Similar situation to Paul's. I was trying to do something like the following: new File('somefilehere').exists()) != true

          Brian Hsieh added a comment -

          Having the same problem. This problem makes the condition unusable.

          Brian Hsieh added a comment - Having the same problem. This problem makes the condition unusable.

          Code changed in jenkins
          User: shachar ben-zeev
          Path:
          src/main/java/com/tikal/jenkins/plugins/multijob/MultiJobBuilder.java
          http://jenkins-ci.org/commit/tikal-multijob-plugin/8793063d090be2b426013b69371d91324d79c39a
          Log:
          don't downcase the conditional in multijob job JENKINS-27025 + fix comment

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: shachar ben-zeev Path: src/main/java/com/tikal/jenkins/plugins/multijob/MultiJobBuilder.java http://jenkins-ci.org/commit/tikal-multijob-plugin/8793063d090be2b426013b69371d91324d79c39a Log: don't downcase the conditional in multijob job JENKINS-27025 + fix comment

          Code changed in jenkins
          User: Shachar Ben-Zeev
          Path:
          src/main/java/com/tikal/jenkins/plugins/multijob/MultiJobBuilder.java
          http://jenkins-ci.org/commit/tikal-multijob-plugin/254cc5025aab1a2f0655db9c76af80a57132ee79
          Log:
          Merge pull request #91 from shacharbz/master

          don't downcase the conditional in multijob job JENKINS-27025 + fix comment

          Compare: https://github.com/jenkinsci/tikal-multijob-plugin/compare/93a4453f1c25...254cc5025aab

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Shachar Ben-Zeev Path: src/main/java/com/tikal/jenkins/plugins/multijob/MultiJobBuilder.java http://jenkins-ci.org/commit/tikal-multijob-plugin/254cc5025aab1a2f0655db9c76af80a57132ee79 Log: Merge pull request #91 from shacharbz/master don't downcase the conditional in multijob job JENKINS-27025 + fix comment Compare: https://github.com/jenkinsci/tikal-multijob-plugin/compare/93a4453f1c25...254cc5025aab

          Closing issue as part of tikal-multijob-plugin issues cleanup.
          If still relevant, please open a matching issue in https://github.com/jenkinsci/tikal-multijob-plugin/issues (you can refer to this issue in its description)

          Yoram Michaeli added a comment - Closing issue as part of tikal-multijob-plugin issues cleanup. If still relevant, please open a matching issue in https://github.com/jenkinsci/tikal-multijob-plugin/issues (you can refer to this issue in its description)

            Unassigned Unassigned
            erthad Timur Batyrshin
            Votes:
            3 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: