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

Expand build parameters

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Would be nice if it expanded build parameters using Util.replaceMacro() or EnvVars.expand()

        Attachments

          Activity

          Hide
          brantone Brantone added a comment -

          I've done this on a couple other plugins, I'll see if I can squeeze in the time to do it ... but shouldn't stop others from giving it a go.

          Show
          brantone Brantone added a comment - I've done this on a couple other plugins, I'll see if I can squeeze in the time to do it ... but shouldn't stop others from giving it a go.
          Hide
          vjuranek vjuranek added a comment -

          Hi, what exactly you like to expand? Most of the options are check boxes... is it external delete command?

          Show
          vjuranek vjuranek added a comment - Hi, what exactly you like to expand? Most of the options are check boxes... is it external delete command?
          Hide
          brantone Brantone added a comment - - edited

          In the current use, applies to a Publish step, so that "Patterns for files to be deleted" can take in a build parameter, ex: "${folder_to_delete}".
          Tried couple different ways and doesn't expand that to it's corresponding value using EnvVars.expand() , or even Util.replaceMacro() which would be useful for cases where the param can be set at some point in the build.

          I would imagine the optimal location would be:
          https://github.com/jenkinsci/ws-cleanup-plugin/blob/master/src/main/java/hudson/plugins/ws_cleanup/RemoteCleaner.java#L58

          Use the build var to expand/replace params on List<Pattern> patterns.

          Would that be optimal?

          Show
          brantone Brantone added a comment - - edited In the current use, applies to a Publish step, so that "Patterns for files to be deleted" can take in a build parameter, ex: "${folder_to_delete}". Tried couple different ways and doesn't expand that to it's corresponding value using EnvVars.expand() , or even Util.replaceMacro() which would be useful for cases where the param can be set at some point in the build. I would imagine the optimal location would be: https://github.com/jenkinsci/ws-cleanup-plugin/blob/master/src/main/java/hudson/plugins/ws_cleanup/RemoteCleaner.java#L58 Use the build var to expand/replace params on List<Pattern> patterns. Would that be optimal?
          Show
          littleccguy Mark Sanders added a comment - I too could use this. http://stackoverflow.com/questions/38795871/jenkins-clean-workspace-directory-with-paramater?noredirect=1#comment64973239_38795871
          Hide
          brantone Brantone added a comment -
          Show
          brantone Brantone added a comment - Initial attempt at https://github.com/jenkinsci/ws-cleanup-plugin/pull/31 Thoughts?

            People

            Assignee:
            brantone Brantone
            Reporter:
            brantone Brantone
            Votes:
            3 Vote for this issue
            Watchers:
            7 Start watching this issue

              Dates

              Created:
              Updated: