Maximum number of File content replacer

Completed

Hi I am using TeamCity Professional 2017.1 (build 46533).

and I am trying to setup build, however I have trouble with team city build features: file content replacer.

I have 8 file content replacer, but it seems only (7) file content replacer that being executed. 

At first, I thought the last file content replacer has some incorrect regex or the path pattern is incorrect, 

However, when I have disabled the other file content replacer, that last file content replacer is executed well.

The question that I want to ask is : 

is there any number of limit for file content replacer?

1 comment
Comment actions Permalink

Hi Arif,

Please note, that TeamCity 2017.1 is an old version and it's out of support already. Please consider upgrading to the most recent version: 2019.2.1.

As for your question, I don't think we have any limitations on the amount of file contents replacers, at least in the latest version. See example build log below:

[16:17:29] : File content replacer
[16:17:29] : [File content replacer] Applying replacement "print1" to lines matched by pattern "print" in the files matched by wildcard: +:Source-Code/hello-world.py...
[16:17:29]i: [File content replacer] Checkout directory marked as dirty.
[16:17:29] : [File content replacer] File changed: Source-Code/hello-world.py ([auto-detected] charset US-ASCII).
[16:17:29] : [File content replacer] Total files changed: 1.
[16:17:29] : [File content replacer] Applying replacement "print2" to lines matched by pattern "print1" in the files matched by wildcard: +:Source-Code/hello-world.py...
[16:17:29] : [File content replacer] File changed: Source-Code/hello-world.py ([auto-detected] charset US-ASCII).
[16:17:29] : [File content replacer] Total files changed: 1.
[16:17:29] : [File content replacer] Applying replacement "print3" to lines matched by pattern "print2" in the files matched by wildcard: +:Source-Code/hello-world.py...
[16:17:29] : [File content replacer] File changed: Source-Code/hello-world.py ([auto-detected] charset US-ASCII).
[16:17:29] : [File content replacer] Total files changed: 1.
[16:17:29] : [File content replacer] Applying replacement "print4" to lines matched by pattern "print3" in the files matched by wildcard: +:Source-Code/hello-world.py...
[16:17:29] : [File content replacer] File changed: Source-Code/hello-world.py ([auto-detected] charset US-ASCII).
[16:17:29] : [File content replacer] Total files changed: 1.
[16:17:29] : [File content replacer] Applying replacement "print5" to lines matched by pattern "print4" in the files matched by wildcard: +:Source-Code/hello-world.py...
[16:17:29] : [File content replacer] File changed: Source-Code/hello-world.py ([auto-detected] charset US-ASCII).
[16:17:29] : [File content replacer] Total files changed: 1.
[16:17:29] : [File content replacer] Applying replacement "print6" to lines matched by pattern "print5" in the files matched by wildcard: +:Source-Code/hello-world.py...
[16:17:29] : [File content replacer] File changed: Source-Code/hello-world.py ([auto-detected] charset US-ASCII).
[16:17:29] : [File content replacer] Total files changed: 1.
[16:17:29] : [File content replacer] Applying replacement "print7" to lines matched by pattern "print6" in the files matched by wildcard: +:Source-Code/hello-world.py...
[16:17:29] : [File content replacer] File changed: Source-Code/hello-world.py ([auto-detected] charset US-ASCII).
[16:17:29] : [File content replacer] Total files changed: 1.
[16:17:29] : [File content replacer] Applying replacement "print8" to lines matched by pattern "print7" in the files matched by wildcard: +:Source-Code/hello-world.py...
[16:17:29] : [File content replacer] File changed: Source-Code/hello-world.py ([auto-detected] charset US-ASCII).
[16:17:29] : [File content replacer] Total files changed: 1.
[16:17:29] : [File content replacer] Applying replacement "print9" to lines matched by pattern "print8" in the files matched by wildcard: +:Source-Code/hello-world.py...
[16:17:29] : [File content replacer] File changed: Source-Code/hello-world.py ([auto-detected] charset US-ASCII).
[16:17:29] : [File content replacer] Total files changed: 1.

As you can see in the build log, nine content replacers successfully did the changes to the file.

Best regards,

Mikhail Efremov

0

Please sign in to leave a comment.