• Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Icon: Major Major
    • None
    • Jenkins 1.466.1
      URLTrigger 0.24
      EnvInject 1.57

      I'm polling a nexus URL to check changes of a SNAPSHOT maven artifact.
      I could hardcode the version but it's used in different places...

      The URL I want to poll looks like:

      http://myhost/service/local/artifact/maven/redirect?r=myrepo&g=mygroupid&a=myartifactid&v=${MY_VERSION}...
      

      The MY_VERSION variable is defined in Prepare an environment for the run -> Properties Content (with the envinject plugin).

          [JENKINS-15840] Use variables in URLs

          [URLTrigger] - Poll with a URL
          
          
          Inspecting Monitor a change of the content content for URL http://myhost/service/local/artifact/maven/redirect?r=myrepo&g=mygroupid&a=myartifactid&v=${MY_VERSION}
          
          Polling started on Nov 15, 2012 10:01:39 PM
          Polling for the job My_Job
          Looking nodes where the poll can be run.
          Looking for a candidate node to run the poll.
          Looking for a node with no predefined label.
          Trying to poll with the last built on node.
          
          Polling on master.
          Invoking the url: 
           http://myhost/service/local/artifact/maven/redirect?r=myrepo&g=mygroupid&a=myartifactid&v=${MY_VERSION}
          [ERROR] - SEVERE - Polling error null
          

          Dridi Boukelmoune added a comment - [URLTrigger] - Poll with a URL Inspecting Monitor a change of the content content for URL http: //myhost/service/local/artifact/maven/redirect?r=myrepo&g=mygroupid&a=myartifactid&v=${MY_VERSION} Polling started on Nov 15, 2012 10:01:39 PM Polling for the job My_Job Looking nodes where the poll can be run. Looking for a candidate node to run the poll. Looking for a node with no predefined label. Trying to poll with the last built on node. Polling on master. Invoking the url: http: //myhost/service/local/artifact/maven/redirect?r=myrepo&g=mygroupid&a=myartifactid&v=${MY_VERSION} [ERROR] - SEVERE - Polling error null

          URLTrigger (with other xTrigger plugins) cannot use injected environment variables in the prepare section. Injected environment variables are processed only at build time therefore after the build is scheduled. The objective of URLTrigger plugin is to know if the build has to be scheduled and it can't exploit variables computed during the build process triggered by URLTrigger (after this step).
          However, at the moment, previous injected enviornment variables ( from the previous build) are used by the URLTrigger to resolve environment variables if any

          Gregory Boissinot added a comment - URLTrigger (with other xTrigger plugins) cannot use injected environment variables in the prepare section. Injected environment variables are processed only at build time therefore after the build is scheduled. The objective of URLTrigger plugin is to know if the build has to be scheduled and it can't exploit variables computed during the build process triggered by URLTrigger (after this step). However, at the moment, previous injected enviornment variables ( from the previous build) are used by the URLTrigger to resolve environment variables if any

            gbois Gregory Boissinot
            dridi Dridi Boukelmoune
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: