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
      A relative or absolute file path
      • Type: String
    • fileEncoding
      • Type: String
    • configs
        Array / List of Nested Object
      • matchCount (optional)

        Set "Match count" to 0 will do replace all

        • Type: int
      • replace (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

        • Type: String
      • search (optional)

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

        • Type: String
      • verbose (optional)

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

        • Type: boolean

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.