-
Notifications
You must be signed in to change notification settings - Fork 277
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test pipeline for pulling nested build info
Signed-off-by: Tyler Ohlsen <[email protected]>
- Loading branch information
Showing
2 changed files
with
131 additions
and
38 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
lib = library(identifier: "jenkins@20211123", retriever: legacySCM(scm)) | ||
|
||
pipeline { | ||
agent none | ||
environment { | ||
AGENT_X64 = 'Jenkins-Agent-al2-x64-c54xlarge-Docker-Host' | ||
AGENT_ARM64 = 'Jenkins-Agent-al2-arm64-c6g4xlarge-Docker-Host' | ||
} | ||
parameters { | ||
string( | ||
name: 'INPUT_MANIFEST', | ||
description: 'Input manifest under the manifests folder, e.g. 2.0.0/opensearch-2.0.0.yml.', | ||
trim: true | ||
) | ||
} | ||
stages { | ||
stage('detect docker image + args') { | ||
agent { | ||
docker { | ||
label 'Jenkins-Agent-al2-x64-c54xlarge-Docker-Host' | ||
image 'opensearchstaging/ci-runner:centos7-x64-arm64-jdkmulti-node10.24.1-cypress6.9.1-20211028' | ||
alwaysPull true | ||
} | ||
} | ||
steps { | ||
script { | ||
dockerAgent = detectDockerAgent() | ||
currentBuild.description = INPUT_MANIFEST | ||
} | ||
} | ||
} | ||
stage('build') { | ||
agent { | ||
docker { | ||
label AGENT_X64 | ||
image dockerAgent.image | ||
args dockerAgent.args | ||
alwaysPull true | ||
} | ||
} | ||
steps { | ||
script { | ||
String buildManifestUrl = 'https://ci.opensearch.org/ci/dbc/Playground/ohltyler-distribution-build-opensearch/1.2.2/27/linux/arm64/builds/opensearch/manifest.yml' | ||
String testManifest = 'manifests/1.2.2/opensearch-1.2.2-test.yml' | ||
|
||
echo "buildManifestUrl: ${buildManifestUrl}" | ||
echo "testManifest: ${testManifest}" | ||
|
||
def integTestX64 = build job: 'Playground/ohltyler-integ-test-stable', | ||
propagate: false, | ||
wait: true, | ||
parameters: [ | ||
string(name: 'TEST_MANIFEST', value: "${testManifest}-broken"), | ||
string(name: 'BUILD_MANIFEST_URL', value: buildManifestUrl), | ||
string(name: 'AGENT_LABEL', value: AGENT_X64) | ||
] | ||
echo "integTextX64 class: ${integTestX64.getClass()}" | ||
echo "integTestX64 number: ${integTestX64.getNumber()}" | ||
echo "integTestX64 result: ${integTestX64.getResult()}" | ||
echo "integTestX64 url: ${integTestX64.getAbsoluteUrl()}" | ||
} | ||
} | ||
} | ||
} | ||
} |