From 03252e48d5f166da656e5b25eddd9497baced188 Mon Sep 17 00:00:00 2001 From: Antoine Taillefer Date: Mon, 16 Mar 2026 23:55:35 +0100 Subject: [PATCH] NXBT-3951: Fail release if unresolved/uncommitted blocker Jira issues Bump shared library to 0.0.79. --- ci/Jenkinsfiles/build.groovy | 2 +- ci/Jenkinsfiles/release.groovy | 50 ++++++++++++++++++++++------------ 2 files changed, 34 insertions(+), 18 deletions(-) diff --git a/ci/Jenkinsfiles/build.groovy b/ci/Jenkinsfiles/build.groovy index 6460ba4b..97d986d9 100644 --- a/ci/Jenkinsfiles/build.groovy +++ b/ci/Jenkinsfiles/build.groovy @@ -16,7 +16,7 @@ * Contributors: * Kevin Leturc */ -library identifier: "platform-ci-shared-library@v0.0.75" +library identifier: "platform-ci-shared-library@v0.0.79" def lib diff --git a/ci/Jenkinsfiles/release.groovy b/ci/Jenkinsfiles/release.groovy index bdf77cc3..ca0b9edf 100644 --- a/ci/Jenkinsfiles/release.groovy +++ b/ci/Jenkinsfiles/release.groovy @@ -19,7 +19,7 @@ import java.time.LocalDate import java.time.format.DateTimeFormatter -library identifier: "platform-ci-shared-library@v0.0.75" +library identifier: "platform-ci-shared-library@v0.0.79" def lib @@ -65,6 +65,36 @@ pipeline { New version: ${VERSION} """.stripIndent() nxMvn.updateVersion() + nxGit.commitTag(tag: "release-${VERSION}") + } + } + } + } + + stage('Check blocker issues') { + steps { + container('maven') { + script { + def blockerIssueCheck = nxProject.checkBlockerJiraIssues(tagPrefix: 'release-') + if (blockerIssueCheck) { + env.TEAMS_NOTIFICATION_MESSAGE = blockerIssueCheck.message + error 'Found some unresolved or uncommitted blocker issues' + } + } + } + } + } + + stage('Git push') { + steps { + container('maven') { + script { + echo """ + ---------------------------------------- + Git push + ---------------------------------------- + """.stripIndent() + nxGit.push(reference: "release-${VERSION}") } } } @@ -123,21 +153,6 @@ pipeline { } } - stage('Create tag') { - steps { - container('maven') { - script { - echo """ - ------------------------------------------------- - Tag nuxeo-java-client ${VERSION} - ------------------------------------------------- - """ - nxGit.commitTagPush(tag: "release-${VERSION}") - } - } - } - } - stage('Bump branch') { steps { container('maven') { @@ -170,6 +185,7 @@ pipeline { ], jiraMovingVersionName: env.JIRA_MOVING_VERSION, tagPrefix: 'release-', + version: env.VERSION, ) } } @@ -182,7 +198,7 @@ pipeline { always { script { nxUtils.setReleaseDescription() - nxUtils.notifyReleaseStatusIfNecessary() + nxUtils.notifyReleaseStatusIfNecessary(details: env.TEAMS_NOTIFICATION_MESSAGE) } } }