Make the pipeline fail if a specific sentence appears in the log
The goal of the task is to verify a build process in a GitLab CI/CD pipeline using PowerShell without saving any files on the server. Specifically, the task involves checking for configuration differences between Web.Config and Web.xyz.Config files.
Make the pipeline fail if a specific sentence appears in the log – Find a substring, but ignore a specific substring
In my first question, the goal was to intentionally make the CI/CD pipeline fail if a transformation is not possible in the Web.Live.Config. I had to save the build in a variable. If a transformation is not possible,
the string "No element in the source document matches"
appears in the log. But: Although there is no key with “connectionString” in the config files, strangely the string "No element in the source document matches '/configuration/connectionStrings'"
appears. I wanted to ignore this.