File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed
src/org/ods/orchestration/util Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 77### Changed
88
99### Fixed
10+ * Log correct error message for wrong preview-branch value ([ #1249 ] ( https://github.com/opendevstack/ods-jenkins-shared-library/pull/1249 ) )
1011* Fail the pipeline when no version specified for a deploy to Q, P ([ #1248 ] ( https://github.com/opendevstack/ods-jenkins-shared-library/pull/1248 ) )
1112* Fix Tailor deployment drifts for D, Q envs ([ #1055 ] ( https://github.com/opendevstack/ods-jenkins-shared-library/pull/1055 ) )
1213
Original file line number Diff line number Diff line change @@ -344,8 +344,18 @@ class MROPipelineUtil extends PipelineUtil {
344344 this . logger. info(" Since in WIP and no release branch exists (${ this.project.gitReleaseBranch} )" +
345345 " ${ repo.'preview-branch' ? ' and preview-branch has been configured' : ''} , " +
346346 " checking out branch ${ repo.'preview-branch' ? repo.'preview-branch' : repo.defaultBranch} for repo ${ repo.id} " )
347- scmResult. scm = checkoutBranchInRepoDir(repo, repo. ' preview-branch' ? repo. ' preview-branch' : repo. defaultBranch)
348- scmResult. scmBranch = repo. ' preview-branch' ? repo. ' preview-branch' : repo. defaultBranch
347+ try {
348+ scmResult. scm = checkoutBranchInRepoDir(repo, repo. ' preview-branch' ? repo. ' preview-branch' : repo. defaultBranch)
349+ scmResult. scmBranch = repo. ' preview-branch' ? repo. ' preview-branch' : repo. defaultBranch
350+ } catch (ex) {
351+ if (repo. ' preview-branch' ) {
352+ def errorMessage = " The preview branch configured for repository " +
353+ " \" ${ repo.name ? repo.name : GitUtil.buildFullRepoName(project.getKey(), repo.id)} " +
354+ " (preview-branch: ${ repo.'preview-branch'} )\" could not be found."
355+ throw new RuntimeException (errorMessage, ex)
356+ }
357+ throw ex
358+ }
349359 }
350360 }
351361 return scmResult
You can’t perform that action at this time.
0 commit comments