gitops-build-lib icon indicating copy to clipboard operation
gitops-build-lib copied to clipboard

PR creation skipped when rerun after error 'deploy' step

Open phaenr opened this issue 4 years ago • 0 comments

Scenario:

The build job on jenkins runs using the deployViaGitops() the gitops-build-lib is exposing. After successful builds, tests, image creation and also branch creation it failed when creating a PR against our SCM. It failed due to some networking issue when creating the PR via API-call using curl. Due to this error, it did not open up an PR. When trying to rerun the exact same build job it did not create a PR due to the branch containing the changes already exists. Creating the PR is dependent from the branch being created within the same run.

Solutions:

  • Check whether the branch containing the changes already exists and create a PR if it is missing even though the branch was not created in this run
  • Implement retry mechanisms for the PR-creation

phaenr avatar Apr 23 '21 09:04 phaenr