Skip to content

Slice 4: Create unified validation pipeline (Jenkinsfile.validation) #592

Description

@floatingman

Parent PRD

#585

What to build

Create a single Declarative Pipeline Jenkinsfile.validation that replaces four nearly-identical test runners:

  • validation/Jenkinsfile (189 lines)
  • validation/Jenkinsfile.e2e (124 lines)
  • validation/Jenkinsfile.harvester (158 lines)
  • validation/Jenkinsfile.vsphere (148 lines)

These four files share the exact same stage flow (Checkout → Configure and Build → Run Validation Tests → Test Report), the same Dockerfile.tofu_and_validation build, the same configure.sh/build.sh usage, and the same Docker cleanup. They differ only in: node label (harvester-vpn-1, vsphere-vpn-1, or unallocated), credential set size, and minor reporterScript differences.

Parameterized pipeline flow:

  1. Resolve pipeline parameters
  2. Checkout tests repo
  3. Configure and build Docker image (Dockerfile.tofu_and_validation)
  4. Run validation tests via gotestsum inside Docker container
  5. Archive JUnit test results
  6. Optionally report to Qase
  7. Docker cleanup in post { always } block

Parameters:

  • NODE_LABEL (choice: '', 'harvester-vpn-1', 'vsphere-vpn-1') — controls agent allocation and credential loading
  • TEST_PACKAGE — Go test package to run
  • CONFIG — Test configuration file
  • BRANCH, REPO, TIMEOUT — standard parameters
  • QASE_TEST_RUN_ID (string, optional) — enables Qase reporting when set

Credential loading: Uses property.useWithProperties (from qa-jenkins-library) to load the correct credential set based on NODE_LABEL:

  • Empty (unallocated): Full credential set (AWS, Azure, GCP, vSphere, registry, TLS)
  • harvester-vpn-1: Harvester-specific credentials
  • vsphere-vpn-1: vSphere-specific credentials

This pipeline uses simpleTestPipeline shared function from #589 for the standard stage flow. Note: simpleTestPipeline was removed from the initial scope. The pipeline will consume shared functions directly (same pattern as the airgap pipelines in Slices 2-3).

Acceptance criteria

  • Jenkinsfile.validation created in Declarative Pipeline syntax
  • NODE_LABEL='' produces identical results to validation/Jenkinsfile
  • NODE_LABEL='harvester-vpn-1' produces identical results to validation/Jenkinsfile.harvester
  • NODE_LABEL='vsphere-vpn-1' produces identical results to validation/Jenkinsfile.vsphere
  • Default parameters match validation/Jenkinsfile.e2e behavior
  • property.useWithProperties loads correct credentials for each node label
  • Docker cleanup runs in post { always } block
  • Original 4 Jenkinsfiles remain untouched (parallel coexistence)
  • Pipeline passes at least 1 successful run per NODE_LABEL variant

Blocked by

User stories addressed

  • User story 14 (4 nearly-identical test runners as single parameterized pipeline)
  • User story 15 (NODE_LABEL parameter for target environment selection)
  • User story 16 (credential sets loaded based on target environment)
  • User story 21 (Declarative Pipeline syntax)
  • User story 22 (parallel coexistence)
  • User story 24 (harmonized parameters)

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestteam/pit-crewslack notifier for pit crew

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions