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

Build from properties file fails if workspace does not exist

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Labels:
      None
    • Environment:
      RHEL 5.5, Jenkins 1.551, parameterized trigger 2.23 and later.
    • Similar Issues:

      Description

      Due to a change implemented in JENKINS-21013(FileBuildParameters.java: ~100), if the workspace does not exist, the attempt to read parameters from that file is skipped. However, there is nothing that restricts the parameter file to be in the workspace, so the check is inaccurately flagging that the parameter file doesn't need to be searched for.

      I place parameter files in ${WORKSPACE}/.. so that I could use the workspace cleanup plugin along with the trigger parameterized build plugin. Since the workspace is cleaned up on jobs first, now the parameterized build trigger skips the check and doesn't read the parameter file, even though it exists. I would think this is a fairly typical use case scenario, but have no evidence to support this.

      It would be nice if that check was taken out, so parameter files could once again be anywhere on the build slave.

        Attachments

          Issue Links

            Activity

            Hide
            ikedam ikedam added a comment -

            It is good for you if "Parameters from properties file" supports absolute path, isn't it?
            Let me know details of your use case to improve that new feature if you wouldn't mind.

            Show
            ikedam ikedam added a comment - It is good for you if "Parameters from properties file" supports absolute path, isn't it? Let me know details of your use case to improve that new feature if you wouldn't mind.
            Hide
            cmayeux Caleb Mayeux added a comment -

            @ikeadam, yes, I'd like the plugin to support absolute or relative (to workspace) path, with support for token macros (variables). I'm not really asking for a new feature, as this support already exists. There's just a few lines of code that were introduced that skip the path resolution if the workspace was already deleted that I'd like to remove. I did a pull request for this here: https://github.com/jenkinsci/parameterized-trigger-plugin/pull/64

            Show
            cmayeux Caleb Mayeux added a comment - @ikeadam, yes, I'd like the plugin to support absolute or relative (to workspace) path, with support for token macros (variables). I'm not really asking for a new feature, as this support already exists. There's just a few lines of code that were introduced that skip the path resolution if the workspace was already deleted that I'd like to remove. I did a pull request for this here: https://github.com/jenkinsci/parameterized-trigger-plugin/pull/64
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: ikedam
            Path:
            src/main/java/hudson/plugins/parameterizedtrigger/FileBuildParameters.java
            src/test/java/hudson/plugins/parameterizedtrigger/test/FileBuildTriggerConfigTest.java
            http://jenkins-ci.org/commit/parameterized-trigger-plugin/7f79c142056bbb2156d75d137a988c7650f99619
            Log:
            JENKINS-23084 [FIXED JENKINS-22229] Allow using parameter files even if no workspace exists.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: ikedam Path: src/main/java/hudson/plugins/parameterizedtrigger/FileBuildParameters.java src/test/java/hudson/plugins/parameterizedtrigger/test/FileBuildTriggerConfigTest.java http://jenkins-ci.org/commit/parameterized-trigger-plugin/7f79c142056bbb2156d75d137a988c7650f99619 Log: JENKINS-23084 [FIXED JENKINS-22229] Allow using parameter files even if no workspace exists.
            Hide
            ikedam ikedam added a comment -

            This fix is released in parameterized-trigger plugin 2.25.
            It will be available in a day.
            Please try that.

            Show
            ikedam ikedam added a comment - This fix is released in parameterized-trigger plugin 2.25. It will be available in a day. Please try that.

              People

              • Assignee:
                huybrechts huybrechts
                Reporter:
                cmayeux Caleb Mayeux
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: