Conversation
…PR build
Replaces the GHPRB-triggered unit-test-develop-pr job on the old Docker
Jenkins. The new jenkins-live instance uses GitHub Branch Source
(multibranchPipelineJob) which discovers PRs via GitHub App webhook and
checks out this Jenkinsfile from the PR merge commit.
Behaviour preserved from the old maven2-moduleset job:
- Builds every PR opened/updated against the develop branch
- Defaults to CYNERGY_VERSION_SUFFIX=develop, PROPERTIES_FILE=kfs-config.properties
- Overrides CYNERGY_VERSION_SUFFIX=emerg when target branch matches emergency-fix-YYYY-MM-DD
- Overrides PROPERTIES_FILE=kfs-upgrade-config.properties when PR title matches
the version-upgrade pattern
- Runs dependency:purge-local-repository before the main test to evict
stale cynergy-customizations artifacts from the local Maven repo
- Runs mvn clean test with the same excludes and spring profiles as the old job
Uses withMaven(maven:'Maven', jdk:'jdk17') so JUnit results are automatically
published to the Jenkins UI without a separate post{junit} block. Paths updated
from /var/jenkins_home/ to /var/lib/jenkins/ for the native Jenkins instance.
JIRA: KFSPTS-37768
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…nsfile Skip on QA was aborting all builds when JENKINS_ROLE=qa, including manually triggered ones. Intent is to suppress only automatic webhook/SCM-triggered builds on jenkins-qa; manual 'Build Now' should run the full unit tests. Checks getBuildCauses() for UserIdCause — present on manual triggers, absent on GitHub webhook / branch-indexing triggers. JIRA: KFSPTS-37768 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…st PR pipeline Add -Dmaven.test.failure.ignore=true to the Unit test stage mvn command so surefire test failures/errors no longer make Maven exit non-zero. This keeps the `sh` step from hard-failing the pipeline; withMaven's JUnit publisher then marks the build UNSTABLE (yellow) instead of FAILURE (red) when only the known-broken *IntegTest/*IntegrationTest classes fail. This matches the behavior of the legacy Maven-project job on new-jenkins, which reported UNSTABLE for the same pre-existing integration-test errors. It is a PR-gating policy choice, not a fix for a jenkins-qa defect.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
Jenkinsfile.unit-test-prat the repo root to support the migration of theunit-test-develop-prjob from the deprecated GHPRB plugin to the GitHub Branch Source plugin on the new native Jenkins instances (jenkins-qa/jenkins-live).Part of KFSPTS-37768 (Jenkins native migration).
Details
multibranchPipelineJobon the native Jenkins resolvesscriptPathwithin the scanned repo checkout, so the Jenkinsfile must live in thecu-kfsrepo root.withMaven(maven:'Maven', jdk:'jdk17')so JUnit results publish automatically to the Jenkins UI.Skip on QAstage usesgetBuildCauses()to distinguish webhook-triggered builds (abort) from manual "Build Now" triggers (run full tests), enabling ad-hoc validation on jenkins-qa.PROPERTIES_FILEpath updated from/var/jenkins_home/(old Docker Jenkins) to/var/lib/jenkins/(native Jenkins).Notes
Impact
Jenkinsfile.unit-test-pr(new, 84 lines)