Skip to content

Migrate Jenkins build to k8s-test-2204-8 agent#43

Open
vemulaanvesh wants to merge 3 commits intomasterfrom
devops/migrate-to-k8s-agent
Open

Migrate Jenkins build to k8s-test-2204-8 agent#43
vemulaanvesh wants to merge 3 commits intomasterfrom
devops/migrate-to-k8s-agent

Conversation

@vemulaanvesh
Copy link
Copy Markdown
Contributor

@vemulaanvesh vemulaanvesh commented May 4, 2026

Summary

Migrates mvnBuildPipeline from the GCE Ubuntu 22.04 agent (jenkins-agent-hub-ubuntu-2204-n1-standard-8) to the new ephemeral Kubernetes pod agent label k8s-test-2204-8.

The new agent (cloud K8S-STD-2204-8, image jenkins-agent-2204-k8s:stable) was added to the prod Hub Services Jenkins controller in kubernetes-deployments#6337. See K8S-AGENTS-GUIDE.md for the full label list.

Why

  • Fresh pod per build, no leftover workspace state or flaky failures from shared VM state
  • No queueing on a fixed pool of GCE VMs
  • Builds spin up faster under load (cluster autoscales)

Notes

  • env.JAVA_HOME = java-8-openjdk-amd64 is preserved; the 2204 image ships Java 8/11/17/21.
  • Still on liveramp-base@v2 (the other migrated libs use @v3.0). A library bump is intentionally out of scope here so this PR is one isolated change. The agentLabel field is honoured by both @v2 and @v3.0.

Test plan

  • PR build runs on k8s-test-2204-8 pod (look for Running on k8s-test-2204-8-... in the build log instead of gce-2204-ubuntu-gen-8-...)
  • mvn clean deploy completes; deploy to Artifactory succeeds
  • JUnit test count matches master baseline (17 tests, 0 failing)

Made with Cursor

Summary by CodeRabbit

  • Chores
    • Updated CI/CD pipeline to use a different Maven pipeline implementation and select a different build agent/environment for executing builds.
    • Updated the shared pipeline library reference to a new branch/version used by the pipeline.

Switches mvnBuildPipeline from the GCE Ubuntu 22.04 agent
(jenkins-agent-hub-ubuntu-2204-n1-standard-8) to the new ephemeral
k8s pod agent (k8s-test-2204-8). The k8s pod image ships Java 8/11/17/21,
so the explicit JAVA_HOME = java-8 above continues to work.

Note: this Jenkinsfile is still on liveramp-base@v2; the other libs
(aggregation_lib, refresher_waiter) use @v3.0. Library bump is out of
scope here -- the agentLabel field is honoured by both versions.

Co-authored-by: Cursor <cursoragent@cursor.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 4, 2026

Walkthrough

Jenkins pipeline reference updated to a k8s-focused shared library and swaps mvnBuildPipeline for mvnBuildPipelineK8s; the agent label changes from jenkins-agent-hub-ubuntu-2204-n1-standard-8 to k8s-migration-test-2204.

Changes

Jenkins pipeline k8s migration

Layer / File(s) Summary
Library Reference
Jenkinsfile
Shared library version changed from liveramp-base@v2 to liveramp-base@DEV-6236/k8s-shared-library.
Pipeline Entrypoint
Jenkinsfile
Pipeline call switched from mvnBuildPipeline to mvnBuildPipelineK8s.
Agent Selection
Jenkinsfile
agentLabel updated from jenkins-agent-hub-ubuntu-2204-n1-standard-8 to k8s-migration-test-2204.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title mentions migrating to a k8s agent, but the actual agent label changed to k8s-migration-test-2204, not k8s-test-2204-8 as stated in the title. Update the title to accurately reflect the actual agent migration target, e.g., 'Migrate Jenkins build to k8s-migration-test-2204 agent' to match the configured agent in the changeset.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Review rate limit: 8/10 reviews remaining, refill in 12 minutes.

Comment @coderabbitai help to get the list of available commands and usage tips.

Switch from the shared k8s-test-2204-8 pool to the dedicated
k8s-migration-test-2204 cloud (defined in
LiveRamp/kubernetes-deployments PR #6355) so the GCE->K8s migration
validation runs on an isolated EXCLUSIVE pool. Avoids interleaving
with unrelated org builds that default to k8s-common, which makes
failures attributable and prevents the test pool from being pinned
by long-running unrelated jobs.
…line step

The K8s pod agent image (jenkins-agent-2204-k8s:45) does not include
ssh-client, so the GCE-flavor mvnBuildPipeline / mvnDockerBuildAndPublishPipeline
steps from liveramp-base@v3.0/v2 fail at SCM checkout with 'ssh: not found'.

Switch to the K8s-prepped variants from jenkins_pipelines PR #316:
  liveramp-base@DEV-6236/k8s-shared-library
  mvnBuildPipelineK8s / mvnDockerBuildAndPublishPipelineK8s

Required companion change: remove the SSHCheckoutTrait from the
multibranch SCM source so SCM checkout uses HTTPS via the existing
github-app-org-token credential.
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@Jenkinsfile`:
- Around line 6-7: The pipeline uses agentLabel set to 'k8s-migration-test-2204'
which mismatches the PR/test plan; update the agentLabel value used in the
mvnBuildPipelineK8s block to 'k8s-test-2204-8' (the label specified by the PR)
so the Jenkins controller can schedule the job on the correct Kubernetes pods;
locate the agentLabel assignment inside the mvnBuildPipelineK8s block and
replace the string accordingly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 0aaaae48-1280-4988-bad6-8c1064d00019

📥 Commits

Reviewing files that changed from the base of the PR and between ab62d5b and 29507d6.

📒 Files selected for processing (1)
  • Jenkinsfile

Comment thread Jenkinsfile
Comment on lines +6 to +7
mvnBuildPipelineK8s {
agentLabel = 'k8s-migration-test-2204'
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Agent label mismatch can block CI scheduling

Line 7 uses k8s-migration-test-2204, but the PR objective/test plan specifies k8s-test-2204-8. If that label is not present on the Jenkins controller, builds will queue/fail instead of running on the new K8s pods.

Suggested fix
 mvnBuildPipelineK8s {
-    agentLabel = 'k8s-migration-test-2204'
+    agentLabel = 'k8s-test-2204-8'
 }

As per coding guidelines, "Comment only when the issue must be resolved before merge — otherwise remain silent."

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
mvnBuildPipelineK8s {
agentLabel = 'k8s-migration-test-2204'
mvnBuildPipelineK8s {
agentLabel = 'k8s-test-2204-8'
}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Jenkinsfile` around lines 6 - 7, The pipeline uses agentLabel set to
'k8s-migration-test-2204' which mismatches the PR/test plan; update the
agentLabel value used in the mvnBuildPipelineK8s block to 'k8s-test-2204-8' (the
label specified by the PR) so the Jenkins controller can schedule the job on the
correct Kubernetes pods; locate the agentLabel assignment inside the
mvnBuildPipelineK8s block and replace the string accordingly.

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.

1 participant