Closed grdryn closed 4 months ago
@grdryn: This pull request references RHOAIENG-3128 which is a valid jira issue.
Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.16.0" version, but no target version was set.
/remove-approve
(new process)
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: MarianMacik
The full list of commands accepted by this bot can be found here.
The pull request process is described here
@grdryn: This pull request references RHOAIENG-3128 which is a valid jira issue.
Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.16.0" version, but no target version was set.
@grdryn: This pull request references RHOAIENG-3128 which is a valid jira issue.
Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.16.0" version, but no target version was set.
@grdryn: This pull request references RHOAIENG-3128 which is a valid jira issue.
Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.16.0" version, but no target version was set.
Looks good with the new changes too!
JIRA: https://issues.redhat.com/browse/RHOAIENG-3128
Description
The intention of this change is to make the GitOps update pipeline both more robust and more flexible. Before this change, this pipeline was very tied to the way we do things in the example GitOps repositories that we've got in this repo, and users didn't have the ability to deviate from that very much.
This proposed change allows them to specify a script to be run, with the intention that they'll specify one or more
yq
commands, to update whichever files in their GitOps repository need to be updated with the new image details.IMAGE_NAME
andIMAGE_DIGEST
for the new image will be available as environment variables to the script at runtime. See the examples for example commands/scripts.This PR also fixes a minor bug where the
git-clone
task would just checkout the default branch (i.e.main
) despite what the user had specified in the PipelineRun using thegitRepoBaseBranch
parameter. While this was previously causing the PR to be correctly created against the expected target branch, the change wasn't being made on top of that branch. This would cause issues if the file(s) that the GitOps Update pipeline was targeting didn't exist on the default branch (would cause pipeline error), or were different enough from the version of the file(s) on the target branch (would cause an unmergeable PR).Breaking change: The
imageReferenceFilePath
parameter has been removed, and theyq-script
has been added. In a previous iteration of this PR, theyq-script
had a default value, but this has been removed now, since it referred to theimageReferenceFilePath
param. Instead, each of the example PipelineRuns contain ayq-script
value equivalent to the previous behaviour.How Has This Been Tested?
~This has just been tested with the existing examples in this repo so far. I will update here when I've tried it with different scenarios, per the acceptance criteria in the Jira issue.~ This has been tested with the pre-existing examples in the repo here (see example PR for bike-rental-app, and example PR for tensorflow-housing-app), and also with the new JSON example GitOps repo file that this PR adds (see example PR).
Merge criteria: