0

Within a Jenkins-Groovy pipelines I want to do the following:

  1. Clone a particular GitLab based Code repo.
  2. Then within this repo I want to find out all the files where there is a particular string. Example: "find_me"
  3. Once found I want to change all these files from find_me to found_me.
  4. Then commit these changes to the GitLab repo.

Step 4 above maybe I can find out myself, but I am struggling on how to do the 2nd and 3rd steps mentioned above.

Can anyone please suggest what can be the best way to do this?

Aayush
  • 133
  • 1
  • 3
  • 11
  • 1
    [What](https://stackoverflow.com/help/on-topic) have you [tried so far](https://stackoverflow.com/help/minimal-reproducible-example)? – Gerold Broser Oct 28 '21 at 11:55
  • @GeroldBroser Sorry for asking like this. I am pretty new to Groovy Jenkins and DevOps world and I didn't know how to go about it. I was not looking for an exact solution but some idea on how I could go about implementing it. If you can suggest anything that would be great. – Aayush Oct 29 '21 at 05:20