diff --git a/jenkins/opensearch-dashboards/integ-test.jenkinsfile b/jenkins/opensearch-dashboards/integ-test.jenkinsfile index fe80e5934a..686d351bca 100644 --- a/jenkins/opensearch-dashboards/integ-test.jenkinsfile +++ b/jenkins/opensearch-dashboards/integ-test.jenkinsfile @@ -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( @@ -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}")) { @@ -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 @@ -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") } } @@ -167,7 +172,7 @@ 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') { @@ -175,8 +180,7 @@ pipeline { 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 diff --git a/tests/jenkins/TestOpenSearchDashboardsIntegTest.groovy b/tests/jenkins/TestOpenSearchDashboardsIntegTest.groovy index 7c7b3b4445..aabad0b5f2 100644 --- a/tests/jenkins/TestOpenSearchDashboardsIntegTest.groovy +++ b/tests/jenkins/TestOpenSearchDashboardsIntegTest.groovy @@ -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( diff --git a/tests/jenkins/jenkinsjob-regression-files/opensearch-dashboards/integ-test.jenkinsfile.txt b/tests/jenkins/jenkinsjob-regression-files/opensearch-dashboards/integ-test.jenkinsfile.txt index 4bc82548ee..c44ca14c36 100644 --- a/tests/jenkins/jenkinsjob-regression-files/opensearch-dashboards/integ-test.jenkinsfile.txt +++ b/tests/jenkins/jenkinsjob-regression-files/opensearch-dashboards/integ-test.jenkinsfile.txt @@ -3,7 +3,7 @@ integ-test.library({identifier=jenkins@4.1.1, 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])