Skip to content

ci: migrate to mavenStage() from jenkins-lib-common#108

Merged
gjed merged 2 commits intodevelfrom
ci/migrate-to-maven-stage
Apr 25, 2026
Merged

ci: migrate to mavenStage() from jenkins-lib-common#108
gjed merged 2 commits intodevelfrom
ci/migrate-to-maven-stage

Conversation

@gjed
Copy link
Copy Markdown
Contributor

@gjed gjed commented Apr 20, 2026

What

Replace hand-rolled Maven stages with mavenStage() from jenkins-lib-common@1.5.0.

Why

Reduce boilerplate. mavenStage handles credentials wrapping, JaCoCo auto-detection, SonarQube gating, and test recording automatically.

Changes

  • Replace Build jar, Unit tests, Integration tests, Coverage, SonarQube analysis stages with single mavenStage(splitTests: true, postBuildScript: '...')
  • Remove SKIP_TESTS and SKIP_CHECKS pipeline parameters (superseded by mavenStage)
  • postBuildScript copies fatjar to package/ for downstream buildPackages/dockerStage

Profile

Auto-detect matches current behavior: -P dev on branch, -P prod on tag.

Behavior notes

  • junit recording now active (was missing before)
  • recordCoverage same logic (JaCoCo auto-detected from POM)
  • SonarQube gating unchanged (devel + PR-*)
  • No deploy stage (unchanged)

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 20, 2026

CLA assistant check
All committers have signed the CLA.

@gjed gjed requested a review from Copilot April 20, 2026 15:15
@gjed gjed self-assigned this Apr 20, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR migrates the Jenkins pipeline from custom, hand-rolled Maven build/test/coverage/Sonar stages to the mavenStage() helper from jenkins-lib-common@1.5.0, aiming to reduce boilerplate while preserving existing CI behavior.

Changes:

  • Replace multiple Maven-related stages (build, unit/integration tests, coverage, Sonar) with a single stage('Maven') using mavenStage(splitTests: true, postBuildScript: ...).
  • Remove SKIP_TESTS and SKIP_CHECKS pipeline parameters (delegating behavior to mavenStage).
  • Move fatjar copy logic into mavenStage’s postBuildScript for downstream packaging/docker steps.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Jenkinsfile Outdated
Comment thread Jenkinsfile
@gjed gjed merged commit 8ac9640 into devel Apr 25, 2026
2 checks passed
@gjed gjed deleted the ci/migrate-to-maven-stage branch April 25, 2026 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants