The following plugin provides functionality available through Pipeline-compatible steps. Read more about how to integrate steps into your Pipeline in the Steps section of the Pipeline Syntax page.

For a list of other such plugins, see the Pipeline Steps Reference page.

Content Replace

contentReplace: Content Replace

  • configs (optional)
      Array / List of Nested Object
    • filePath : String
      A relative or absolute file path
    • fileEncoding : String
    • configs
        Array / List of Nested Object
      • matchCount : int (optional)

        Set "Match count" to 0 will do replace all

      • replace : String (optional)

        You can use variables enclosed in ${}. e.g. $11.0.${BUILD_ID}

        So, The string "Version=0.0.1" would be replace to Version=1.0.9 when the value of BUILD_ID is 9

      • search : String (optional)

        Regex expression for search. e.g. (Version=)([0-9]+\.[0-9]+\.[0-9]+)

      • verbose : boolean (optional)

        Check "Verbose" to display in the console all the replacements made.

    • lineSeparator : String (optional)

Was this page helpful?

Please submit your feedback about this page through this quick form.

Alternatively, if you don't wish to complete the quick form, you can simply indicate if you found this page helpful?

    


See existing feedback here.