Skip to content

Commit

Permalink
fix regex for image replacement in pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
pranavgore09 committed Feb 8, 2018
1 parent 72d140c commit dd7e8c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vars/deployPlannerSnapshot.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def call(body) {
}

yaml = flow.getUrlAsString(openShiftTemplate)
yaml = Pattern.compile(" - image: ${originalImageName}:(.*)").matcher(yaml).replaceFirst(" - image: ${newImageName}")
yaml = Pattern.compile("- image: ${originalImageName}:(.*)").matcher(yaml).replaceFirst("- image: ${newImageName}")
// yaml = Pattern.compile("${originalImageName}").matcher(yaml).replaceFirst("${newImageName}")

if (!yaml.contains(newImageName)){
Expand Down

0 comments on commit dd7e8c6

Please sign in to comment.