Skip to content

Commit

Permalink
Add specific download path for downloadBuildManifest (#4923)
Browse files Browse the repository at this point in the history
Signed-off-by: Prudhvi Godithi <[email protected]>
  • Loading branch information
prudhvigodithi authored Aug 7, 2024
1 parent b35a2c7 commit 21fb624
Show file tree
Hide file tree
Showing 6 changed files with 153 additions and 132 deletions.
24 changes: 14 additions & 10 deletions jenkins/opensearch-dashboards/integ-test.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -353,17 +353,21 @@ pipeline {
url: BUILD_MANIFEST_URL_OPENSEARCH,
path: BUILD_MANIFEST_OPENSEARCH
)
createUploadTestReportManifest(
testManifest: "manifests/${TEST_MANIFEST}",
buildManifest: BUILD_MANIFEST_OPENSEARCH,
dashboardsBuildManifest: BUILD_MANIFEST,
testRunID: "${env.BUILD_NUMBER}",
testType: "integ-test",
componentName: "${COMPONENT_NAME}",
)
echo("Download report manifest from https://ci.opensearch.org/ci/dbc/integ-test-opensearch-dashboards/${env.version}/${env.buildId}/${env.platform}/${env.architecture}/${env.distribution}/test-results/${env.BUILD_NUMBER}/integ-test/test-report.yml")
archiveArtifacts artifacts: 'test-report.yml'
}
checkout scm
sh 'sleep 5'
sh "cp manifests-osd-${env.BUILD_NUMBER}/${BUILD_MANIFEST} ."
sh "cp manifests-osd-${env.BUILD_NUMBER}/${BUILD_MANIFEST_OPENSEARCH} ."
createUploadTestReportManifest(
testManifest: "manifests/${TEST_MANIFEST}",
buildManifest: BUILD_MANIFEST_OPENSEARCH,
dashboardsBuildManifest: BUILD_MANIFEST,
testRunID: "${env.BUILD_NUMBER}",
testType: "integ-test",
componentName: "${COMPONENT_NAME}",
)
echo("Download report manifest from https://ci.opensearch.org/ci/dbc/integ-test-opensearch-dashboards/${env.version}/${env.buildId}/${env.platform}/${env.architecture}/${env.distribution}/test-results/${env.BUILD_NUMBER}/integ-test/test-report.yml")
archiveArtifacts artifacts: 'test-report.yml'
}
}
}
Expand Down
23 changes: 13 additions & 10 deletions jenkins/opensearch/integ-test.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -297,22 +297,25 @@ pipeline {
docker.withRegistry('https://public.ecr.aws/') {
docker.image(docker_images["$distribution"]).inside(docker_args["$distribution"]) {
dir ("manifests-os-${env.BUILD_NUMBER}") {
checkout scm
sh 'sleep 10'
checkout scm
downloadBuildManifest(
url: BUILD_MANIFEST_URL,
path: BUILD_MANIFEST
)
createUploadTestReportManifest(
testManifest: "manifests/${TEST_MANIFEST}",
buildManifest: BUILD_MANIFEST,
testRunID: "${env.BUILD_NUMBER}",
testType: 'integ-test',
componentName: "${COMPONENT_NAME}",
)
echo("Download report manifest from https://ci.opensearch.org/ci/dbc/integ-test/${env.version}/${env.buildId}/${env.platform}/${env.architecture}/${env.distribution}/test-results/${env.BUILD_NUMBER}/integ-test/test-report.yml")
archiveArtifacts artifacts: 'test-report.yml'
}
checkout scm
sh 'sleep 5'
sh "cp manifests-os-${env.BUILD_NUMBER}/${BUILD_MANIFEST} ."
createUploadTestReportManifest(
testManifest: "manifests/${TEST_MANIFEST}",
buildManifest: BUILD_MANIFEST,
testRunID: "${env.BUILD_NUMBER}",
testType: 'integ-test',
componentName: "${COMPONENT_NAME}",
)
echo("Download report manifest from https://ci.opensearch.org/ci/dbc/integ-test/${env.version}/${env.buildId}/${env.platform}/${env.architecture}/${env.distribution}/test-results/${env.BUILD_NUMBER}/integ-test/test-report.yml")
archiveArtifacts artifacts: 'test-report.yml'
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -433,35 +433,39 @@
downloadBuildManifest.sh(curl -sSL --retry 5 https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/3.0.0/215/linux/x64/tar/dist/opensearch/opensearch-3.0.0-linux-x64.tar.gz --output tests/jenkins/data/opensearch-3.0.0-build.yml)
downloadBuildManifest.readYaml({file=tests/jenkins/data/opensearch-3.0.0-build.yml})
BuildManifest.asBoolean()
integ-test.createUploadTestReportManifest({testManifest=manifests/tests/jenkins/data/opensearch-dashboards-3.0.0-test.yml, buildManifest=tests/jenkins/data/opensearch-3.0.0-build.yml, dashboardsBuildManifest=tests/jenkins/data/opensearch-dashboards-3.0.0-build.yml, testRunID=215, testType=integ-test, componentName=})
createUploadTestReportManifest.legacySCM(groovy.lang.Closure)
createUploadTestReportManifest.library({[email protected], retriever=null})
createUploadTestReportManifest.readYaml({file=manifests/tests/jenkins/data/opensearch-dashboards-3.0.0-test.yml})
TestManifest.asBoolean()
createUploadTestReportManifest.readYaml({file=tests/jenkins/data/opensearch-3.0.0-build.yml})
BuildManifest.asBoolean()
createUploadTestReportManifest.readYaml({file=tests/jenkins/data/opensearch-dashboards-3.0.0-build.yml})
BuildManifest.asBoolean()
BuildManifest.getDistribution()
createUploadTestReportManifest.echo(Start Reporting workflow for test type: tar)
BuildManifest.getArtifactRootUrl(distribution-build-opensearch, 215)
BuildManifest.getArtifactRootUrl(distribution-build-opensearch-dashboards, 215)
createUploadTestReportManifest.echo(Artifact root URL: https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/3.0.0/215/linux/x64/tar)
createUploadTestReportManifest.echo(Paths: opensearch=https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/3.0.0/215/linux/x64/tar opensearch-dashboards=https://ci.opensearch.org/ci/dbc/distribution-build-opensearch-dashboards/3.0.0/215/linux/x64/tar)
createUploadTestReportManifest.echo(Base Path DUMMY_PUBLIC_ARTIFACT_URL/dummy_job/3.0.0/215/linux/x64/tar)
createUploadTestReportManifest.echo(Component: )
createUploadTestReportManifest.echo(Run command: ./report.sh manifests/tests/jenkins/data/opensearch-dashboards-3.0.0-test.yml --artifact-paths opensearch=https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/3.0.0/215/linux/x64/tar opensearch-dashboards=https://ci.opensearch.org/ci/dbc/distribution-build-opensearch-dashboards/3.0.0/215/linux/x64/tar --test-run-id 215 --test-type integ-test --base-path DUMMY_PUBLIC_ARTIFACT_URL/dummy_job/3.0.0/215/linux/x64/tar )
createUploadTestReportManifest.sh(./report.sh manifests/tests/jenkins/data/opensearch-dashboards-3.0.0-test.yml --artifact-paths opensearch=https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/3.0.0/215/linux/x64/tar opensearch-dashboards=https://ci.opensearch.org/ci/dbc/distribution-build-opensearch-dashboards/3.0.0/215/linux/x64/tar --test-run-id 215 --test-type integ-test --base-path DUMMY_PUBLIC_ARTIFACT_URL/dummy_job/3.0.0/215/linux/x64/tar )
createUploadTestReportManifest.echo(Build Id: 215)
BuildManifest.getArtifactRoot(dummy_job, 215)
createUploadTestReportManifest.string({credentialsId=jenkins-artifact-bucket-name, variable=ARTIFACT_BUCKET_NAME})
createUploadTestReportManifest.string({credentialsId=jenkins-aws-account-public, variable=AWS_ACCOUNT_PUBLIC})
createUploadTestReportManifest.withCredentials([ARTIFACT_BUCKET_NAME, AWS_ACCOUNT_PUBLIC], groovy.lang.Closure)
createUploadTestReportManifest.echo(Uploading to s3://dummy_job/3.0.0/215/linux/x64/tar/test-results/215/integ-test/test-report.yml)
createUploadTestReportManifest.withAWS({role=opensearch-test, roleAccount=AWS_ACCOUNT_PUBLIC, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure)
createUploadTestReportManifest.s3Upload({file=/tmp/workspace/test-report.yml, bucket=ARTIFACT_BUCKET_NAME, path=dummy_job/3.0.0/215/linux/x64/tar/test-results/215/integ-test/test-report.yml})
integ-test.echo(Download report manifest from https://ci.opensearch.org/ci/dbc/integ-test-opensearch-dashboards/3.0.0/215/linux/x64/tar/test-results/215/integ-test/test-report.yml)
integ-test.archiveArtifacts({artifacts=test-report.yml})
integ-test.checkout(groovy.lang.Closure)
integ-test.sh(sleep 5)
integ-test.sh(cp manifests-osd-215/tests/jenkins/data/opensearch-dashboards-3.0.0-build.yml .)
integ-test.sh(cp manifests-osd-215/tests/jenkins/data/opensearch-3.0.0-build.yml .)
integ-test.createUploadTestReportManifest({testManifest=manifests/tests/jenkins/data/opensearch-dashboards-3.0.0-test.yml, buildManifest=tests/jenkins/data/opensearch-3.0.0-build.yml, dashboardsBuildManifest=tests/jenkins/data/opensearch-dashboards-3.0.0-build.yml, testRunID=215, testType=integ-test, componentName=})
createUploadTestReportManifest.legacySCM(groovy.lang.Closure)
createUploadTestReportManifest.library({[email protected], retriever=null})
createUploadTestReportManifest.readYaml({file=manifests/tests/jenkins/data/opensearch-dashboards-3.0.0-test.yml})
TestManifest.asBoolean()
createUploadTestReportManifest.readYaml({file=tests/jenkins/data/opensearch-3.0.0-build.yml})
BuildManifest.asBoolean()
createUploadTestReportManifest.readYaml({file=tests/jenkins/data/opensearch-dashboards-3.0.0-build.yml})
BuildManifest.asBoolean()
BuildManifest.getDistribution()
createUploadTestReportManifest.echo(Start Reporting workflow for test type: tar)
BuildManifest.getArtifactRootUrl(distribution-build-opensearch, 215)
BuildManifest.getArtifactRootUrl(distribution-build-opensearch-dashboards, 215)
createUploadTestReportManifest.echo(Artifact root URL: https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/3.0.0/215/linux/x64/tar)
createUploadTestReportManifest.echo(Paths: opensearch=https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/3.0.0/215/linux/x64/tar opensearch-dashboards=https://ci.opensearch.org/ci/dbc/distribution-build-opensearch-dashboards/3.0.0/215/linux/x64/tar)
createUploadTestReportManifest.echo(Base Path DUMMY_PUBLIC_ARTIFACT_URL/dummy_job/3.0.0/215/linux/x64/tar)
createUploadTestReportManifest.echo(Component: )
createUploadTestReportManifest.echo(Run command: ./report.sh manifests/tests/jenkins/data/opensearch-dashboards-3.0.0-test.yml --artifact-paths opensearch=https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/3.0.0/215/linux/x64/tar opensearch-dashboards=https://ci.opensearch.org/ci/dbc/distribution-build-opensearch-dashboards/3.0.0/215/linux/x64/tar --test-run-id 215 --test-type integ-test --base-path DUMMY_PUBLIC_ARTIFACT_URL/dummy_job/3.0.0/215/linux/x64/tar )
createUploadTestReportManifest.sh(./report.sh manifests/tests/jenkins/data/opensearch-dashboards-3.0.0-test.yml --artifact-paths opensearch=https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/3.0.0/215/linux/x64/tar opensearch-dashboards=https://ci.opensearch.org/ci/dbc/distribution-build-opensearch-dashboards/3.0.0/215/linux/x64/tar --test-run-id 215 --test-type integ-test --base-path DUMMY_PUBLIC_ARTIFACT_URL/dummy_job/3.0.0/215/linux/x64/tar )
createUploadTestReportManifest.echo(Build Id: 215)
BuildManifest.getArtifactRoot(dummy_job, 215)
createUploadTestReportManifest.string({credentialsId=jenkins-artifact-bucket-name, variable=ARTIFACT_BUCKET_NAME})
createUploadTestReportManifest.string({credentialsId=jenkins-aws-account-public, variable=AWS_ACCOUNT_PUBLIC})
createUploadTestReportManifest.withCredentials([ARTIFACT_BUCKET_NAME, AWS_ACCOUNT_PUBLIC], groovy.lang.Closure)
createUploadTestReportManifest.echo(Uploading to s3://dummy_job/3.0.0/215/linux/x64/tar/test-results/215/integ-test/test-report.yml)
createUploadTestReportManifest.withAWS({role=opensearch-test, roleAccount=AWS_ACCOUNT_PUBLIC, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure)
createUploadTestReportManifest.s3Upload({file=/tmp/workspace/test-report.yml, bucket=ARTIFACT_BUCKET_NAME, path=dummy_job/3.0.0/215/linux/x64/tar/test-results/215/integ-test/test-report.yml})
integ-test.echo(Download report manifest from https://ci.opensearch.org/ci/dbc/integ-test-opensearch-dashboards/3.0.0/215/linux/x64/tar/test-results/215/integ-test/test-report.yml)
integ-test.archiveArtifacts({artifacts=test-report.yml})
integ-test.node(Jenkins-Agent-AL2023-X64-M54xlarge-Docker-Host, groovy.lang.Closure)
integ-test.sh(mkdir -p test-results-osd-215)
integ-test.sh(curl -sSL https://ci.opensearch.org/ci/dbc/integ-test-opensearch-dashboards/3.0.0/215/linux/x64/tar/test-results/215/integ-test/test-report.yml --output test-results-osd-215/test-report.yml)
Expand Down
Loading

0 comments on commit 21fb624

Please sign in to comment.