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

Add support for environment variables in replacement expressions

      I was hoping the log-file-filter plugin could be used to convert some strings in the console log to a URL that includes the use of a builtin Jenkins variable.

      Replacing some text in the console with plain text works fine, but the problem is that I need to include the jenkins BUILD_ID in the URL, eg.

        Regexp:
          /my_project/some/text.log
        Replacement:

          http://my_project/$

      {BUILD_NUMBER}

      /some/text.log

      I have tried a lot variations in the syntax for the BUILD_NUMBER variable (eg $, $$, \$, ${ }, $( ) ) but the text is not replaced when the BUILD_NUMBER variable in included.

       
      We are using version 116.v881e1b of the log-file-filter plugin and Jenkins version 2.452.2
       

       

          [JENKINS-75254] Add support for environment variables in replacement expressions

          Torben created issue -
          Torben made changes -
          Description Original: I was hoping the log-file-filter plugin could be used to convert some strings in the console log to a URL that includes the use of a builtin Jenkins variable.

          Replacing some text in the console with plain text works fine, but the problem is that I need to include the jenkins BUILD_ID in the URL, eg.

            Regexp:
              /my_project/some/text.log
            Replacement:

              http://my_project/${BUILD_NUMBER}/some/text.log

          I have tried a lot variations in the syntax for the BUILD_NUMBER variable (eg $, $$, \$, ${ }, $( ) ) but the text is not replaced when the BUILD_NUMBER variable in included.
          New: I was hoping the log-file-filter plugin could be used to convert some strings in the console log to a URL that includes the use of a builtin Jenkins variable.

          Replacing some text in the console with plain text works fine, but the problem is that I need to include the jenkins BUILD_ID in the URL, eg.

            Regexp:
              /my_project/some/text.log
            Replacement:

              [http://my_project/$]{BUILD_NUMBER}/some/text.log

          I have tried a lot variations in the syntax for the BUILD_NUMBER variable (eg $, $$, \$, ${ }, $( ) ) but the text is not replaced when the BUILD_NUMBER variable in included.

          [We are using version 116.v881e1b of the log-file-filter plugin|https://plugins.jenkins.io/log-file-filter]
          Torben made changes -
          Description Original: I was hoping the log-file-filter plugin could be used to convert some strings in the console log to a URL that includes the use of a builtin Jenkins variable.

          Replacing some text in the console with plain text works fine, but the problem is that I need to include the jenkins BUILD_ID in the URL, eg.

            Regexp:
              /my_project/some/text.log
            Replacement:

              [http://my_project/$]{BUILD_NUMBER}/some/text.log

          I have tried a lot variations in the syntax for the BUILD_NUMBER variable (eg $, $$, \$, ${ }, $( ) ) but the text is not replaced when the BUILD_NUMBER variable in included.

          [We are using version 116.v881e1b of the log-file-filter plugin|https://plugins.jenkins.io/log-file-filter]
          New: I was hoping the log-file-filter plugin could be used to convert some strings in the console log to a URL that includes the use of a builtin Jenkins variable.

          Replacing some text in the console with plain text works fine, but the problem is that I need to include the jenkins BUILD_ID in the URL, eg.

            Regexp:
              /my_project/some/text.log
            Replacement:

              [http://my_project/$]

          {BUILD_NUMBER}

          /some/text.log

          I have tried a lot variations in the syntax for the BUILD_NUMBER variable (eg $, $$, \$, ${ }, $( ) ) but the text is not replaced when the BUILD_NUMBER variable in included.

           
          We are using version 116.v881e1b of the log-file-filter plugin and Jenkins version 2.452.2
           

           

            carlescapdevila Carles Capdevila
            torbenfox Torben
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: