Within a Jenkins-Groovy pipelines I want to do the following:
- Clone a particular GitLab based Code repo.
- Then within this repo I want to find out all the files where there is a particular string. Example: "
find_me
" - Once found I want to change all these files from
find_me
tofound_me
. - 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?