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

Maven metadata plugin does not work with timers

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • maven-metadata-plugin
    • None
    • Jenkins 1.651.3
      Maven Metadata Plugin 1.41

      We´ve created a (freestyle) job with one parameter of type "List maven artifact versions".

      We use a regex to filter the versions of the available artifacts.

      When starting the job manually, all available versions are filtered using the given RegEx showing up a chooce-list with lets say all releases of my Pattern. If I select one I can access the choosen version in as shell step with $COMPONENT_VERSION:

      Started by user foo/me  (....)
      [EnvInject] - Loading node environment variables.
      Building on master in workspace /path/to/build_server/jenkins/jobs/xx_choose-version-freestyle/workspace
      ...
      + echo 'version selected: 1.2.0-b3633-r10121'
      version selected: 1.2.0-b3633-r10121

      When the same job is triggered by a cron (*/5 * * * 1-5) the result is different:

      The returned value of $COMPONENT_VERSION is empty:

      Started by timer
      [EnvInject] - Loading node environment variables.
      Building on master in workspace /path/to/build_server/jenkins/jobs/xx_choose-version-freestyle/workspace
      ...
      + echo 'version selected: '
      version selected: 

      I would expect the plugin will return the same value - regardless of the way the job was started.

            gesh Gesh Markov
            torstenreinhard Torsten Reinhard
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: