Skip to content

Commit

Permalink
Update files as per suggestions
Browse files Browse the repository at this point in the history
Signed-off-by: Divya Madala <[email protected]>
  • Loading branch information
Divyaasm committed May 3, 2023
1 parent f69b1f0 commit 43f2cc3
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
16 changes: 10 additions & 6 deletions jenkins/opensearch-dashboards/integ-test.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ pipeline {
)
string(
name: 'BUILD_MANIFEST_URL',
description: 'The build manifest URL OpenSearch Dashboards, e.g. "https://ci.opensearch.org/ci/dbc/distribution-build-opensearch-dashboards/2.5.0/5367/linux/x64/tar/builds/opensearch-dashboards/manifest.yml".',
description: 'The build manifest URL for OpenSearch Dashboards, e.g. https://ci.opensearch.org/ci/dbc/distribution-build-opensearch-dashboards/2.5.0/5367/linux/x64/tar/builds/opensearch-dashboards/manifest.yml.',
trim: true
)
string(
Expand All @@ -56,7 +56,7 @@ pipeline {
}
stages {
stage('verify-parameters') {
agent { label agent_nodes["x64"]}
agent { label agent_nodes["x64"] }
steps {
script {
if (TEST_MANIFEST == '' || !fileExists("manifests/${TEST_MANIFEST}")) {
Expand All @@ -69,6 +69,11 @@ pipeline {
error("Integration Tests failed to start. Build manifest url was not provided.")
}

if (BUILD_MANIFEST_URL_OPENSEARCH == '') {
currentBuild.result = 'ABORTED'
error("Integration Tests failed to start. Build manifest url OpenSearch was not provided.")
}

downloadBuildManifest(
url: BUILD_MANIFEST_URL,
path: BUILD_MANIFEST
Expand Down Expand Up @@ -126,7 +131,7 @@ pipeline {
echo "componentList: ${componentList}"

for (component_check in componentList) {
if (! componentDefaultList.contains(component_check)) {
if (!componentDefaultList.contains(component_check)) {
error("${component_check} is not in build manifest: ${componentDefaultList}, exit 1")
}
}
Expand Down Expand Up @@ -167,16 +172,15 @@ pipeline {
def local_component_index = componentList.indexOf(local_component)
def wait_seconds = local_component_index * 10

echo "Add Component: ${local_component}"
echo "Adding Component: ${local_component}"
componentTests["Run Integtest ${local_component}"] = {
// Using scripted pipelines to trigger dynamic parallel stages
timeout(time: 2, unit: 'HOURS') {
node(AGENT_LABEL) {
docker.withRegistry('https://public.ecr.aws/') {
docker.image(docker_images["$distribution"]).inside(docker_args["$distribution"]) {
try {
stage("Run Integtest ${local_component}") {
echo "Component Name: ${local_component}"
stage("${local_component}") {
// Jenkins tend to not clean up workspace at times even though ws clean is called
// Due to docker is mounting the agent directory so it can communicated with the agent
// This sometimes causes the workspace to retain last run test-results and ends with build failures
Expand Down
2 changes: 1 addition & 1 deletion tests/jenkins/TestOpenSearchDashboardsIntegTest.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class TestOpenSearchDashboardsIntegTest extends BuildPipelineTest {
}

@Test
void integTests_runs_consistently() {
void integTests_runs_for_all_components() {
super.testPipeline('jenkins/opensearch-dashboards/integ-test.jenkinsfile',
'tests/jenkins/jenkinsjob-regression-files/opensearch-dashboards/integ-test.jenkinsfile')
assertThat(getCommandExecutions('sh', 'test.sh'), hasItems(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
integ-test.library({[email protected], retriever=null})
integ-test.pipeline(groovy.lang.Closure)
integ-test.credentials(jenkins-artifact-bucket-name)
integ-test.timeout({time=4, unit=HOURS})
integ-test.timeout({time=3, unit=HOURS})
integ-test.echo(Executing on agent [label:none])
integ-test.stage(verify-parameters, groovy.lang.Closure)
integ-test.echo(Executing on agent [label:Jenkins-Agent-AL2-X64-C54xlarge-Docker-Host])
Expand Down

0 comments on commit 43f2cc3

Please sign in to comment.