-
Notifications
You must be signed in to change notification settings - Fork 29
Slice 4: Create unified validation pipeline (Jenkinsfile.validation) #592
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or requestteam/pit-crewslack notifier for pit crewslack notifier for pit crew
Description
Parent PRD
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:
- Resolve pipeline parameters via
resolvePipelineParams - Checkout tests repo
- Configure and build Docker image (
Dockerfile.tofu_and_validation) - Run validation tests via gotestsum inside Docker container
- Archive JUnit test results
- Optionally report to Qase
- Docker cleanup via
standardDockerCleanup
Parameters:
NODE_LABEL(choice: '', 'harvester-vpn-1', 'vsphere-vpn-1') — controls agent allocation and credential loadingTEST_PACKAGE— Go test package to runCONFIG— Test configuration fileBRANCH,REPO,TIMEOUT— standard parameters resolved byresolvePipelineParamsQASE_TEST_RUN_ID(string, optional) — enables Qase reporting when set
Credential loading: The standardCredentialLoader function loads the correct credential set based on NODE_LABEL:
- Empty (unallocated): Full credential set (AWS, Azure, GCP, vSphere, registry, TLS)
harvester-vpn-1: Harvester-specific credentialsvsphere-vpn-1: vSphere-specific credentials
This pipeline uses simpleTestPipeline shared function from #589 for the standard stage flow.
Acceptance criteria
-
Jenkinsfile.validationcreated 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.e2ebehavior -
standardCredentialLoaderloads correct credentials for each node label -
resolvePipelineParamshandles job name parsing -
standardDockerCleanupruns inpost { always }block -
simpleTestPipelineshared function is consumed for stage flow - Original 4 Jenkinsfiles remain untouched (parallel coexistence)
- Pipeline passes at least 1 successful run per NODE_LABEL variant
Blocked by
- Blocked by Slice 1: Add shared pipeline functions to qa-jenkins-library #589 (shared pipeline functions must be available)
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 17 (resolvePipelineParams function)
- User story 18 (standardDockerCleanup function)
- User story 21 (Declarative Pipeline syntax)
- User story 22 (parallel coexistence)
- User story 24 (harmonized parameters)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestteam/pit-crewslack notifier for pit crewslack notifier for pit crew