From a8f72cb847e5a5d136951b0bedf82155e35da5fd Mon Sep 17 00:00:00 2001 From: Jeff Lu Date: Mon, 3 Oct 2022 10:33:44 -0700 Subject: [PATCH] Clean-up step of migrating Jenkins shared libraries to opensearch-build-libraries repo (#2679) * update lib clean-up p1 Signed-off-by: Jeff Lu * clean-up p2 Signed-off-by: Jeff Lu * clean-up p3 Signed-off-by: Jeff Lu * update parameters on TestRunNonSecurityPerfTestScript.groovy Signed-off-by: Jeff Lu * Fix tests Signed-off-by: prudhvigodithi * Fix tests Signed-off-by: prudhvigodithi * update fix on TestReleaseTagJob Signed-off-by: Jeff Lu * updating TestReleaseTagJob one more time Signed-off-by: Jeff Lu * remove TestReleaseTagJob for now to unblock Jacoco error Signed-off-by: Jeff Lu * remove AssembleUpload_Jenkinsfile Signed-off-by: Jeff Lu * remove /jobs/ as it has been migrated to build-lib repo Signed-off-by: Jeff Lu Signed-off-by: Jeff Lu Signed-off-by: prudhvigodithi Co-authored-by: prudhvigodithi --- .gitignore | 2 +- build.gradle | 6 +- src/jenkins/BuildManifest.groovy | 191 ----------------- src/jenkins/BundleManifest.groovy | 110 ---------- src/jenkins/InputManifest.groovy | 71 ------- src/jenkins/Messages.groovy | 50 ----- src/jenkins/TestManifest.groovy | 39 ---- .../jenkins/TestArchiveAssembleUpload.groovy | 52 ----- tests/jenkins/TestAssembleManifest.groovy | 38 ---- tests/jenkins/TestAssembleUpload.groovy | 45 ---- tests/jenkins/TestBuildArchive.groovy | 44 ---- tests/jenkins/TestBuildAssembleUpload.groovy | 60 ------ tests/jenkins/TestBuildDockerImage.groovy | 75 ------- tests/jenkins/TestBuildFailureMessage.groovy | 29 --- tests/jenkins/TestBuildInfoYaml.groovy | 34 --- tests/jenkins/TestBuildManifest.groovy | 24 --- .../jenkins/TestBuildUploadManifestSHA.groovy | 48 ----- tests/jenkins/TestBuildYumRepo.groovy | 30 --- tests/jenkins/TestCCRPerfTest.groovy | 51 ++++- tests/jenkins/TestCopyContainer.groovy | 114 ---------- tests/jenkins/TestCreateGithubIssue.groovy | 33 --- tests/jenkins/TestCreateReleaseTag.groovy | 29 --- .../TestCreateTestResultsMessage.groovy | 32 --- .../TestDataPrepperReleaseArtifacts.groovy | 12 +- tests/jenkins/TestDetectDockerImage.groovy | 22 -- .../jenkins/TestDetectTestDockerAgent.groovy | 24 --- tests/jenkins/TestDownloadFromS3.groovy | 29 --- tests/jenkins/TestGetManifestSHA.groovy | 60 ------ tests/jenkins/TestHello.groovy | 19 -- tests/jenkins/TestInputManifest.groovy | 19 -- tests/jenkins/TestMavenSignReleaseJob.groovy | 22 +- tests/jenkins/TestMessages.groovy | 28 --- tests/jenkins/TestOpenSearchBwcTest.groovy | 65 +++--- .../TestOpenSearchDashboardsBwcTest.groovy | 65 +++--- .../TestOpenSearchDashboardsIntegTest.groovy | 65 +++--- tests/jenkins/TestOpenSearchIntegTest.groovy | 71 ++++--- tests/jenkins/TestParallelMessages.groovy | 29 --- tests/jenkins/TestPostCleanup.groovy | 28 --- ...PrintArtifactDownloadUrlsForStaging.groovy | 34 --- tests/jenkins/TestPromoteArtifacts.groovy | 185 ---------------- tests/jenkins/TestPromoteYumRepos.groovy | 47 ----- tests/jenkins/TestPublishNotification.groovy | 30 --- .../TestReleaseTagDashboardsJob.groovy | 47 ----- tests/jenkins/TestReleaseTagJob.groovy | 46 ---- .../TestRpmDashboardsDistValidation.groovy | 109 ---------- tests/jenkins/TestRpmMetaValidation.groovy | 62 ------ .../TestRpmOpenSearchDistValidation.groovy | 165 --------------- tests/jenkins/TestRunBwcTestScript.groovy | 42 ---- tests/jenkins/TestRunGradleCheck.groovy | 31 --- tests/jenkins/TestRunIntegTestScript.groovy | 58 ----- .../TestRunNonSecurityPerfTestScript.groovy | 62 +++++- tests/jenkins/TestRunPerfTestScript.groovy | 130 ------------ tests/jenkins/TestScanDockerImage.groovy | 31 --- tests/jenkins/TestSignArtifacts.groovy | 30 --- .../TestSignStandaloneArtifactsJob.groovy | 27 ++- tests/jenkins/TestUploadIndexFile.groovy | 28 --- .../jenkins/TestUploadMinSnapshotsToS3.groovy | 28 --- tests/jenkins/TestUploadTestResults.groovy | 27 --- tests/jenkins/TestUploadToS3.groovy | 28 --- tests/jenkins/TestbuildManifestVar.groovy | 21 -- .../perf-test.jenkinsfile.txt | 8 +- .../bwc-test.jenkinsfile.txt | 12 +- .../integ-test.jenkinsfile.txt | 12 +- .../opensearch/bwc-test.jenkinsfile.txt | 12 +- .../opensearch/integ-test.jenkinsfile.txt | 12 +- .../opensearch/perf-test.jenkinsfile.txt | 48 ++--- .../release-tag-dashboards.jenkinsfile.txt | 2 +- .../release-tag/release-tag.jenkinsfile.txt | 2 +- .../jobs/ArchiveAssembleUpload_Jenkinsfile | 18 -- .../ArchiveAssembleUpload_Jenkinsfile.txt | 59 ------ .../jobs/AssembleManifest_rpm_Jenkinsfile | 19 -- .../jobs/AssembleManifest_rpm_Jenkinsfile.txt | 108 ---------- .../jobs/AssembleManifest_tar_Jenkinsfile | 19 -- .../jobs/AssembleManifest_tar_Jenkinsfile.txt | 14 -- tests/jenkins/jobs/AssembleUpload_Jenkinsfile | 14 -- .../jobs/AssembleUpload_Jenkinsfile.txt | 49 ----- tests/jenkins/jobs/BuildArchive_Jenkinsfile | 18 -- .../jenkins/jobs/BuildArchive_Jenkinsfile.txt | 16 -- .../jobs/BuildAssembleUpload_Jenkinsfile | 17 -- .../jobs/BuildAssembleUpload_Jenkinsfile.txt | 58 ----- .../jenkins/jobs/BuildDockerImage_Jenkinsfile | 16 -- ...ildDockerImage_Jenkinsfile_builds_both.txt | 19 -- ...ildDockerImage_Jenkinsfile_skips_arm64.txt | 11 - ...uildDockerImage_Jenkinsfile_skips_both.txt | 11 - ...BuildDockerImage_Jenkinsfile_skips_x64.txt | 11 - .../BuildDockerImage_Qualifier_Jenkinsfile | 16 -- ...mage_Qualifier_Jenkinsfile_builds_both.txt | 19 -- .../jobs/BuildFailureMessage_Jenkinsfile | 19 -- .../jobs/BuildFailureMessage_Jenkinsfile.txt | 6 - tests/jenkins/jobs/BuildInfoYaml_Jenkinsfile | 47 ----- .../jobs/BuildInfoYaml_Jenkinsfile.txt | 108 ---------- tests/jenkins/jobs/BuildManifest_Jenkinsfile | 42 ---- .../jobs/BuildManifest_Jenkinsfile.txt | 36 ---- ...Manifest_Jenkinsfile_component_no_artifact | 38 ---- ...fest_Jenkinsfile_component_no_artifact.txt | 29 --- .../jenkins/jobs/BuildShManifest_Jenkinsfile | 29 --- .../jobs/BuildShManifest_Jenkinsfile.txt | 11 - .../jobs/BuildUploadManifestSHA_Jenkinsfile | 16 -- .../BuildUploadManifestSHA_Jenkinsfile.txt | 31 --- tests/jenkins/jobs/BuildYumRepo_Jenkinsfile | 20 -- .../jenkins/jobs/BuildYumRepo_Jenkinsfile.txt | 21 -- .../Build_OpenSearch_Dashboards_Jenkinsfile | 168 --------------- .../CreateGithubIssueExisting_Jenkinsfile | 18 -- .../CreateGithubIssueExisting_Jenkinsfile.txt | 13 -- .../jobs/CreateGithubIssue_Jenkinsfile | 18 -- .../jobs/CreateGithubIssue_Jenkinsfile.txt | 15 -- .../jenkins/jobs/CreateReleaseTag_Jenkinsfile | 15 -- .../jobs/CreateReleaseTag_Jenkinsfile.txt | 161 -------------- .../jobs/CreateTestResultsMessage_Jenkinsfile | 24 --- .../CreateTestResultsMessage_Jenkinsfile.txt | 6 - .../jobs/DetectDockerImage_Jenkinsfile | 54 ----- .../jobs/DetectDockerImage_Jenkinsfile.txt | 51 ----- .../jobs/DetectTestDockerAgent_Jenkinsfile | 22 -- .../DetectTestDockerAgent_Jenkinsfile.txt | 11 - tests/jenkins/jobs/DownloadFromS3_Jenkinsfile | 25 --- .../jobs/DownloadFromS3_Jenkinsfile.txt | 10 - tests/jenkins/jobs/GetManifestSHA_Jenkinsfile | 21 -- ...ManifestSHA_Jenkinsfile_does_not_exist.txt | 27 --- .../GetManifestSHA_Jenkinsfile_exists.txt | 27 --- tests/jenkins/jobs/Hello_Jenkinsfile | 13 -- tests/jenkins/jobs/Hello_Jenkinsfile.txt | 3 - tests/jenkins/jobs/InputManifest_Jenkinsfile | 43 ---- .../jobs/InputManifest_Jenkinsfile.txt | 26 --- tests/jenkins/jobs/Messages_Jenkinsfile | 36 ---- tests/jenkins/jobs/Messages_Jenkinsfile.txt | 23 -- .../jenkins/jobs/ParallelMessages_Jenkinsfile | 82 -------- tests/jenkins/jobs/PostCleanup_Jenkinsfile | 17 -- .../jenkins/jobs/PostCleanup_Jenkinsfile.txt | 8 - ...ArtifactDownloadUrlsForStaging_Jenkinsfile | 15 -- ...factDownloadUrlsForStaging_Jenkinsfile.txt | 9 - .../PromoteArtifactsQualifier_Jenkinsfile | 14 -- .../PromoteArtifactsQualifier_Jenkinsfile.txt | 35 --- ...ualifier_OpenSearch_Dashboards_Jenkinsfile | 14 -- ...fier_OpenSearch_Dashboards_Jenkinsfile.txt | 35 --- ...moteArtifactsQualifier_actions_Jenkinsfile | 15 -- ...ArtifactsQualifier_actions_Jenkinsfile.txt | 95 --------- ..._actions_OpenSearch_Dashboards_Jenkinsfile | 15 -- ...ions_OpenSearch_Dashboards_Jenkinsfile.txt | 95 --------- .../jenkins/jobs/PromoteArtifacts_Jenkinsfile | 14 -- .../jobs/PromoteArtifacts_Jenkinsfile.txt | 56 ----- ...rtifacts_OpenSearch_Dashboards_Jenkinsfile | 14 -- ...acts_OpenSearch_Dashboards_Jenkinsfile.txt | 35 --- .../jobs/PromoteArtifacts_actions_Jenkinsfile | 15 -- .../PromoteArtifacts_actions_Jenkinsfile.txt | 147 ------------- ..._actions_OpenSearch_Dashboards_Jenkinsfile | 15 -- ...ions_OpenSearch_Dashboards_Jenkinsfile.txt | 95 --------- .../jenkins/jobs/PromoteYumRepos_Jenkinsfile | 16 -- .../jobs/PromoteYumRepos_Jenkinsfile.txt | 89 -------- .../jobs/PublishNotification_Jenkinsfile | 22 -- .../jobs/PublishNotification_Jenkinsfile.txt | 15 -- .../RpmDashboardsDistValidation_Jenkinsfile | 15 -- ...pmDashboardsDistValidation_Jenkinsfile.txt | 50 ----- .../jobs/RpmMetaValidation_Jenkinsfile | 20 -- .../jobs/RpmMetaValidation_Jenkinsfile.txt | 18 -- .../RpmOpenSearchDistValidation_Jenkinsfile | 15 -- ...pmOpenSearchDistValidation_Jenkinsfile.txt | 59 ------ .../jenkins/jobs/RunBwcTestScript_Jenkinsfile | 25 --- .../jobs/RunBwcTestScript_Jenkinsfile.txt | 14 -- ...stScript_OpenSearch_Dashboards_Jenkinsfile | 25 --- ...ript_OpenSearch_Dashboards_Jenkinsfile.txt | 14 -- tests/jenkins/jobs/RunGradleCheck_Jenkinsfile | 23 -- .../jobs/RunGradleCheck_Jenkinsfile.txt | 65 ------ .../jobs/RunIntegTestScript_Jenkinsfile | 25 --- .../jobs/RunIntegTestScript_Jenkinsfile.txt | 17 -- .../RunIntegTestScript_LocalPath_Jenkinsfile | 26 --- ...nIntegTestScript_LocalPath_Jenkinsfile.txt | 17 -- ...stScript_OpenSearch_Dashboards_Jenkinsfile | 25 --- ...ript_OpenSearch_Dashboards_Jenkinsfile.txt | 17 -- .../jenkins/jobs/ScanDockerImage_Jenkinsfile | 23 -- .../jobs/ScanDockerImage_Jenkinsfile.txt | 12 -- tests/jenkins/jobs/SignArtifacts_Jenkinsfile | 28 --- .../jobs/SignArtifacts_Jenkinsfile.txt | 127 ----------- .../jenkins/jobs/UploadIndexFile_Jenkinsfile | 19 -- .../jobs/UploadIndexFile_Jenkinsfile.txt | 17 -- .../jobs/UploadTestResults_Jenkinsfile | 15 -- .../jobs/UploadTestResults_Jenkinsfile.txt | 23 -- tests/jenkins/jobs/UploadToS3_Jenkinsfile | 16 -- tests/jenkins/jobs/UploadToS3_Jenkinsfile.txt | 10 - ...ote-distribution-artifacts.jenkinsfile.txt | 19 -- .../jobs/uploadMinSnapshotsToS3_Jenkinsfile | 21 -- .../uploadMinSnapshotsToS3_Jenkinsfile.txt | 44 ---- .../AssembleManifestLibTester.groovy | 39 ---- .../BuildFailureMessageLibTester.groovy | 31 --- .../lib-testers/BuildInfoYamlLibTester.groovy | 54 ----- .../lib-testers/BuildYumRepoTester.groovy | 42 ---- .../CreateGithubIssueLibTester.groovy | 43 ---- .../CreateReleaseTagLibTester.groovy | 77 ------- .../CreateTestResultsMessageLibTester.groovy | 49 ----- .../DetectTestDockerAgentLibTester.groovy | 37 ---- .../DownloadBuildManifestLibTester.groovy | 43 ---- .../DownloadFromS3LibTester.groovy | 56 ----- ...factDownloadUrlsForStagingLibTester.groovy | 38 ---- .../PublishNotificationLibTester.groovy | 55 ----- ...pmDashboardsDistValidationLibTester.groovy | 40 ---- .../RpmMetaValidationLibTester.groovy | 41 ---- ...pmOpenSearchDistValidationLibTester.groovy | 43 ---- .../RunBwcTestScriptLibTest.groovy | 47 ----- .../RunGradleCheckLibTester.groovy | 40 ---- .../RunIntegTestScriptLibTest.groovy | 49 ----- .../RunPerfTestScriptLibTest.groovy | 104 --------- .../ScanDockerImageLibTester.groovy | 40 ---- .../lib-testers/SignArtifactsLibTester.groovy | 68 ------ .../UploadIndexFileLibTester.groovy | 44 ---- .../UploadMinSnapshotsToS3LibTester.groovy | 58 ----- .../UploadTestResultsLibTester.groovy | 54 ----- .../lib-testers/UploadToS3LibTester.groovy | 53 ----- vars/archiveAssembleUpload.groovy | 29 --- vars/assembleManifest.groovy | 33 --- vars/assembleUpload.groovy | 15 -- vars/buildArchive.groovy | 19 -- vars/buildAssembleUpload.groovy | 25 --- vars/buildDockerImage.groovy | 75 ------- vars/buildFailureMessage.groovy | 33 --- vars/buildInfoYaml.groovy | 70 ------ vars/buildManifest.groovy | 20 -- vars/buildUploadManifestSHA.groovy | 22 -- vars/buildYumRepo.groovy | 36 ---- vars/copyContainer.groovy | 52 ----- vars/createGithubIssue.groovy | 75 ------- vars/createReleaseTag.groovy | 67 ------ vars/createSha512Checksums.groovy | 40 ---- vars/createSignatureFiles.groovy | 15 -- vars/createTestResultsMessage.groovy | 16 -- vars/detectDockerAgent.groovy | 29 --- vars/detectTestDockerAgent.groovy | 20 -- vars/downloadBuildManifest.groovy | 15 -- vars/downloadFromS3.groovy | 15 -- vars/getManifestSHA.groovy | 49 ----- vars/postCleanup.groovy | 11 - ...printArtifactDownloadUrlsForStaging.groovy | 16 -- vars/promoteArtifacts.groovy | 112 ---------- vars/promoteContainer.groovy | 110 ---------- vars/promoteYumRepos.groovy | 113 ---------- vars/publishNotification.groovy | 28 --- vars/rpmCommands.groovy | 42 ---- vars/rpmDashboardsDistValidation.groovy | 149 ------------- vars/rpmDistValidation.groovy | 77 ------- vars/rpmMetaValidation.groovy | 79 ------- vars/rpmOpenSearchDistValidation.groovy | 199 ------------------ vars/runBwcTestScript.groovy | 33 --- vars/runGradleCheck.groovy | 85 -------- vars/runIntegTestScript.groovy | 58 ----- vars/runPerfTestScript.groovy | 49 ----- vars/scanDockerImage.groovy | 18 -- vars/signArtifacts.groovy | 168 --------------- vars/systemdCommands.groovy | 37 ---- vars/uploadArtifacts.groovy | 53 ----- vars/uploadIndexFile.groovy | 22 -- vars/uploadMinSnapshotsToS3.groovy | 57 ----- vars/uploadTestResults.groovy | 34 --- vars/uploadToS3.groovy | 15 -- 251 files changed, 371 insertions(+), 9971 deletions(-) delete mode 100644 src/jenkins/BuildManifest.groovy delete mode 100644 src/jenkins/BundleManifest.groovy delete mode 100644 src/jenkins/InputManifest.groovy delete mode 100644 src/jenkins/Messages.groovy delete mode 100644 src/jenkins/TestManifest.groovy delete mode 100644 tests/jenkins/TestArchiveAssembleUpload.groovy delete mode 100644 tests/jenkins/TestAssembleManifest.groovy delete mode 100644 tests/jenkins/TestAssembleUpload.groovy delete mode 100644 tests/jenkins/TestBuildArchive.groovy delete mode 100644 tests/jenkins/TestBuildAssembleUpload.groovy delete mode 100644 tests/jenkins/TestBuildDockerImage.groovy delete mode 100644 tests/jenkins/TestBuildFailureMessage.groovy delete mode 100644 tests/jenkins/TestBuildInfoYaml.groovy delete mode 100644 tests/jenkins/TestBuildManifest.groovy delete mode 100644 tests/jenkins/TestBuildUploadManifestSHA.groovy delete mode 100644 tests/jenkins/TestBuildYumRepo.groovy delete mode 100644 tests/jenkins/TestCopyContainer.groovy delete mode 100644 tests/jenkins/TestCreateGithubIssue.groovy delete mode 100644 tests/jenkins/TestCreateReleaseTag.groovy delete mode 100644 tests/jenkins/TestCreateTestResultsMessage.groovy delete mode 100644 tests/jenkins/TestDetectDockerImage.groovy delete mode 100644 tests/jenkins/TestDetectTestDockerAgent.groovy delete mode 100644 tests/jenkins/TestDownloadFromS3.groovy delete mode 100644 tests/jenkins/TestGetManifestSHA.groovy delete mode 100644 tests/jenkins/TestHello.groovy delete mode 100644 tests/jenkins/TestInputManifest.groovy delete mode 100644 tests/jenkins/TestMessages.groovy delete mode 100644 tests/jenkins/TestParallelMessages.groovy delete mode 100644 tests/jenkins/TestPostCleanup.groovy delete mode 100644 tests/jenkins/TestPrintArtifactDownloadUrlsForStaging.groovy delete mode 100644 tests/jenkins/TestPromoteArtifacts.groovy delete mode 100644 tests/jenkins/TestPromoteYumRepos.groovy delete mode 100644 tests/jenkins/TestPublishNotification.groovy delete mode 100644 tests/jenkins/TestReleaseTagDashboardsJob.groovy delete mode 100644 tests/jenkins/TestReleaseTagJob.groovy delete mode 100644 tests/jenkins/TestRpmDashboardsDistValidation.groovy delete mode 100644 tests/jenkins/TestRpmMetaValidation.groovy delete mode 100644 tests/jenkins/TestRpmOpenSearchDistValidation.groovy delete mode 100644 tests/jenkins/TestRunBwcTestScript.groovy delete mode 100644 tests/jenkins/TestRunGradleCheck.groovy delete mode 100644 tests/jenkins/TestRunIntegTestScript.groovy delete mode 100644 tests/jenkins/TestRunPerfTestScript.groovy delete mode 100644 tests/jenkins/TestScanDockerImage.groovy delete mode 100644 tests/jenkins/TestSignArtifacts.groovy delete mode 100644 tests/jenkins/TestUploadIndexFile.groovy delete mode 100644 tests/jenkins/TestUploadMinSnapshotsToS3.groovy delete mode 100644 tests/jenkins/TestUploadTestResults.groovy delete mode 100644 tests/jenkins/TestUploadToS3.groovy delete mode 100644 tests/jenkins/TestbuildManifestVar.groovy delete mode 100644 tests/jenkins/jobs/ArchiveAssembleUpload_Jenkinsfile delete mode 100644 tests/jenkins/jobs/ArchiveAssembleUpload_Jenkinsfile.txt delete mode 100644 tests/jenkins/jobs/AssembleManifest_rpm_Jenkinsfile delete mode 100644 tests/jenkins/jobs/AssembleManifest_rpm_Jenkinsfile.txt delete mode 100644 tests/jenkins/jobs/AssembleManifest_tar_Jenkinsfile delete mode 100644 tests/jenkins/jobs/AssembleManifest_tar_Jenkinsfile.txt delete mode 100644 tests/jenkins/jobs/AssembleUpload_Jenkinsfile delete mode 100644 tests/jenkins/jobs/AssembleUpload_Jenkinsfile.txt delete mode 100644 tests/jenkins/jobs/BuildArchive_Jenkinsfile delete mode 100644 tests/jenkins/jobs/BuildArchive_Jenkinsfile.txt delete mode 100644 tests/jenkins/jobs/BuildAssembleUpload_Jenkinsfile delete mode 100644 tests/jenkins/jobs/BuildAssembleUpload_Jenkinsfile.txt delete mode 100644 tests/jenkins/jobs/BuildDockerImage_Jenkinsfile delete mode 100644 tests/jenkins/jobs/BuildDockerImage_Jenkinsfile_builds_both.txt delete mode 100644 tests/jenkins/jobs/BuildDockerImage_Jenkinsfile_skips_arm64.txt delete mode 100644 tests/jenkins/jobs/BuildDockerImage_Jenkinsfile_skips_both.txt delete mode 100644 tests/jenkins/jobs/BuildDockerImage_Jenkinsfile_skips_x64.txt delete mode 100644 tests/jenkins/jobs/BuildDockerImage_Qualifier_Jenkinsfile delete mode 100644 tests/jenkins/jobs/BuildDockerImage_Qualifier_Jenkinsfile_builds_both.txt delete mode 100644 tests/jenkins/jobs/BuildFailureMessage_Jenkinsfile delete mode 100644 tests/jenkins/jobs/BuildFailureMessage_Jenkinsfile.txt delete mode 100644 tests/jenkins/jobs/BuildInfoYaml_Jenkinsfile delete mode 100644 tests/jenkins/jobs/BuildInfoYaml_Jenkinsfile.txt delete mode 100644 tests/jenkins/jobs/BuildManifest_Jenkinsfile delete mode 100644 tests/jenkins/jobs/BuildManifest_Jenkinsfile.txt delete mode 100644 tests/jenkins/jobs/BuildManifest_Jenkinsfile_component_no_artifact delete mode 100755 tests/jenkins/jobs/BuildManifest_Jenkinsfile_component_no_artifact.txt delete mode 100644 tests/jenkins/jobs/BuildShManifest_Jenkinsfile delete mode 100644 tests/jenkins/jobs/BuildShManifest_Jenkinsfile.txt delete mode 100644 tests/jenkins/jobs/BuildUploadManifestSHA_Jenkinsfile delete mode 100644 tests/jenkins/jobs/BuildUploadManifestSHA_Jenkinsfile.txt delete mode 100644 tests/jenkins/jobs/BuildYumRepo_Jenkinsfile delete mode 100644 tests/jenkins/jobs/BuildYumRepo_Jenkinsfile.txt delete mode 100644 tests/jenkins/jobs/Build_OpenSearch_Dashboards_Jenkinsfile delete mode 100644 tests/jenkins/jobs/CreateGithubIssueExisting_Jenkinsfile delete mode 100644 tests/jenkins/jobs/CreateGithubIssueExisting_Jenkinsfile.txt delete mode 100644 tests/jenkins/jobs/CreateGithubIssue_Jenkinsfile delete mode 100644 tests/jenkins/jobs/CreateGithubIssue_Jenkinsfile.txt delete mode 100644 tests/jenkins/jobs/CreateReleaseTag_Jenkinsfile delete mode 100644 tests/jenkins/jobs/CreateReleaseTag_Jenkinsfile.txt delete mode 100644 tests/jenkins/jobs/CreateTestResultsMessage_Jenkinsfile delete mode 100644 tests/jenkins/jobs/CreateTestResultsMessage_Jenkinsfile.txt delete mode 100644 tests/jenkins/jobs/DetectDockerImage_Jenkinsfile delete mode 100644 tests/jenkins/jobs/DetectDockerImage_Jenkinsfile.txt delete mode 100644 tests/jenkins/jobs/DetectTestDockerAgent_Jenkinsfile delete mode 100644 tests/jenkins/jobs/DetectTestDockerAgent_Jenkinsfile.txt delete mode 100644 tests/jenkins/jobs/DownloadFromS3_Jenkinsfile delete mode 100644 tests/jenkins/jobs/DownloadFromS3_Jenkinsfile.txt delete mode 100644 tests/jenkins/jobs/GetManifestSHA_Jenkinsfile delete mode 100644 tests/jenkins/jobs/GetManifestSHA_Jenkinsfile_does_not_exist.txt delete mode 100644 tests/jenkins/jobs/GetManifestSHA_Jenkinsfile_exists.txt delete mode 100644 tests/jenkins/jobs/Hello_Jenkinsfile delete mode 100644 tests/jenkins/jobs/Hello_Jenkinsfile.txt delete mode 100644 tests/jenkins/jobs/InputManifest_Jenkinsfile delete mode 100644 tests/jenkins/jobs/InputManifest_Jenkinsfile.txt delete mode 100644 tests/jenkins/jobs/Messages_Jenkinsfile delete mode 100644 tests/jenkins/jobs/Messages_Jenkinsfile.txt delete mode 100644 tests/jenkins/jobs/ParallelMessages_Jenkinsfile delete mode 100644 tests/jenkins/jobs/PostCleanup_Jenkinsfile delete mode 100644 tests/jenkins/jobs/PostCleanup_Jenkinsfile.txt delete mode 100644 tests/jenkins/jobs/PrintArtifactDownloadUrlsForStaging_Jenkinsfile delete mode 100644 tests/jenkins/jobs/PrintArtifactDownloadUrlsForStaging_Jenkinsfile.txt delete mode 100644 tests/jenkins/jobs/PromoteArtifactsQualifier_Jenkinsfile delete mode 100644 tests/jenkins/jobs/PromoteArtifactsQualifier_Jenkinsfile.txt delete mode 100644 tests/jenkins/jobs/PromoteArtifactsQualifier_OpenSearch_Dashboards_Jenkinsfile delete mode 100644 tests/jenkins/jobs/PromoteArtifactsQualifier_OpenSearch_Dashboards_Jenkinsfile.txt delete mode 100644 tests/jenkins/jobs/PromoteArtifactsQualifier_actions_Jenkinsfile delete mode 100644 tests/jenkins/jobs/PromoteArtifactsQualifier_actions_Jenkinsfile.txt delete mode 100644 tests/jenkins/jobs/PromoteArtifactsQualifier_actions_OpenSearch_Dashboards_Jenkinsfile delete mode 100644 tests/jenkins/jobs/PromoteArtifactsQualifier_actions_OpenSearch_Dashboards_Jenkinsfile.txt delete mode 100644 tests/jenkins/jobs/PromoteArtifacts_Jenkinsfile delete mode 100644 tests/jenkins/jobs/PromoteArtifacts_Jenkinsfile.txt delete mode 100644 tests/jenkins/jobs/PromoteArtifacts_OpenSearch_Dashboards_Jenkinsfile delete mode 100644 tests/jenkins/jobs/PromoteArtifacts_OpenSearch_Dashboards_Jenkinsfile.txt delete mode 100644 tests/jenkins/jobs/PromoteArtifacts_actions_Jenkinsfile delete mode 100644 tests/jenkins/jobs/PromoteArtifacts_actions_Jenkinsfile.txt delete mode 100644 tests/jenkins/jobs/PromoteArtifacts_actions_OpenSearch_Dashboards_Jenkinsfile delete mode 100644 tests/jenkins/jobs/PromoteArtifacts_actions_OpenSearch_Dashboards_Jenkinsfile.txt delete mode 100644 tests/jenkins/jobs/PromoteYumRepos_Jenkinsfile delete mode 100644 tests/jenkins/jobs/PromoteYumRepos_Jenkinsfile.txt delete mode 100644 tests/jenkins/jobs/PublishNotification_Jenkinsfile delete mode 100644 tests/jenkins/jobs/PublishNotification_Jenkinsfile.txt delete mode 100644 tests/jenkins/jobs/RpmDashboardsDistValidation_Jenkinsfile delete mode 100644 tests/jenkins/jobs/RpmDashboardsDistValidation_Jenkinsfile.txt delete mode 100644 tests/jenkins/jobs/RpmMetaValidation_Jenkinsfile delete mode 100644 tests/jenkins/jobs/RpmMetaValidation_Jenkinsfile.txt delete mode 100644 tests/jenkins/jobs/RpmOpenSearchDistValidation_Jenkinsfile delete mode 100644 tests/jenkins/jobs/RpmOpenSearchDistValidation_Jenkinsfile.txt delete mode 100644 tests/jenkins/jobs/RunBwcTestScript_Jenkinsfile delete mode 100644 tests/jenkins/jobs/RunBwcTestScript_Jenkinsfile.txt delete mode 100644 tests/jenkins/jobs/RunBwcTestScript_OpenSearch_Dashboards_Jenkinsfile delete mode 100644 tests/jenkins/jobs/RunBwcTestScript_OpenSearch_Dashboards_Jenkinsfile.txt delete mode 100644 tests/jenkins/jobs/RunGradleCheck_Jenkinsfile delete mode 100644 tests/jenkins/jobs/RunGradleCheck_Jenkinsfile.txt delete mode 100644 tests/jenkins/jobs/RunIntegTestScript_Jenkinsfile delete mode 100644 tests/jenkins/jobs/RunIntegTestScript_Jenkinsfile.txt delete mode 100644 tests/jenkins/jobs/RunIntegTestScript_LocalPath_Jenkinsfile delete mode 100644 tests/jenkins/jobs/RunIntegTestScript_LocalPath_Jenkinsfile.txt delete mode 100644 tests/jenkins/jobs/RunIntegTestScript_OpenSearch_Dashboards_Jenkinsfile delete mode 100644 tests/jenkins/jobs/RunIntegTestScript_OpenSearch_Dashboards_Jenkinsfile.txt delete mode 100644 tests/jenkins/jobs/ScanDockerImage_Jenkinsfile delete mode 100644 tests/jenkins/jobs/ScanDockerImage_Jenkinsfile.txt delete mode 100644 tests/jenkins/jobs/SignArtifacts_Jenkinsfile delete mode 100644 tests/jenkins/jobs/SignArtifacts_Jenkinsfile.txt delete mode 100644 tests/jenkins/jobs/UploadIndexFile_Jenkinsfile delete mode 100644 tests/jenkins/jobs/UploadIndexFile_Jenkinsfile.txt delete mode 100644 tests/jenkins/jobs/UploadTestResults_Jenkinsfile delete mode 100644 tests/jenkins/jobs/UploadTestResults_Jenkinsfile.txt delete mode 100644 tests/jenkins/jobs/UploadToS3_Jenkinsfile delete mode 100644 tests/jenkins/jobs/UploadToS3_Jenkinsfile.txt delete mode 100644 tests/jenkins/jobs/data-prepper/promote-distribution-artifacts.jenkinsfile.txt delete mode 100644 tests/jenkins/jobs/uploadMinSnapshotsToS3_Jenkinsfile delete mode 100644 tests/jenkins/jobs/uploadMinSnapshotsToS3_Jenkinsfile.txt delete mode 100644 tests/jenkins/lib-testers/AssembleManifestLibTester.groovy delete mode 100644 tests/jenkins/lib-testers/BuildFailureMessageLibTester.groovy delete mode 100644 tests/jenkins/lib-testers/BuildInfoYamlLibTester.groovy delete mode 100644 tests/jenkins/lib-testers/BuildYumRepoTester.groovy delete mode 100644 tests/jenkins/lib-testers/CreateGithubIssueLibTester.groovy delete mode 100644 tests/jenkins/lib-testers/CreateReleaseTagLibTester.groovy delete mode 100644 tests/jenkins/lib-testers/CreateTestResultsMessageLibTester.groovy delete mode 100644 tests/jenkins/lib-testers/DetectTestDockerAgentLibTester.groovy delete mode 100644 tests/jenkins/lib-testers/DownloadBuildManifestLibTester.groovy delete mode 100644 tests/jenkins/lib-testers/DownloadFromS3LibTester.groovy delete mode 100644 tests/jenkins/lib-testers/PrintArtifactDownloadUrlsForStagingLibTester.groovy delete mode 100644 tests/jenkins/lib-testers/PublishNotificationLibTester.groovy delete mode 100644 tests/jenkins/lib-testers/RpmDashboardsDistValidationLibTester.groovy delete mode 100644 tests/jenkins/lib-testers/RpmMetaValidationLibTester.groovy delete mode 100644 tests/jenkins/lib-testers/RpmOpenSearchDistValidationLibTester.groovy delete mode 100644 tests/jenkins/lib-testers/RunBwcTestScriptLibTest.groovy delete mode 100644 tests/jenkins/lib-testers/RunGradleCheckLibTester.groovy delete mode 100644 tests/jenkins/lib-testers/RunIntegTestScriptLibTest.groovy delete mode 100644 tests/jenkins/lib-testers/RunPerfTestScriptLibTest.groovy delete mode 100644 tests/jenkins/lib-testers/ScanDockerImageLibTester.groovy delete mode 100644 tests/jenkins/lib-testers/SignArtifactsLibTester.groovy delete mode 100644 tests/jenkins/lib-testers/UploadIndexFileLibTester.groovy delete mode 100644 tests/jenkins/lib-testers/UploadMinSnapshotsToS3LibTester.groovy delete mode 100644 tests/jenkins/lib-testers/UploadTestResultsLibTester.groovy delete mode 100644 tests/jenkins/lib-testers/UploadToS3LibTester.groovy delete mode 100644 vars/archiveAssembleUpload.groovy delete mode 100644 vars/assembleManifest.groovy delete mode 100644 vars/assembleUpload.groovy delete mode 100644 vars/buildArchive.groovy delete mode 100644 vars/buildAssembleUpload.groovy delete mode 100644 vars/buildDockerImage.groovy delete mode 100644 vars/buildFailureMessage.groovy delete mode 100644 vars/buildInfoYaml.groovy delete mode 100644 vars/buildManifest.groovy delete mode 100644 vars/buildUploadManifestSHA.groovy delete mode 100644 vars/buildYumRepo.groovy delete mode 100644 vars/copyContainer.groovy delete mode 100644 vars/createGithubIssue.groovy delete mode 100644 vars/createReleaseTag.groovy delete mode 100644 vars/createSha512Checksums.groovy delete mode 100644 vars/createSignatureFiles.groovy delete mode 100644 vars/createTestResultsMessage.groovy delete mode 100644 vars/detectDockerAgent.groovy delete mode 100644 vars/detectTestDockerAgent.groovy delete mode 100644 vars/downloadBuildManifest.groovy delete mode 100644 vars/downloadFromS3.groovy delete mode 100644 vars/getManifestSHA.groovy delete mode 100644 vars/postCleanup.groovy delete mode 100644 vars/printArtifactDownloadUrlsForStaging.groovy delete mode 100644 vars/promoteArtifacts.groovy delete mode 100644 vars/promoteContainer.groovy delete mode 100644 vars/promoteYumRepos.groovy delete mode 100644 vars/publishNotification.groovy delete mode 100644 vars/rpmCommands.groovy delete mode 100644 vars/rpmDashboardsDistValidation.groovy delete mode 100644 vars/rpmDistValidation.groovy delete mode 100644 vars/rpmMetaValidation.groovy delete mode 100644 vars/rpmOpenSearchDistValidation.groovy delete mode 100644 vars/runBwcTestScript.groovy delete mode 100644 vars/runGradleCheck.groovy delete mode 100644 vars/runIntegTestScript.groovy delete mode 100644 vars/runPerfTestScript.groovy delete mode 100644 vars/scanDockerImage.groovy delete mode 100644 vars/signArtifacts.groovy delete mode 100644 vars/systemdCommands.groovy delete mode 100644 vars/uploadArtifacts.groovy delete mode 100644 vars/uploadIndexFile.groovy delete mode 100644 vars/uploadMinSnapshotsToS3.groovy delete mode 100644 vars/uploadTestResults.groovy delete mode 100644 vars/uploadToS3.groovy diff --git a/.gitignore b/.gitignore index ea10698a74..54784ede11 100644 --- a/.gitignore +++ b/.gitignore @@ -32,4 +32,4 @@ out.txt /bin/ /manifests/**/*.yml.lock - +vars/ diff --git a/build.gradle b/build.gradle index 434222c6fa..eaf436ca16 100644 --- a/build.gradle +++ b/build.gradle @@ -117,8 +117,4 @@ jacocoTestReport { reports { xml.required = true } -} - -tasks.test { - maxParallelForks = Runtime.getRuntime().availableProcessors() -} +} \ No newline at end of file diff --git a/src/jenkins/BuildManifest.groovy b/src/jenkins/BuildManifest.groovy deleted file mode 100644 index d7a171301a..0000000000 --- a/src/jenkins/BuildManifest.groovy +++ /dev/null @@ -1,191 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -package jenkins - -class BuildManifest implements Serializable { - class Build implements Serializable { - String id - String name - String version - String platform - String architecture - String distribution - - Build(Map data) { - this.id = data.id - this.name = data.name - this.version = data.version - this.platform = data.platform - this.architecture = data.architecture - this.distribution = data.distribution - } - - String getFilename() { - return this.name.toLowerCase().replaceAll(' ', '-') - } - - String getFilenameWithExtension(String platform = null, String architecture = null) { - String resolvedPlatform = platform ?: this.platform - String resolvedArchitecture = architecture ?: this.architecture - return "${this.getFilename()}-${this.version}-${resolvedPlatform}-${resolvedArchitecture}.${getExtension()}" - } - - String getExtension() { - if (this.distribution == 'zip') { - return 'zip' - } else if (this.distribution == 'rpm') { - return 'rpm' - } else { - return 'tar.gz' - } - } - - String getPackageName() { - return [ - this.getFilename(), - this.version, - this.platform, - this.architecture, - ].join('-') + '.' + getExtension() - } - } - - class Components extends HashMap { - - Components(ArrayList data) { - data.each { item -> - Component component = new Component(item) - this[component.name] = component - } - } - } - - class Component implements Serializable { - String name - String version - String ref - String commit_id - String repository - Map artifacts - - Component(Map data) { - this.name = data.name - this.version = data.version - this.ref = data.ref - this.commit_id = data.commit_id - this.repository = data.repository - this.artifacts = data.artifacts ? new HashMap<>(data.artifacts) : new HashMap<>() - } - - } - - Build build - Components components - - BuildManifest(Map data) { - this.build = new BuildManifest.Build(data.build) - this.components = new BuildManifest.Components(data.components) - } - - public String getArtifactRootWithoutDistribution(String jobName, String buildNumber) { - return [ - jobName, - this.build.version, - buildNumber, - this.build.platform, - this.build.architecture - ].join("/") - } - - public String getArtifactRoot(String jobName, String buildNumber) { - return [ - this.getArtifactRootWithoutDistribution(jobName, buildNumber), - this.build.distribution - ].join("/") - } - - public String getIndexFileRoot(String jobName) { - return [ - jobName, - this.build.version - ].join("/") - } - - public String getArtifactRootUrlWithoutDistribution(String publicArtifactUrl = 'https://ci.opensearch.org/ci/dbc', String jobName, String buildNumber) { - return [ - publicArtifactUrl, - this.getArtifactRootWithoutDistribution(jobName, buildNumber) - ].join('/') - } - - public String getArtifactRootUrl(String publicArtifactUrl = 'https://ci.opensearch.org/ci/dbc', String jobName, String buildNumber) { - return [ - this.getArtifactRootUrlWithoutDistribution(publicArtifactUrl, jobName, buildNumber), - this.build.distribution - ].join('/') - } - - public String getUrl(String publicArtifactUrl = 'https://ci.opensearch.org/ci/dbc', String jobName, String buildNumber) { - return [ - this.getArtifactRootUrl(publicArtifactUrl, jobName, buildNumber), - 'builds', - this.build.getFilename(), - 'manifest.yml' - ].join("/") - } - - public String getBundleManifestUrl(String publicArtifactUrl = 'https://ci.opensearch.org/ci/dbc', String jobName, String buildNumber) { - return [ - this.getArtifactRootUrl(publicArtifactUrl, jobName, buildNumber), - 'dist', - this.build.getFilename(), - 'manifest.yml' - ].join("/") - } - - public String getArtifactUrl(String publicArtifactUrl = 'https://ci.opensearch.org/ci/dbc', String jobName, String buildNumber) { - return [ - this.getArtifactRootUrl(publicArtifactUrl, jobName, buildNumber), - 'dist', - this.build.getFilename(), - this.build.getFilenameWithExtension() - ].join("/") - } - - public String getArtifactArchitecture() { - return this.build.architecture - } - - public String getArtifactBuildId() { - return this.build.id - } - - public String getDistribution() { - return this.build.distribution - } - - public String getMinArtifact() { - components.get(build.name.replace(' ','-'))?.artifacts?.get("dist")?.first() - } - - public String getCommitId (String name) { - return this.components.get(name).commit_id - } - - public ArrayList getNames() { - def componentsName = [] - this.components.each{key, value -> componentsName.add(key)} - return componentsName - } - - public String getRepo(String name) { - return this.components.get(name).repository - } -} diff --git a/src/jenkins/BundleManifest.groovy b/src/jenkins/BundleManifest.groovy deleted file mode 100644 index f0f21b7916..0000000000 --- a/src/jenkins/BundleManifest.groovy +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - - -package jenkins - - -class BundleManifest implements Serializable { - class Build implements Serializable { - String id - String name - String version - String platform - String architecture - String distribution - String location - - Build(Map data) { - this.id = data.id - this.name = data.name - this.version = data.version - this.platform = data.platform - this.architecture = data.architecture - this.distribution = data.distribution - this.location = data.location - } - - String getFilename() { - return this.name.toLowerCase().replaceAll(' ', '-') - } - - String getBuildLocation() { - return this.location - } - - } - - class Components extends HashMap { - - Components(ArrayList data) { - data.each { item -> - Component component = new Component(item) - this[component.name] = component - } - } - } - - class Component implements Serializable { - String name - String version - String ref - String commit_id - String repository - String location - - Component(Map data) { - this.name = data.name - this.version = data.version - this.ref = data.ref - this.commit_id = data.commit_id - this.repository = data.repository - this.location = data.location - } - - } - - Build build - Components components - - BundleManifest(Map data) { - this.build = new BundleManifest.Build(data.build) - this.components = new BundleManifest.Components(data.components) - } - - public String getArtifactArchitecture() { - return this.build.architecture - } - - public String getArtifactBuildId() { - return this.build.id - } - - public String getDistribution() { - return this.build.distribution - } - - public String getCommitId (String name) { - return this.components.get(name).commit_id - } - - public ArrayList getNames() { - def componentsName = [] - this.components.each{key, value -> componentsName.add(key)} - return componentsName - } - - public String getRepo(String name) { - return this.components.get(name).repository - } - - public String getLocation(String name) { - return this.components.get(name).location - } -} diff --git a/src/jenkins/InputManifest.groovy b/src/jenkins/InputManifest.groovy deleted file mode 100644 index 3e86f15a8f..0000000000 --- a/src/jenkins/InputManifest.groovy +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -package jenkins - -class InputManifest { - class Ci implements Serializable { - class Image implements Serializable { - String name - String args - - Image(Map data) { - this.name = data.name - - if (this.name == null) { - error("Missing ci.image.name") - } - - this.args = data.args - } - } - - Image image - - Ci(Map data) { - this.image = new InputManifest.Ci.Image(data.image) - } - } - - class Build implements Serializable { - String name - String version - String qualifier - String platform - String architecture - - Build(Map data) { - this.name = data.name - this.version = data.version - this.qualifier = data.qualifier - this.platform = data.platform - this.architecture = data.architecture - } - - String getFilename() { - return this.name.toLowerCase().replaceAll(' ', '-') - } - } - - Build build - Ci ci - - InputManifest(Map data) { - this.build = new InputManifest.Build(data.build) - this.ci = data.ci ? new InputManifest.Ci(data.ci) : null - } - - String getSHAsRoot(String jobName) { - return [ - jobName, - this.build.version, - 'shas' - ].join("/") - } -} diff --git a/src/jenkins/Messages.groovy b/src/jenkins/Messages.groovy deleted file mode 100644 index edf9242357..0000000000 --- a/src/jenkins/Messages.groovy +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -package jenkins - -class Messages implements Serializable { - def steps - - Messages(steps) { - this.steps = steps - } - - // Add a message to the Jenkins queue. - def add(String stage, String message) { - this.steps.writeFile(file: "messages/${stage}.msg", text: message) - this.steps.stash(includes: "messages/*" , name: "messages-${stage}") - } - - // Load all message in the jenkins queue and append them with a leading newline into a mutli-line string. - String get(ArrayList stages) { - // Stages must be explicitly added to prevent overwriting - // see https://ryan.himmelwright.net/post/jenkins-parallel-stashing/ - - for (stage in stages) { - try { - this.steps.unstash(name: "messages-${stage}") - } catch(Exception e) { - echo "No messages found for ${stage}" - } - } - - def files = this.steps.findFiles(excludes: '', glob: 'messages/*') - def data = "" - for (file in files) { - data = data + "\n" + this.steps.readFile(file: file.path) - } - - this.steps.dir('messages') { - this.steps.deleteDir() - } - - return data - } -} diff --git a/src/jenkins/TestManifest.groovy b/src/jenkins/TestManifest.groovy deleted file mode 100644 index 645cfc412f..0000000000 --- a/src/jenkins/TestManifest.groovy +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -package jenkins - -class TestManifest { - class Ci implements Serializable { - class Image implements Serializable { - String name - String args - - Image(Map data) { - this.name = data.name - this.args = data.args - } - } - - Image image - - Ci(Map data) { - this.image = new TestManifest.Ci.Image(data.image) - } - } - - String name - - Ci ci - - TestManifest(Map data) { - this.name = data.name - this.ci = data.ci ? new TestManifest.Ci(data.ci) : null - } -} diff --git a/tests/jenkins/TestArchiveAssembleUpload.groovy b/tests/jenkins/TestArchiveAssembleUpload.groovy deleted file mode 100644 index cd598d7a91..0000000000 --- a/tests/jenkins/TestArchiveAssembleUpload.groovy +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -package jenkins.tests - -import org.junit.* -import java.util.* -import java.nio.file.* - -class TestArchiveAssembleUpload extends BuildPipelineTest { - @Before - void setUp() { - super.setUp() - - binding.setVariable('PUBLIC_ARTIFACT_URL', 'https://ci.opensearch.org/dbc') - binding.setVariable('JOB_NAME', 'vars-build') - binding.setVariable('ARTIFACT_BUCKET_NAME', 'artifact-bucket') - binding.setVariable('AWS_ACCOUNT_PUBLIC', 'account') - binding.setVariable('STAGE_NAME', 'stage') - binding.setVariable('BUILD_URL', 'http://jenkins.us-east-1.elb.amazonaws.com/job/vars/42') - binding.setVariable('BUILD_NUMBER', '33') - binding.setVariable('ARTIFACT_PROMOTION_ROLE_NAME', 'role') - binding.setVariable('AWS_ACCOUNT_ARTIFACT', 'dummy') - binding.setVariable('ARTIFACT_PRODUCTION_BUCKET_NAME', 'bucket') - - helper.registerAllowedMethod("s3Upload", [Map]) - helper.registerAllowedMethod("writeJSON", [Map]) - helper.registerAllowedMethod("withAWS", [Map, Closure], { args, closure -> - closure.delegate = delegate - return helper.callClosure(closure) - }) - - helper.registerAllowedMethod("git", [Map]) - helper.registerAllowedMethod('unstash', [String.class], null) - - Path source = Path.of("tests/data/opensearch-build-1.3.0.yml"); - Path target = Path.of("tar/builds/opensearch/manifest.yml"); - Files.createDirectories(target.getParent()); - Files.copy(source, target, StandardCopyOption.REPLACE_EXISTING); - } - - @Test - public void testSHAExists() { - super.testPipeline("tests/jenkins/jobs/ArchiveAssembleUpload_Jenkinsfile") - } -} diff --git a/tests/jenkins/TestAssembleManifest.groovy b/tests/jenkins/TestAssembleManifest.groovy deleted file mode 100644 index 0dbe7ee0c1..0000000000 --- a/tests/jenkins/TestAssembleManifest.groovy +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -package jenkins.tests - -import org.junit.* - -class TestAssembleManifest extends BuildPipelineTest { - - @Test - void testAssembleManifest_rpm() { - this.registerLibTester(new AssembleManifestLibTester('tests/data/opensearch-build-1.3.0-rpm.yml')) - - this.registerLibTester(new SignArtifactsLibTester('.rpm', 'linux', "rpm/dist/opensearch", null, null)) - - this.registerLibTester(new BuildYumRepoTester( - 'tests/data/opensearch-build-1.3.0-rpm.yml', - 'https://ci.opensearch.org/dbc/vars-build/1.3.0/123/linux/x64' - )) - - super.setUp() - - super.testPipeline('tests/jenkins/jobs/AssembleManifest_rpm_Jenkinsfile') - } - - @Test - void testAssembleManifest_tar() { - this.registerLibTester(new AssembleManifestLibTester('tests/data/opensearch-build-1.3.0.yml')) - super.setUp() - - super.testPipeline('tests/jenkins/jobs/AssembleManifest_tar_Jenkinsfile') - } -} diff --git a/tests/jenkins/TestAssembleUpload.groovy b/tests/jenkins/TestAssembleUpload.groovy deleted file mode 100644 index 9c4398569e..0000000000 --- a/tests/jenkins/TestAssembleUpload.groovy +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -package jenkins.tests - -import org.junit.* -import java.util.* - -class TestAssembleUpload extends BuildPipelineTest { - @Before - void setUp() { - super.setUp() - - binding.setVariable('PUBLIC_ARTIFACT_URL', 'https://ci.opensearch.org/dbc') - binding.setVariable('JOB_NAME', 'vars-build') - binding.setVariable('ARTIFACT_BUCKET_NAME', 'artifact-bucket') - binding.setVariable('AWS_ACCOUNT_PUBLIC', 'account') - binding.setVariable('STAGE_NAME', 'stage') - binding.setVariable('BUILD_URL', 'http://jenkins.us-east-1.elb.amazonaws.com/job/vars/42') - binding.setVariable('ARTIFACT_PROMOTION_ROLE_NAME', 'role') - binding.setVariable('AWS_ACCOUNT_ARTIFACT', 'dummy') - binding.setVariable('ARTIFACT_PRODUCTION_BUCKET_NAME', 'bucket') - binding.setVariable('BUILD_NUMBER', '33') - - helper.registerAllowedMethod("s3Upload", [Map]) - helper.registerAllowedMethod("writeJSON", [Map]) - helper.registerAllowedMethod("withAWS", [Map, Closure], { args, closure -> - closure.delegate = delegate - return helper.callClosure(closure) - }) - - helper.registerAllowedMethod("git", [Map]) - } - - @Test - public void test() { - super.testPipeline("tests/jenkins/jobs/AssembleUpload_Jenkinsfile") - } -} diff --git a/tests/jenkins/TestBuildArchive.groovy b/tests/jenkins/TestBuildArchive.groovy deleted file mode 100644 index d2a73987c1..0000000000 --- a/tests/jenkins/TestBuildArchive.groovy +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -package jenkins.tests - -import org.junit.* -import java.util.* - -class TestBuildArchive extends BuildPipelineTest { - @Before - void setUp() { - super.setUp() - - binding.setVariable('JOB_NAME', 'build-archive') - binding.setVariable('STAGE_NAME', 'stage') - binding.setVariable('BUILD_NUMBER', '717') - binding.setVariable('AWS_ACCOUNT_PUBLIC', 'account') - binding.setVariable('ARTIFACT_BUCKET_NAME', 'artifact-bucket') - - helper.registerAllowedMethod("withCredentials", [List, Closure], { list, closure -> - closure.delegate = delegate - return helper.callClosure(closure) - }) - - helper.registerAllowedMethod("withAWS", [Map, Closure], { args, closure -> - closure.delegate = delegate - return helper.callClosure(closure) - }) - - helper.registerAllowedMethod("zip", [Map]) - helper.registerAllowedMethod("git", [Map]) - } - - @Test - public void testJenkinsfile() { - super.testPipeline("tests/jenkins/jobs/BuildArchive_Jenkinsfile") - } -} diff --git a/tests/jenkins/TestBuildAssembleUpload.groovy b/tests/jenkins/TestBuildAssembleUpload.groovy deleted file mode 100644 index 2dadb3ef31..0000000000 --- a/tests/jenkins/TestBuildAssembleUpload.groovy +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -package jenkins.tests - -import org.junit.* -import java.util.* -import java.nio.file.* - -class TestBuildAssembleUpload extends BuildPipelineTest { - @Before - void setUp() { - super.setUp() - - binding.setVariable('BUILD_URL', 'http://jenkins.us-east-1.elb.amazonaws.com/job/vars/42') - binding.setVariable('BUILD_NUMBER', '33') - binding.setVariable('PUBLIC_ARTIFACT_URL', 'https://ci.opensearch.org/dbc') - binding.setVariable('JOB_NAME', 'vars-build') - binding.setVariable('ARTIFACT_BUCKET_NAME', 'artifact-bucket') - binding.setVariable('AWS_ACCOUNT_PUBLIC', 'account') - binding.setVariable('STAGE_NAME', 'stage') - binding.setVariable('ARTIFACT_PROMOTION_ROLE_NAME', 'role') - binding.setVariable('AWS_ACCOUNT_ARTIFACT', 'dummy') - binding.setVariable('ARTIFACT_PRODUCTION_BUCKET_NAME', 'bucket') - - helper.registerAllowedMethod("withCredentials", [List, Closure], { list, closure -> - closure.delegate = delegate - return helper.callClosure(closure) - }) - - helper.registerAllowedMethod("s3Upload", [Map]) - helper.registerAllowedMethod("writeJSON", [Map]) - helper.registerAllowedMethod("withAWS", [Map, Closure], { args, closure -> - closure.delegate = delegate - return helper.callClosure(closure) - }) - - helper.registerAllowedMethod("git", [Map]) - } - - @Test - public void testJenkinsfile() { - helper.registerAllowedMethod("s3DoesObjectExist", [Map], { args -> - return true - }) - - Path sourceBuildManifest = Path.of("tests/data/opensearch-build-1.3.0.yml") - Path targetBuildManifest = Path.of("tar/builds/opensearch/manifest.yml") - Files.createDirectories(targetBuildManifest.getParent()) - Files.copy(sourceBuildManifest, targetBuildManifest, StandardCopyOption.REPLACE_EXISTING) - - super.testPipeline("tests/jenkins/jobs/BuildAssembleUpload_Jenkinsfile") - } -} diff --git a/tests/jenkins/TestBuildDockerImage.groovy b/tests/jenkins/TestBuildDockerImage.groovy deleted file mode 100644 index 6f490a87cb..0000000000 --- a/tests/jenkins/TestBuildDockerImage.groovy +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -package jenkins.tests - -import org.junit.* -import java.util.* - -class TestBuildDockerImage extends BuildPipelineTest { - @Override - @Before - void setUp() { - super.setUp() - - binding.setVariable('BUILD_NUMBER', '33') - - helper.registerAllowedMethod("git", [Map]) - } - - @Test - public void testSkipsBoth() { - super.testPipeline( - "tests/jenkins/jobs/BuildDockerImage_Jenkinsfile", - "tests/jenkins/jobs/BuildDockerImage_Jenkinsfile_skips_both" - ) - } - - @Test - public void testBuildsBoth() { - binding.env.ARTIFACT_URL_linux_x64 = 'opensearch.linux.x64' - binding.env.ARTIFACT_URL_linux_arm64 = 'opensearch.linux.arm64' - - super.testPipeline( - "tests/jenkins/jobs/BuildDockerImage_Jenkinsfile", - "tests/jenkins/jobs/BuildDockerImage_Jenkinsfile_builds_both" - ) - } - - @Test - public void testSkipsMissing_x64() { - binding.env.ARTIFACT_URL_linux_arm64 = 'opensearch.linux.arm64' - - super.testPipeline( - "tests/jenkins/jobs/BuildDockerImage_Jenkinsfile", - "tests/jenkins/jobs/BuildDockerImage_Jenkinsfile_skips_x64" - ) - } - - @Test - public void testSkipsMissing_arm64() { - binding.env.ARTIFACT_URL_linux_x64 = 'opensearch.linux.x64' - - super.testPipeline( - "tests/jenkins/jobs/BuildDockerImage_Jenkinsfile", - "tests/jenkins/jobs/BuildDockerImage_Jenkinsfile_skips_arm64" - ) - } - - @Test - public void testBuildsQualifierBoth() { - binding.env.ARTIFACT_URL_linux_x64 = 'opensearch.linux.x64' - binding.env.ARTIFACT_URL_linux_arm64 = 'opensearch.linux.arm64' - - super.testPipeline( - "tests/jenkins/jobs/BuildDockerImage_Qualifier_Jenkinsfile", - "tests/jenkins/jobs/BuildDockerImage_Qualifier_Jenkinsfile_builds_both" - ) - } -} diff --git a/tests/jenkins/TestBuildFailureMessage.groovy b/tests/jenkins/TestBuildFailureMessage.groovy deleted file mode 100644 index 9edee45c71..0000000000 --- a/tests/jenkins/TestBuildFailureMessage.groovy +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -package jenkins.tests -import jenkins.tests.BuildPipelineTest -import org.junit.* - -class TestBuildFailureMessage extends BuildPipelineTest { - - - @Before - void setUp() { - this.registerLibTester(new BuildFailureMessageLibTester()) - super.setUp() - def currentBuild = binding.getVariable('currentBuild') - binding.setVariable("currentBuild", currentBuild) - } - - @Test - void testBuildFailureMsg() { - super.testPipeline("tests/jenkins/jobs/BuildFailureMessage_Jenkinsfile") - } -} diff --git a/tests/jenkins/TestBuildInfoYaml.groovy b/tests/jenkins/TestBuildInfoYaml.groovy deleted file mode 100644 index ce3886aa61..0000000000 --- a/tests/jenkins/TestBuildInfoYaml.groovy +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -import jenkins.tests.BuildPipelineTest -import org.junit.Before -import org.junit.Test - - -class TestBuildInfoYaml extends BuildPipelineTest { - - @Before - void setUp() { - this.registerLibTester(new BuildInfoYamlLibTester( - '', - 'tests/jenkins/data/opensearch-2.2.0.yml', - 'tests/jenkins/data/buildInfo.yml', - 'NOT_STARTED', - 'INITIALIZE_STAGE' - ) - ) - super.setUp() - } - - @Test - void testBuildInfoYaml() { - super.testPipeline("tests/jenkins/jobs/BuildInfoYaml_Jenkinsfile") - } -} diff --git a/tests/jenkins/TestBuildManifest.groovy b/tests/jenkins/TestBuildManifest.groovy deleted file mode 100644 index 533066f57a..0000000000 --- a/tests/jenkins/TestBuildManifest.groovy +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -package jenkins.tests - -import org.junit.* - -class TestBuildManifest extends BuildPipelineTest { - @Test - void testBuildManifest() { - super.testPipeline("tests/jenkins/jobs/BuildManifest_Jenkinsfile") - } - - @Test - void testBuildManifestWithComponentWithNoArtifact() { - super.testPipeline("tests/jenkins/jobs/BuildManifest_Jenkinsfile_component_no_artifact") - } -} diff --git a/tests/jenkins/TestBuildUploadManifestSHA.groovy b/tests/jenkins/TestBuildUploadManifestSHA.groovy deleted file mode 100644 index eb520a5587..0000000000 --- a/tests/jenkins/TestBuildUploadManifestSHA.groovy +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -package jenkins.tests - -import org.junit.* -import java.util.* - -class TestBuildUploadManifestSHA extends BuildPipelineTest { - @Override - @Before - void setUp() { - super.setUp() - - binding.setVariable('JOB_NAME', 'get-manifest-sha-build') - binding.setVariable('AWS_ACCOUNT_PUBLIC', 'account') - binding.setVariable('ARTIFACT_BUCKET_NAME', 'artifact-bucket') - - helper.registerAllowedMethod("sha1", [String], { filename -> - return 'sha1' - }) - - helper.registerAllowedMethod("s3Upload", [Map]) - helper.registerAllowedMethod("withAWS", [Map, Closure], { args, closure -> - closure.delegate = delegate - return helper.callClosure(closure) - }) - - helper.registerAllowedMethod("git", [Map]) - } - - @Test - public void testDoesNotExist() { - helper.registerAllowedMethod("s3DoesObjectExist", [Map], { args -> - return false - }) - - super.testPipeline( - "tests/jenkins/jobs/BuildUploadManifestSHA_Jenkinsfile" - ) - } -} diff --git a/tests/jenkins/TestBuildYumRepo.groovy b/tests/jenkins/TestBuildYumRepo.groovy deleted file mode 100644 index 0f86ec6e05..0000000000 --- a/tests/jenkins/TestBuildYumRepo.groovy +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -package jenkins.tests - -import org.junit.* - -class TestBuildYumRepo extends BuildPipelineTest { - - @Before - void setUp() { - this.registerLibTester(new BuildYumRepoTester( - 'tests/data/opensearch-build-1.3.0.yml', - 'https://ci.opensearch.org/ci/dbc/test/1.3.0/9/linux/x64' - )) - - super.setUp() - } - - @Test - void testBuildYumRepo() { - super.testPipeline('tests/jenkins/jobs/BuildYumRepo_Jenkinsfile') - } - -} diff --git a/tests/jenkins/TestCCRPerfTest.groovy b/tests/jenkins/TestCCRPerfTest.groovy index b640479f72..1fd76bf6e8 100644 --- a/tests/jenkins/TestCCRPerfTest.groovy +++ b/tests/jenkins/TestCCRPerfTest.groovy @@ -24,15 +24,7 @@ class TestCCRPerfTest extends BuildPipelineTest { @Override @Before void setUp() { - this.registerLibTester(new RunPerfTestScriptLibTester( - 'tests/jenkins/data/opensearch-1.3.0-bundle.yml', - '1236', - '', - '', - '', - '', - true - )) + super.setUp() helper.registerSharedLibrary( @@ -44,6 +36,47 @@ class TestCCRPerfTest extends BuildPipelineTest { .retriever(gitSource('https://github.com/opensearch-project/opensearch-build-libraries.git')) .build() ) + + binding.setVariable('AGENT_LABEL', 'Jenkins-Agent-AL2-X64-C54xlarge-Docker-Host') + binding.setVariable('AGENT_IMAGE', 'opensearchstaging/ci-runner:ci-runner-centos7-v1') + binding.setVariable('ARCHITECTURE', 'x64') + binding.setVariable('ARTIFACT_BUCKET_NAME', 'test_bucket') + binding.setVariable('ARTIFACT_DOWNLOAD_ROLE_NAME', 'Dummy_Download_Role') + binding.setVariable('AWS_ACCOUNT_PUBLIC', 'dummy_account') + binding.setVariable('BUILD_ID', '1236') + binding.setVariable('env', ['BUILD_NUMBER': '307']) + binding.setVariable('BUILD_NUMBER', '307') + binding.setVariable('BUILD_URL', 'test://artifact.url') + binding.setVariable('BUNDLE_MANIFEST', 'tests/jenkins/data/opensearch-1.3.0-bundle.yml') + binding.setVariable('BUNDLE_MANIFEST_URL', 'test://artifact.url') + binding.setVariable('GITHUB_BOT_TOKEN_NAME', 'bot_token_name') + binding.setVariable('GITHUB_USER', 'test_user') + binding.setVariable('GITHUB_TOKEN', 'test_token') + binding.setVariable('HAS_SECURITY', true) + binding.setVariable('JOB_NAME', 'perf-test') + binding.setVariable('PERF_TEST_CONFIG_LOCATION', 'test_config') + binding.setVariable('PUBLIC_ARTIFACT_URL', 'test://artifact.url') + binding.setVariable('STAGE_NAME', 'test_stage') + binding.setVariable('TEST_ITERATIONS', '1') + binding.setVariable('TEST_WORKLOAD', 'nyc_taxis') + binding.setVariable('WEBHOOK_URL', 'test://artifact.url') + binding.setVariable('WARMUP_ITERATIONS', '1') + + helper.registerAllowedMethod("s3Download", [Map]) + helper.registerAllowedMethod("uploadTestResults", [Map]) + helper.registerAllowedMethod("s3Upload", [Map]) + helper.registerAllowedMethod("withAWS", [Map, Closure], { + args, + closure -> + closure.delegate = delegate + return helper.callClosure(closure) + }) + helper.registerAllowedMethod('findFiles', [Map.class], null) + helper.registerAllowedMethod("withCredentials", [Map]) + helper.registerAllowedMethod("downloadBuildManifest", [Map], { + c -> lib.jenkins.BuildManifest.new(readYaml(file: 'tests/jenkins/data/opensearch-1.3.0-bundle.yml')) + }) + helper.registerAllowedMethod('parameterizedCron', [String], null) } @Test diff --git a/tests/jenkins/TestCopyContainer.groovy b/tests/jenkins/TestCopyContainer.groovy deleted file mode 100644 index 6f6a22918e..0000000000 --- a/tests/jenkins/TestCopyContainer.groovy +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -import jenkins.tests.BuildPipelineTest -import org.junit.* -import static com.lesfurets.jenkins.unit.global.lib.LibraryConfiguration.library -import static com.lesfurets.jenkins.unit.global.lib.GitSource.gitSource - -class TestCopyContainer extends BuildPipelineTest { - - String sourceImage = 'alpine:3.15.4' - String destinationImage = 'alpine:3.15.4' - - @Override - @Before - void setUp() { - - binding.setVariable('DOCKER_USERNAME', 'dummy_docker_username') - binding.setVariable('DOCKER_PASSWORD', 'dummy_docker_password') - binding.setVariable('ARTIFACT_PROMOTION_ROLE_NAME', 'sample-agent-AssumeRole') - binding.setVariable('AWS_ACCOUNT_ARTIFACT', '1234567890') - binding.setVariable('DATA_PREPPER_STAGING_CONTAINER_REPOSITORY', 'sample_dataprepper_ecr_url') - helper.registerAllowedMethod('withAWS', [Map, Closure], null) - super.setUp() - - helper.registerSharedLibrary( - library().name('jenkins') - .defaultVersion('1.0.0') - .allowOverride(true) - .implicit(true) - .targetPath('vars') - .retriever(gitSource('https://github.com/opensearch-project/opensearch-build-libraries.git')) - .build() - ) - } - - @Test - public void testCopyContainerDockerStagingToDockerProd() { - - binding.setVariable('SOURCE_IMAGE_REGISTRY', 'opensearchstaging') - binding.setVariable('SOURCE_IMAGE', sourceImage) - binding.setVariable('DESTINATION_IMAGE_REGISTRY', 'opensearchproject') - binding.setVariable('DESTINATION_IMAGE', destinationImage) - - super.testPipeline("jenkins/docker/docker-copy.jenkinsfile", - "tests/jenkins/jenkinsjob-regression-files/docker/docker-copy-testCopyContainerDockerStagingToDockerProd.jenkinsfile") - } - - @Test - public void testCopyContainerDockerStagingToEcrProd() { - - binding.setVariable('SOURCE_IMAGE_REGISTRY', 'opensearchstaging') - binding.setVariable('SOURCE_IMAGE', sourceImage) - binding.setVariable('DESTINATION_IMAGE_REGISTRY', 'public.ecr.aws/opensearchproject') - binding.setVariable('DESTINATION_IMAGE', destinationImage) - - super.testPipeline("jenkins/docker/docker-copy.jenkinsfile", - "tests/jenkins/jenkinsjob-regression-files/docker/docker-copy-testCopyContainerDockerStagingToEcrProd.jenkinsfile") - } - - @Test - public void testCopyContainerECRStagingtoDockerProd() { - - binding.setVariable('SOURCE_IMAGE_REGISTRY', 'public.ecr.aws/opensearchstaging') - binding.setVariable('SOURCE_IMAGE', sourceImage) - binding.setVariable('DESTINATION_IMAGE_REGISTRY', 'opensearchproject') - binding.setVariable('DESTINATION_IMAGE', destinationImage) - - super.testPipeline("jenkins/docker/docker-copy.jenkinsfile", - "tests/jenkins/jenkinsjob-regression-files/docker/docker-copy-testCopyContainerECRStagingtoDockerProd.jenkinsfile") - } - - @Test - public void testCopyContainerDockerProdtoEcrProd() { - - binding.setVariable('SOURCE_IMAGE_REGISTRY', 'opensearchproject') - binding.setVariable('SOURCE_IMAGE', sourceImage) - binding.setVariable('DESTINATION_IMAGE_REGISTRY', 'public.ecr.aws/opensearchproject') - binding.setVariable('DESTINATION_IMAGE', destinationImage) - - super.testPipeline("jenkins/docker/docker-copy.jenkinsfile", - "tests/jenkins/jenkinsjob-regression-files/docker/docker-copy-testCopyContainerDockerProdtoEcrProd.jenkinsfile") - } - - @Test - public void testCopyContainerEcrStagingtoEcrProd() { - - binding.setVariable('SOURCE_IMAGE_REGISTRY', 'public.ecr.aws/opensearchstaging') - binding.setVariable('SOURCE_IMAGE', sourceImage) - binding.setVariable('DESTINATION_IMAGE_REGISTRY', 'public.ecr.aws/opensearchproject') - binding.setVariable('DESTINATION_IMAGE', destinationImage) - - super.testPipeline("jenkins/docker/docker-copy.jenkinsfile", - "tests/jenkins/jenkinsjob-regression-files/docker/docker-copy-testCopyContainerEcrStagingtoEcrProd.jenkinsfile") - } - - @Test - public void testCopyContainerDockerStagingtoEcrStaging() { - - binding.setVariable('SOURCE_IMAGE_REGISTRY', 'opensearchstaging') - binding.setVariable('SOURCE_IMAGE', sourceImage) - binding.setVariable('DESTINATION_IMAGE_REGISTRY', 'public.ecr.aws/opensearchstaging') - binding.setVariable('DESTINATION_IMAGE', destinationImage) - - super.testPipeline("jenkins/docker/docker-copy.jenkinsfile", - "tests/jenkins/jenkinsjob-regression-files/docker/docker-copy-testCopyContainerDockerStagingtoEcrStaging.jenkinsfile") - } - -} diff --git a/tests/jenkins/TestCreateGithubIssue.groovy b/tests/jenkins/TestCreateGithubIssue.groovy deleted file mode 100644 index 19901156bf..0000000000 --- a/tests/jenkins/TestCreateGithubIssue.groovy +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -package jenkins.tests - -import jenkins.tests.BuildPipelineTest -import org.junit.* - -class TestCreateGithubIssue extends BuildPipelineTest { - @Override - @Before - void setUp() { - this.registerLibTester(new CreateGithubIssueLibTester(["Error building OpenSearch, retry with: ./build.sh manifests/2.2.0/opensearch-2.2.0.yml --component OpenSearch --snapshot"])) - super.setUp() - } - - @Test - public void testCreateGithubIssue() { - helper.addShMock("gh issue list --repo https://github.com/opensearch-project/OpenSearch.git -S \"[AUTOCUT] OS Distribution Build Failed for OpenSearch-2.0.0 in:title\" --label autocut",'',0) - super.testPipeline("tests/jenkins/jobs/CreateGithubIssue_Jenkinsfile") - } - - @Test - public void testExistingGithubIssue() { - super.testPipeline("tests/jenkins/jobs/CreateGithubIssueExisting_Jenkinsfile") - } - -} diff --git a/tests/jenkins/TestCreateReleaseTag.groovy b/tests/jenkins/TestCreateReleaseTag.groovy deleted file mode 100644 index 21afb0abcd..0000000000 --- a/tests/jenkins/TestCreateReleaseTag.groovy +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - - -import jenkins.tests.BuildPipelineTest -import org.junit.Before -import org.junit.Test - -class TestCreateReleaseTag extends BuildPipelineTest { - - @Before - void setUp() { - - this.registerLibTester(new CreateReleaseTagLibTester('tests/data/opensearch-build-1.1.0.yml', '1.1.0')) - super.setUp() - - } - - @Test - void testCreateReleaseTag() { - super.testPipeline("tests/jenkins/jobs/CreateReleaseTag_Jenkinsfile") - } -} diff --git a/tests/jenkins/TestCreateTestResultsMessage.groovy b/tests/jenkins/TestCreateTestResultsMessage.groovy deleted file mode 100644 index e6f118d37e..0000000000 --- a/tests/jenkins/TestCreateTestResultsMessage.groovy +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -import jenkins.tests.BuildPipelineTest -import org.junit.Before -import org.junit.Test - - -class TestCreateTestResultsMessage extends BuildPipelineTest { - @Before - void setUp() { - this.registerLibTester( - new CreateTestResultsMessageLibTester( - 'Integ Tests (x64)', - 'SUCCESS', - 'dummy-test.com/test-results' - ) - ) - super.setUp() - } - - @Test - public void TestCreateTestResultsMessage() { - super.testPipeline("tests/jenkins/jobs/CreateTestResultsMessage_Jenkinsfile") - } -} diff --git a/tests/jenkins/TestDataPrepperReleaseArtifacts.groovy b/tests/jenkins/TestDataPrepperReleaseArtifacts.groovy index ff31168757..189f6bb7ef 100644 --- a/tests/jenkins/TestDataPrepperReleaseArtifacts.groovy +++ b/tests/jenkins/TestDataPrepperReleaseArtifacts.groovy @@ -29,7 +29,17 @@ class TestDataPrepperReleaseArtifacts extends BuildPipelineTest { String sourceImageRepository = 'http://public.ecr.aws/data-prepper-container-repository' - this.registerLibTester(new SignArtifactsLibTester( '.sig', 'linux', "${workspace}/archive", null, null)) + // this.registerLibTester(new SignArtifactsLibTester( '.sig', 'linux', "${workspace}/archive", null, null)) + binding.setVariable('GITHUB_BOT_TOKEN_NAME', 'github_bot_token_name') + helper.registerAllowedMethod('git', [Map]) + helper.registerAllowedMethod('withCredentials', [Map, Closure], { args, closure -> + closure.delegate = delegate + return helper.callClosure(closure) + }) + helper.registerAllowedMethod('withAWS', [Map, Closure], { args, closure -> + closure.delegate = delegate + return helper.callClosure(closure) + }) super.setUp() diff --git a/tests/jenkins/TestDetectDockerImage.groovy b/tests/jenkins/TestDetectDockerImage.groovy deleted file mode 100644 index 844f6b7461..0000000000 --- a/tests/jenkins/TestDetectDockerImage.groovy +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -package jenkins.tests - -import org.junit.* -import java.util.* - -class TestDetectDockerImage extends BuildPipelineTest { - @Test - public void test() { - helper.registerAllowedMethod("git", [Map]) - - super.testPipeline("tests/jenkins/jobs/DetectDockerImage_Jenkinsfile") - } -} diff --git a/tests/jenkins/TestDetectTestDockerAgent.groovy b/tests/jenkins/TestDetectTestDockerAgent.groovy deleted file mode 100644 index 83c5ea4748..0000000000 --- a/tests/jenkins/TestDetectTestDockerAgent.groovy +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -import jenkins.tests.BuildPipelineTest -import org.junit.Before -import org.junit.Test - - -class TestDetectTestDockerAgent extends BuildPipelineTest { - - @Test - public void test() { - this.registerLibTester(new DetectTestDockerAgentLibTester( - 'tests/jenkins/data/opensearch-1.3.0-test.yml' - )) - super.testPipeline("tests/jenkins/jobs/DetectTestDockerAgent_Jenkinsfile") - } -} diff --git a/tests/jenkins/TestDownloadFromS3.groovy b/tests/jenkins/TestDownloadFromS3.groovy deleted file mode 100644 index fef53af110..0000000000 --- a/tests/jenkins/TestDownloadFromS3.groovy +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -import jenkins.tests.BuildPipelineTest -import org.junit.Before -import org.junit.Test - - -class TestDownloadFromS3 extends BuildPipelineTest { - - @Before - void setUp() { - - this.registerLibTester(new DownloadFromS3LibTester('/tmp/src/path' , 'dummy_bucket', '/download/path', true)) - - super.setUp() - } - - @Test - public void testDownloadFromS3() { - super.testPipeline("tests/jenkins/jobs/DownloadFromS3_Jenkinsfile") - } -} diff --git a/tests/jenkins/TestGetManifestSHA.groovy b/tests/jenkins/TestGetManifestSHA.groovy deleted file mode 100644 index 1c9661cc7b..0000000000 --- a/tests/jenkins/TestGetManifestSHA.groovy +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -package jenkins.tests - -import org.junit.* -import java.util.* - -class TestGetManifestSHA extends BuildPipelineTest { - @Override - @Before - void setUp() { - super.setUp() - - binding.setVariable('JOB_NAME', 'get-manifest-sha-build') - binding.setVariable('AWS_ACCOUNT_PUBLIC', 'account') - binding.setVariable('ARTIFACT_BUCKET_NAME', 'artifact-bucket') - - helper.registerAllowedMethod("sha1", [String], { filename -> - return 'sha1' - }) - - helper.registerAllowedMethod("withAWS", [Map, Closure], { args, closure -> - closure.delegate = delegate - return helper.callClosure(closure) - }) - - helper.registerAllowedMethod("git", [Map]) - } - - @Test - public void testExists() { - helper.registerAllowedMethod("s3DoesObjectExist", [Map], { args -> - return true - }) - - super.testPipeline( - "tests/jenkins/jobs/GetManifestSHA_Jenkinsfile", - "tests/jenkins/jobs/GetManifestSHA_Jenkinsfile_exists" - ) - } - - @Test - public void testDoesNotExist() { - helper.registerAllowedMethod("s3DoesObjectExist", [Map], { args -> - return false - }) - - super.testPipeline( - "tests/jenkins/jobs/GetManifestSHA_Jenkinsfile", - "tests/jenkins/jobs/GetManifestSHA_Jenkinsfile_does_not_exist" - ) - } -} diff --git a/tests/jenkins/TestHello.groovy b/tests/jenkins/TestHello.groovy deleted file mode 100644 index c6e1df2945..0000000000 --- a/tests/jenkins/TestHello.groovy +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -package jenkins.tests - -import org.junit.* - -class TestHello extends BuildPipelineTest { - @Test - void testHello() { - super.testPipeline("tests/jenkins/jobs/Hello_Jenkinsfile") - } -} diff --git a/tests/jenkins/TestInputManifest.groovy b/tests/jenkins/TestInputManifest.groovy deleted file mode 100644 index 2f43edb32f..0000000000 --- a/tests/jenkins/TestInputManifest.groovy +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -package jenkins.tests - -import org.junit.* - -class TestInputManifest extends BuildPipelineTest { - @Test - void testInputManifest() { - super.testPipeline("tests/jenkins/jobs/InputManifest_Jenkinsfile") - } -} diff --git a/tests/jenkins/TestMavenSignReleaseJob.groovy b/tests/jenkins/TestMavenSignReleaseJob.groovy index 48b19136f2..cf876c0fde 100644 --- a/tests/jenkins/TestMavenSignReleaseJob.groovy +++ b/tests/jenkins/TestMavenSignReleaseJob.groovy @@ -24,9 +24,25 @@ class TestMavenSignReleaseJob extends BuildPipelineTest { def bucketName = 'job-s3-bucket-name' - this.registerLibTester(new DownloadFromS3LibTester(destPath, bucketName, artifactsPath, true)) - - this.registerLibTester(new SignArtifactsLibTester( '.sig', 'linux', manifestPath, 'maven', null)) + // this.registerLibTester(new DownloadFromS3LibTester(destPath, bucketName, artifactsPath, true)) + binding.setVariable('ARTIFACT_DOWNLOAD_ROLE_NAME', 'Dummy_Download_Role') + binding.setVariable('AWS_ACCOUNT_PUBLIC', 'dummy_account') + helper.registerAllowedMethod("s3Download", [Map]) + helper.registerAllowedMethod("withAWS", [Map, Closure], { args, closure -> + closure.delegate = delegate + return helper.callClosure(closure) + }) + // this.registerLibTester(new SignArtifactsLibTester( '.sig', 'linux', manifestPath, 'maven', null)) + binding.setVariable('GITHUB_BOT_TOKEN_NAME', 'github_bot_token_name') + helper.registerAllowedMethod('git', [Map]) + helper.registerAllowedMethod('withCredentials', [Map, Closure], { args, closure -> + closure.delegate = delegate + return helper.callClosure(closure) + }) + helper.registerAllowedMethod('withAWS', [Map, Closure], { args, closure -> + closure.delegate = delegate + return helper.callClosure(closure) + }) super.setUp() diff --git a/tests/jenkins/TestMessages.groovy b/tests/jenkins/TestMessages.groovy deleted file mode 100644 index 8db7def1de..0000000000 --- a/tests/jenkins/TestMessages.groovy +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -package jenkins.tests - -import org.junit.* -import java.util.* - -class TestMessages extends BuildPipelineTest { - @Override - @Before - void setUp() { - super.setUp() - - helper.registerAllowedMethod('findFiles', [Map.class], null) - } - - @Test - public void testMessages() { - super.testPipeline("tests/jenkins/jobs/Messages_Jenkinsfile") - } -} diff --git a/tests/jenkins/TestOpenSearchBwcTest.groovy b/tests/jenkins/TestOpenSearchBwcTest.groovy index 7b4254bb05..f22d25d9f9 100644 --- a/tests/jenkins/TestOpenSearchBwcTest.groovy +++ b/tests/jenkins/TestOpenSearchBwcTest.groovy @@ -16,6 +16,9 @@ class TestOpenSearchBwcTest extends BuildPipelineTest { @Override @Before void setUp() { + + super.setUp() + def jobName = "dummy_job" def testManifest = "tests/jenkins/data/opensearch-1.3.0-test.yml" def buildId = 717 @@ -23,19 +26,27 @@ class TestOpenSearchBwcTest extends BuildPipelineTest { def buildManifestUrl = "https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/1.3.0/${buildId}/linux/x64/dist/opensearch/opensearch-1.3.0-linux-x64.tar.gz" def agentLabel = "Jenkins-Agent-AL2-X64-C54xlarge-Docker-Host" - this.registerLibTester(new DetectTestDockerAgentLibTester()) - this.registerLibTester(new DownloadBuildManifestLibTester(buildManifestUrl, buildManifest)) - this.registerLibTester(new RunBwcTestScriptLibTester(jobName, buildManifest, "manifests/${testManifest}", "${buildId}")) - this.registerLibTester(new UploadTestResultsLibTester(buildManifest, jobName)) - this.registerLibTester(new PublishNotificationLibTester( - ':white_check_mark:', - 'BWC Tests Successful', - '', - testManifest, - 'jenkins-integ-test-webhook')) - super.setUp() + helper.registerSharedLibrary( + library().name('jenkins') + .defaultVersion('1.0.0') + .allowOverride(true) + .implicit(true) + .targetPath('vars') + .retriever(gitSource('https://github.com/opensearch-project/opensearch-build-libraries.git')) + .build() + ) - // Variables + binding.setVariable('env', ['BUILD_NUMBER': '717']) + binding.setVariable('ARTIFACT_BUCKET_NAME', 'DUMMY_BUCKET_NAME') + binding.setVariable('AWS_ACCOUNT_PUBLIC', 'DUMMY_AWS_ACCOUNT_PUBLIC') + binding.setVariable('ARTIFACT_BUCKET_NAME', 'DUMMY_ARTIFACT_BUCKET_NAME') + binding.setVariable('PUBLIC_ARTIFACT_URL', 'DUMMY_PUBLIC_ARTIFACT_URL') + binding.setVariable('env', ['BUILD_NUMBER': '717']) + binding.setVariable('STAGE_NAME', 'DUMMY_STAGE_NAME') + binding.setVariable('JOB_NAME', 'dummy_job') + binding.setVariable('BUILD_NUMBER', '717') + binding.setVariable('BUILD_URL', 'htth://BUILD_URL_dummy.com') + binding.setVariable('WEBHOOK_URL', 'htth://WEBHOOK_URL_dummy.com') binding.setVariable('TEST_MANIFEST', testManifest) binding.setVariable('BUILD_MANIFEST_URL', buildManifestUrl) binding.setVariable('AGENT_LABEL', agentLabel) @@ -43,24 +54,28 @@ class TestOpenSearchBwcTest extends BuildPipelineTest { binding.setVariable('BUILD_ID', "${buildId}") def env = binding.getVariable('env') env['DOCKER_AGENT'] = [image:'opensearchstaging/ci-runner:ci-runner-centos7-v1', args:'-e JAVA_HOME=/opt/java/openjdk-11'] - binding.getVariable('currentBuild').upstreamBuilds = [[fullProjectName: jobName]] - + + helper.registerAllowedMethod("withCredentials", [Map]) + helper.registerAllowedMethod('readYaml', [Map.class], { args -> + return new Yaml().load((this.testManifest ?: binding.getVariable('TEST_MANIFEST') as File).text) + }) + helper.registerAllowedMethod('readYaml', [Map.class], { args -> + return new Yaml().load((buildManifest as File).text) + }) + helper.registerAllowedMethod("withCredentials", [Map, Closure], { args, closure -> + closure.delegate = delegate + return helper.callClosure(closure) + }) + helper.registerAllowedMethod("withAWS", [Map, Closure], { args, closure -> + closure.delegate = delegate + return helper.callClosure(closure) + }) + helper.registerAllowedMethod("s3Upload", [Map]) helper.registerAllowedMethod('fileExists', [String.class], { args -> return true; }) - helper.registerAllowedMethod('findFiles', [Map.class], null) - - helper.registerSharedLibrary( - library().name('jenkins') - .defaultVersion('1.0.0') - .allowOverride(true) - .implicit(true) - .targetPath('vars') - .retriever(gitSource('https://github.com/opensearch-project/opensearch-build-libraries.git')) - .build() - ) } @Test diff --git a/tests/jenkins/TestOpenSearchDashboardsBwcTest.groovy b/tests/jenkins/TestOpenSearchDashboardsBwcTest.groovy index b3d34dc922..d0697c716f 100644 --- a/tests/jenkins/TestOpenSearchDashboardsBwcTest.groovy +++ b/tests/jenkins/TestOpenSearchDashboardsBwcTest.groovy @@ -16,6 +16,9 @@ class TestOpenSearchDashboardsBwcTest extends BuildPipelineTest { @Override @Before void setUp() { + + super.setUp() + def jobName = "dummy_job" def testManifest = "tests/jenkins/data/opensearch-dashboards-1.2.0-test.yml" def buildId = 215 @@ -23,19 +26,28 @@ class TestOpenSearchDashboardsBwcTest extends BuildPipelineTest { def buildManifestUrl = "https://ci.opensearch.org/ci/dbc/distribution-build-opensearch-dashboards/1.2.0/${buildId}/linux/x64/dist/opensearch-dashboards/opensearch-dashboards-1.2.0-linux-x64.tar.gz" def agentLabel = "Jenkins-Agent-AL2-X64-C54xlarge-Docker-Host" - this.registerLibTester(new DetectTestDockerAgentLibTester()) - this.registerLibTester(new DownloadBuildManifestLibTester(buildManifestUrl, buildManifest)) - this.registerLibTester(new RunBwcTestScriptLibTester(jobName, buildManifest, "manifests/${testManifest}", "${buildId}")) - this.registerLibTester(new UploadTestResultsLibTester(buildManifest, jobName)) - this.registerLibTester(new PublishNotificationLibTester( - ':white_check_mark:', - 'BWC Tests Successful', - '', - testManifest, - 'jenkins-integ-test-webhook')) - super.setUp() + helper.registerSharedLibrary( + library().name('jenkins') + .defaultVersion('1.0.0') + .allowOverride(true) + .implicit(true) + .targetPath('vars') + .retriever(gitSource('https://github.com/opensearch-project/opensearch-build-libraries.git')) + .build() + ) + - // Variables + binding.setVariable('env', ['BUILD_NUMBER': '215']) + binding.setVariable('ARTIFACT_BUCKET_NAME', 'DUMMY_BUCKET_NAME') + binding.setVariable('AWS_ACCOUNT_PUBLIC', 'DUMMY_AWS_ACCOUNT_PUBLIC') + binding.setVariable('ARTIFACT_BUCKET_NAME', 'DUMMY_ARTIFACT_BUCKET_NAME') + binding.setVariable('PUBLIC_ARTIFACT_URL', 'DUMMY_PUBLIC_ARTIFACT_URL') + binding.setVariable('env', ['BUILD_NUMBER': '215']) + binding.setVariable('STAGE_NAME', 'DUMMY_STAGE_NAME') + binding.setVariable('JOB_NAME', 'dummy_job') + binding.setVariable('BUILD_NUMBER', '215') + binding.setVariable('BUILD_URL', 'htth://BUILD_URL_dummy.com') + binding.setVariable('WEBHOOK_URL', 'htth://WEBHOOK_URL_dummy.com') binding.setVariable('TEST_MANIFEST', testManifest) binding.setVariable('BUILD_MANIFEST_URL', buildManifestUrl) binding.setVariable('AGENT_LABEL', agentLabel) @@ -43,24 +55,29 @@ class TestOpenSearchDashboardsBwcTest extends BuildPipelineTest { binding.setVariable('BUILD_ID', "${buildId}") def env = binding.getVariable('env') env['DOCKER_AGENT'] = [image:'opensearchstaging/ci-runner:ci-runner-centos7-v1', args:'-e JAVA_HOME=/opt/java/openjdk-11'] - binding.getVariable('currentBuild').upstreamBuilds = [[fullProjectName: jobName]] + helper.registerAllowedMethod("withCredentials", [Map]) + + helper.registerAllowedMethod('readYaml', [Map.class], { args -> + return new Yaml().load((this.testManifest ?: binding.getVariable('TEST_MANIFEST') as File).text) + }) + helper.registerAllowedMethod('readYaml', [Map.class], { args -> + return new Yaml().load((buildManifest as File).text) + }) + helper.registerAllowedMethod("withCredentials", [Map, Closure], { args, closure -> + closure.delegate = delegate + return helper.callClosure(closure) + }) + helper.registerAllowedMethod("withAWS", [Map, Closure], { args, closure -> + closure.delegate = delegate + return helper.callClosure(closure) + }) + helper.registerAllowedMethod("s3Upload", [Map]) helper.registerAllowedMethod('fileExists', [String.class], { args -> return true; }) - helper.registerAllowedMethod('findFiles', [Map.class], null) - - helper.registerSharedLibrary( - library().name('jenkins') - .defaultVersion('1.0.0') - .allowOverride(true) - .implicit(true) - .targetPath('vars') - .retriever(gitSource('https://github.com/opensearch-project/opensearch-build-libraries.git')) - .build() - ) } @Test diff --git a/tests/jenkins/TestOpenSearchDashboardsIntegTest.groovy b/tests/jenkins/TestOpenSearchDashboardsIntegTest.groovy index 76d6984eb5..bd1b73933a 100644 --- a/tests/jenkins/TestOpenSearchDashboardsIntegTest.groovy +++ b/tests/jenkins/TestOpenSearchDashboardsIntegTest.groovy @@ -16,6 +16,9 @@ class TestOpenSearchDashboardsIntegTest extends BuildPipelineTest { @Override @Before void setUp() { + + super.setUp() + def jobName = "dummy_job" def testManifest = "tests/jenkins/data/opensearch-dashboards-1.2.0-test.yml" def buildId = 215 @@ -23,19 +26,27 @@ class TestOpenSearchDashboardsIntegTest extends BuildPipelineTest { def buildManifestUrl = "https://ci.opensearch.org/ci/dbc/distribution-build-opensearch-dashboards/1.2.0/${buildId}/linux/x64/tar/dist/opensearch-dashboards/opensearch-dashboards-1.2.0-linux-x64.tar.gz" def agentLabel = "Jenkins-Agent-AL2-X64-C54xlarge-Docker-Host" - this.registerLibTester(new DetectTestDockerAgentLibTester()) - this.registerLibTester(new DownloadBuildManifestLibTester(buildManifestUrl, buildManifest)) - this.registerLibTester(new RunIntegTestScriptLibTester(jobName, 'functionalTestDashboards', buildManifest, "manifests/${testManifest}", '')) - this.registerLibTester(new UploadTestResultsLibTester(buildManifest, jobName)) - this.registerLibTester(new PublishNotificationLibTester( - ':white_check_mark:', - 'Integration Tests Successful', - '', - testManifest, - 'jenkins-integ-test-webhook')) - super.setUp() + helper.registerSharedLibrary( + library().name('jenkins') + .defaultVersion('1.0.0') + .allowOverride(true) + .implicit(true) + .targetPath('vars') + .retriever(gitSource('https://github.com/opensearch-project/opensearch-build-libraries.git')) + .build() + ) - // Variables + binding.setVariable('env', ['BUILD_NUMBER': '215']) + binding.setVariable('ARTIFACT_BUCKET_NAME', 'DUMMY_BUCKET_NAME') + binding.setVariable('AWS_ACCOUNT_PUBLIC', 'DUMMY_AWS_ACCOUNT_PUBLIC') + binding.setVariable('ARTIFACT_BUCKET_NAME', 'DUMMY_ARTIFACT_BUCKET_NAME') + binding.setVariable('PUBLIC_ARTIFACT_URL', 'DUMMY_PUBLIC_ARTIFACT_URL') + binding.setVariable('env', ['BUILD_NUMBER': '215']) + binding.setVariable('STAGE_NAME', 'DUMMY_STAGE_NAME') + binding.setVariable('JOB_NAME', 'dummy_job') + binding.setVariable('BUILD_NUMBER', '215') + binding.setVariable('BUILD_URL', 'htth://BUILD_URL_dummy.com') + binding.setVariable('WEBHOOK_URL', 'htth://WEBHOOK_URL_dummy.com') binding.setVariable('TEST_MANIFEST', testManifest) binding.setVariable('BUILD_MANIFEST_URL', buildManifestUrl) binding.setVariable('AGENT_LABEL', agentLabel) @@ -43,25 +54,31 @@ class TestOpenSearchDashboardsIntegTest extends BuildPipelineTest { binding.setVariable('BUILD_ID', "${buildId}") def env = binding.getVariable('env') env['DOCKER_AGENT'] = [image:'opensearchstaging/ci-runner:ci-runner-centos7-v1', args:'-e JAVA_HOME=/opt/java/openjdk-11'] - binding.getVariable('currentBuild').upstreamBuilds = [[fullProjectName: jobName]] - + + helper.registerAllowedMethod("withCredentials", [Map]) + + helper.registerAllowedMethod('readYaml', [Map.class], { args -> + return new Yaml().load((this.testManifest ?: binding.getVariable('TEST_MANIFEST') as File).text) + }) + helper.registerAllowedMethod('readYaml', [Map.class], { args -> + return new Yaml().load((buildManifest as File).text) + }) + helper.registerAllowedMethod("withCredentials", [Map, Closure], { args, closure -> + closure.delegate = delegate + return helper.callClosure(closure) + }) + helper.registerAllowedMethod("withAWS", [Map, Closure], { args, closure -> + closure.delegate = delegate + return helper.callClosure(closure) + }) + helper.registerAllowedMethod("s3Upload", [Map]) helper.registerAllowedMethod('fileExists', [String.class], { args -> return true; }) helper.registerAllowedMethod('findFiles', [Map.class], null) helper.registerAllowedMethod('unstash', [String.class], null) - - helper.registerSharedLibrary( - library().name('jenkins') - .defaultVersion('1.0.0') - .allowOverride(true) - .implicit(true) - .targetPath('vars') - .retriever(gitSource('https://github.com/opensearch-project/opensearch-build-libraries.git')) - .build() - ) } @Test diff --git a/tests/jenkins/TestOpenSearchIntegTest.groovy b/tests/jenkins/TestOpenSearchIntegTest.groovy index e3e01813a3..94d8c4074e 100644 --- a/tests/jenkins/TestOpenSearchIntegTest.groovy +++ b/tests/jenkins/TestOpenSearchIntegTest.groovy @@ -16,31 +16,42 @@ class TestOpenSearchIntegTest extends BuildPipelineTest { @Override @Before void setUp() { + + super.setUp() + def jobName = "dummy_job" def testManifest = "tests/jenkins/data/opensearch-1.3.0-test.yml" def buildId = 717 def buildManifest = "tests/jenkins/data/opensearch-1.3.0-build.yml" def buildManifestUrl = "https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/1.3.0/${buildId}/linux/x64/dist/opensearch/opensearch-1.3.0-linux-x64.tar.gz" def agentLabel = "Jenkins-Agent-AL2-X64-C54xlarge-Docker-Host" - def destPath = "${this.workspace}/artifacts" def artifactsPath = "${jobName}/1.3.0/${buildId}/linux/x64/tar/" def bucketName = 'job-s3-bucket-name' - this.registerLibTester(new DetectTestDockerAgentLibTester()) - this.registerLibTester(new DownloadFromS3LibTester(destPath, bucketName, artifactsPath, true)) - this.registerLibTester(new DownloadBuildManifestLibTester(buildManifestUrl, buildManifest)) - this.registerLibTester(new RunIntegTestScriptLibTester(jobName, 'OpenSearch', buildManifest, "manifests/${testManifest}", '')) - this.registerLibTester(new UploadTestResultsLibTester(buildManifest, jobName)) - this.registerLibTester(new PublishNotificationLibTester( - ':white_check_mark:', - 'Integration Tests Successful', - '', - testManifest, - 'jenkins-integ-test-webhook')) - super.setUp() + helper.registerSharedLibrary( + library().name('jenkins') + .defaultVersion('1.0.0') + .allowOverride(true) + .implicit(true) + .targetPath('vars') + .retriever(gitSource('https://github.com/opensearch-project/opensearch-build-libraries.git')) + .build() + ) - // Variables + binding.setVariable('ARTIFACT_DOWNLOAD_ROLE_NAME', 'Dummy_Download_Role') + binding.setVariable('AWS_ACCOUNT_PUBLIC', 'dummy_account') + binding.setVariable('env', ['BUILD_NUMBER': "${buildId}"]) + binding.setVariable('ARTIFACT_BUCKET_NAME', 'DUMMY_BUCKET_NAME') + binding.setVariable('AWS_ACCOUNT_PUBLIC', 'DUMMY_AWS_ACCOUNT_PUBLIC') + binding.setVariable('ARTIFACT_BUCKET_NAME', 'DUMMY_ARTIFACT_BUCKET_NAME') + binding.setVariable('PUBLIC_ARTIFACT_URL', 'DUMMY_PUBLIC_ARTIFACT_URL') + binding.setVariable('env', ['BUILD_NUMBER': "${buildId}"]) + binding.setVariable('STAGE_NAME', 'DUMMY_STAGE_NAME') + binding.setVariable('JOB_NAME', 'dummy_job') + binding.setVariable('BUILD_NUMBER', "${buildId}") + binding.setVariable('BUILD_URL', 'htth://BUILD_URL_dummy.com') + binding.setVariable('WEBHOOK_URL', 'htth://WEBHOOK_URL_dummy.com') binding.setVariable('TEST_MANIFEST', testManifest) binding.setVariable('BUILD_MANIFEST_URL', buildManifestUrl) binding.setVariable('AGENT_LABEL', agentLabel) @@ -49,9 +60,29 @@ class TestOpenSearchIntegTest extends BuildPipelineTest { binding.setVariable('ARTIFACT_BUCKET_NAME', bucketName) def env = binding.getVariable('env') env['DOCKER_AGENT'] = [image:'opensearchstaging/ci-runner:ci-runner-centos7-v1', args:'-e JAVA_HOME=/opt/java/openjdk-11'] - binding.getVariable('currentBuild').upstreamBuilds = [[fullProjectName: jobName]] + helper.registerAllowedMethod("s3Download", [Map]) + helper.registerAllowedMethod("withAWS", [Map, Closure], { args, closure -> + closure.delegate = delegate + return helper.callClosure(closure) + }) + helper.registerAllowedMethod("withCredentials", [Map]) + helper.registerAllowedMethod('readYaml', [Map.class], { args -> + return new Yaml().load((this.testManifest ?: binding.getVariable('TEST_MANIFEST') as File).text) + }) + helper.registerAllowedMethod('readYaml', [Map.class], { args -> + return new Yaml().load((buildManifest as File).text) + }) + helper.registerAllowedMethod("withCredentials", [Map, Closure], { args, closure -> + closure.delegate = delegate + return helper.callClosure(closure) + }) + helper.registerAllowedMethod("withAWS", [Map, Closure], { args, closure -> + closure.delegate = delegate + return helper.callClosure(closure) + }) + helper.registerAllowedMethod("s3Upload", [Map]) helper.registerAllowedMethod('fileExists', [String.class], { args -> return true; }) @@ -61,16 +92,6 @@ class TestOpenSearchIntegTest extends BuildPipelineTest { helper.registerAllowedMethod('fileExists', [String.class], { args -> return true; }) - - helper.registerSharedLibrary( - library().name('jenkins') - .defaultVersion('1.0.0') - .allowOverride(true) - .implicit(true) - .targetPath('vars') - .retriever(gitSource('https://github.com/opensearch-project/opensearch-build-libraries.git')) - .build() - ) } @Test diff --git a/tests/jenkins/TestParallelMessages.groovy b/tests/jenkins/TestParallelMessages.groovy deleted file mode 100644 index 4a824aa7a1..0000000000 --- a/tests/jenkins/TestParallelMessages.groovy +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -package jenkins.tests - -import org.junit.* -import java.util.* - -class TestParallelMessages extends BuildPipelineTest { - @Override - @Before - void setUp() { - super.setUp() - - helper.registerAllowedMethod('findFiles', [Map.class], null) - } - - @Test - @Ignore // raises MissingMethodException on docker agent declaration, need to upgrade jenkins-pipeline-unit which has new problems - void testParallelMessages() { - super.testPipeline("tests/jenkins/jobs/ParallelMessages_Jenkinsfile") - } -} diff --git a/tests/jenkins/TestPostCleanup.groovy b/tests/jenkins/TestPostCleanup.groovy deleted file mode 100644 index 9c07a478d8..0000000000 --- a/tests/jenkins/TestPostCleanup.groovy +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -package jenkins.tests - -import org.junit.* -import java.util.* - -class TestPostCleanup extends BuildPipelineTest { - @Override - @Before - void setUp() { - super.setUp() - - helper.registerAllowedMethod("cleanWs", [Map]) - } - - @Test - public void test() { - super.testPipeline("tests/jenkins/jobs/PostCleanup_Jenkinsfile") - } -} diff --git a/tests/jenkins/TestPrintArtifactDownloadUrlsForStaging.groovy b/tests/jenkins/TestPrintArtifactDownloadUrlsForStaging.groovy deleted file mode 100644 index 0276e44a61..0000000000 --- a/tests/jenkins/TestPrintArtifactDownloadUrlsForStaging.groovy +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -import jenkins.tests.BuildPipelineTest -import org.junit.* - -import static org.hamcrest.MatcherAssert.assertThat -import static org.hamcrest.core.IsNull.notNullValue - - -class TestPrintArtifactDownloadUrlsForStaging extends BuildPipelineTest { - - @Before - void setUp() { - - this.registerLibTester(new PrintArtifactDownloadUrlsForStagingLibTester( - ['dummy_file.tar.gz', 'dummy_file.tar.gz.sig', 'a_dummy_file.tar.gz'], - 'dummy/upload/path' - )) - - super.setUp() - } - - @Test - void testPrintArtifactDownloadUrlsForStaging() { - super.testPipeline("tests/jenkins/jobs/PrintArtifactDownloadUrlsForStaging_Jenkinsfile") - } -} diff --git a/tests/jenkins/TestPromoteArtifacts.groovy b/tests/jenkins/TestPromoteArtifacts.groovy deleted file mode 100644 index 5e17c44cde..0000000000 --- a/tests/jenkins/TestPromoteArtifacts.groovy +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -package jenkins.tests - -import org.junit.* -import java.util.* -import java.nio.file.* - -class TestPromoteArtifacts extends BuildPipelineTest { - private Path targetOpenSearchTar; - private Path targetOpenSearchDashboardsTar; - private Path targetOpenSearchTarQualifier; - private Path targetOpenSearchDashboardsTarQualifier; - private Path targetOpenSearchRpm; - private Path targetOpenSearchDashboardsRpm; - private Path targetOpenSearchRpmQualifier; - private Path targetOpenSearchDashboardsRpmQualifier; - - @Override - @Before - void setUp() { - super.setUp() - - binding.setVariable('PUBLIC_ARTIFACT_URL', 'https://ci.opensearch.org/dbc') - binding.setVariable('DISTRIBUTION_JOB_NAME', 'vars-build') - binding.setVariable('STAGE_NAME', 'stage') - binding.setVariable('BUILD_URL', 'http://jenkins.us-east-1.elb.amazonaws.com/job/vars/42') - binding.setVariable('DISTRIBUTION_BUILD_NUMBER', '33') - binding.setVariable('DISTRIBUTION_PLATFORM', 'linux') - binding.setVariable('DISTRIBUTION_ARCHITECTURE', 'x64') - binding.setVariable('WORKSPACE', 'tests/jenkins') - binding.setVariable('GITHUB_BOT_TOKEN_NAME', 'github_bot_token_name') - def configs = ["role": "dummy_role", - "external_id": "dummy_ID", - "unsigned_bucket": "dummy_unsigned_bucket", - "signed_bucket": "dummy_signed_bucket"] - binding.setVariable('configs', configs) - helper.registerAllowedMethod("readJSON", [Map.class], {c -> configs}) - - helper.registerAllowedMethod("git", [Map]) - helper.registerAllowedMethod("s3Download", [Map]) - helper.registerAllowedMethod("s3Upload", [Map]) - helper.registerAllowedMethod("withCredentials", [Map, Closure], { args, closure -> - closure.delegate = delegate - return helper.callClosure(closure) - }) - helper.registerAllowedMethod("withAWS", [Map, Closure], { args, closure -> - closure.delegate = delegate - return helper.callClosure(closure) - }) - helper.registerAllowedMethod('getPath', { args -> - return "tests/jenkins/file/found.zip" - }) - helper.registerAllowedMethod('findFiles', [Map], { args -> - return [{}] - }) - helper.addFileExistsMock('tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins', true) - - helper.addShMock('find tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins -type f') { script -> - return [stdout: "tar_dummy_artifact_1.3.0.tar.gz zip_dummy_artifact_1.3.0.zip dummy_artifact_1.3.0.dummy", exitValue: 0] - } - helper.addShMock('sha512sum tar_dummy_artifact_1.3.0.tar.gz') { script -> - return [stdout: "shaHashDummy_tar_dummy_artifact_1.3.0.tar.gz tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins/tar_dummy_artifact_1.3.0.tar.gz", exitValue: 0] - } - helper.addShMock('sha512sum zip_dummy_artifact_1.3.0.zip') { script -> - return [stdout: "shaHashDummy_zip_dummy_artifact_1.3.0.zip tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins/zip_dummy_artifact_1.3.0.zip", exitValue: 0] - } - helper.addShMock('basename tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins/tar_dummy_artifact_1.3.0.tar.gz') { script -> - return [stdout: "tar_dummy_artifact_1.3.0.tar.gz", exitValue: 0] - } - helper.addShMock('basename tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins/zip_dummy_artifact_1.3.0.zip') { script -> - return [stdout: "zip_dummy_artifact_1.3.0.zip", exitValue: 0] - } - - targetOpenSearchTar = copy( - "tests/data/opensearch-build-1.3.0.yml", - "tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/manifest.yml" - ); - - targetOpenSearchDashboardsTar = copy( - "tests/data/opensearch-dashboards-build-1.3.0.yml", - "tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch-dashboards/manifest.yml" - ); - - targetOpenSearchTarQualifier = copy( - "tests/data/opensearch-build-2.0.0-rc1.yml", - "tests/jenkins/artifacts/tar/vars-build/2.0.0-rc1/33/linux/x64/tar/builds/opensearch/manifest.yml" - ); - - targetOpenSearchDashboardsTarQualifier = copy( - "tests/data/opensearch-dashboards-build-2.0.0-rc1.yml", - "tests/jenkins/artifacts/tar/vars-build/2.0.0-rc1/33/linux/x64/tar/builds/opensearch-dashboards/manifest.yml" - ); - - targetOpenSearchRpm = copy( - "tests/data/opensearch-build-1.3.0-rpm.yml", - "tests/jenkins/artifacts/rpm/vars-build/1.3.0/33/linux/x64/rpm/builds/opensearch/manifest.yml" - ); - - targetOpenSearchDashboardsRpm = copy( - "tests/data/opensearch-dashboards-build-1.3.0-rpm.yml", - "tests/jenkins/artifacts/rpm/vars-build/1.3.0/33/linux/x64/rpm/builds/opensearch-dashboards/manifest.yml" - ); - - targetOpenSearchRpmQualifier = copy( - "tests/data/opensearch-build-2.0.0-rc1-rpm.yml", - "tests/jenkins/artifacts/rpm/vars-build/2.0.0-rc1/33/linux/x64/rpm/builds/opensearch/manifest.yml" - ); - - targetOpenSearchDashboardsRpmQualifier = copy( - "tests/data/opensearch-dashboards-build-2.0.0-rc1-rpm.yml", - "tests/jenkins/artifacts/rpm/vars-build/2.0.0-rc1/33/linux/x64/rpm/builds/opensearch-dashboards/manifest.yml" - ); - } - - private Path copy(String sourcePath, String targetPath){ - Path source = Path.of(sourcePath); - Path target = Path.of(targetPath); - Files.createDirectories(target.getParent()); - Files.copy(source, target, StandardCopyOption.REPLACE_EXISTING); - - return target; - } - - @After - void after() { - super.setUp() - // Test file needs to be cleaned up - Files.delete(targetOpenSearchTar) - Files.delete(targetOpenSearchDashboardsTar) - Files.delete(targetOpenSearchTarQualifier) - Files.delete(targetOpenSearchDashboardsTarQualifier) - Files.delete(targetOpenSearchRpm) - Files.delete(targetOpenSearchDashboardsRpm) - Files.delete(targetOpenSearchRpmQualifier) - Files.delete(targetOpenSearchDashboardsRpmQualifier) - } - - @Test - public void testDefault() { - super.testPipeline("tests/jenkins/jobs/PromoteArtifacts_Jenkinsfile") - } - - @Test - public void testDefault_OpenSearch_Dashboards() { - super.testPipeline("tests/jenkins/jobs/PromoteArtifacts_OpenSearch_Dashboards_Jenkinsfile") - } - - @Test - public void testDefaultQualifier() { - super.testPipeline("tests/jenkins/jobs/PromoteArtifactsQualifier_Jenkinsfile") - } - - @Test - public void testDefaultQualifier_OpenSearch_Dashboards() { - super.testPipeline("tests/jenkins/jobs/PromoteArtifactsQualifier_OpenSearch_Dashboards_Jenkinsfile") - } - - @Test - public void testWithActions() { - super.testPipeline("tests/jenkins/jobs/PromoteArtifacts_actions_Jenkinsfile") - } - - @Test - public void testWithActions_OpenSearch_Dashboards() { - super.testPipeline("tests/jenkins/jobs/PromoteArtifacts_actions_OpenSearch_Dashboards_Jenkinsfile") - } - - @Test - public void testWithActionsQualifier() { - super.testPipeline("tests/jenkins/jobs/PromoteArtifactsQualifier_actions_Jenkinsfile") - } - - @Test - public void testWithActionsQualifier_OpenSearch_Dashboards() { - super.testPipeline("tests/jenkins/jobs/PromoteArtifactsQualifier_actions_OpenSearch_Dashboards_Jenkinsfile") - } -} diff --git a/tests/jenkins/TestPromoteYumRepos.groovy b/tests/jenkins/TestPromoteYumRepos.groovy deleted file mode 100644 index 743c534db2..0000000000 --- a/tests/jenkins/TestPromoteYumRepos.groovy +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -package jenkins.tests - -import org.junit.* -import java.util.* -import java.nio.file.* - -class TestPromoteYumRepos extends BuildPipelineTest { - - @Override - @Before - void setUp() { - super.setUp() - - binding.setVariable('PUBLIC_ARTIFACT_URL', 'https://ci.opensearch.org/dbc') - binding.setVariable('GITHUB_BOT_TOKEN_NAME', 'github_bot_token_name') - def configs = ["role": "dummy_role", - "external_id": "dummy_ID", - "unsigned_bucket": "dummy_unsigned_bucket", - "signed_bucket": "dummy_signed_bucket"] - binding.setVariable('configs', configs) - helper.registerAllowedMethod("readJSON", [Map.class], {c -> configs}) - helper.registerAllowedMethod("git", [Map]) - helper.registerAllowedMethod("withCredentials", [Map, Closure], { args, closure -> - closure.delegate = delegate - return helper.callClosure(closure) - }) - helper.registerAllowedMethod("withAWS", [Map, Closure], { args, closure -> - closure.delegate = delegate - return helper.callClosure(closure) - }) - - } - - @Test - public void testDefault() { - super.testPipeline("tests/jenkins/jobs/PromoteYumRepos_Jenkinsfile") - } -} diff --git a/tests/jenkins/TestPublishNotification.groovy b/tests/jenkins/TestPublishNotification.groovy deleted file mode 100644 index acebeb27e9..0000000000 --- a/tests/jenkins/TestPublishNotification.groovy +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -package jenkins.tests - -import jenkins.tests.BuildPipelineTest -import org.junit.* - -class TestPublishNotification extends BuildPipelineTest { - @Override - @Before - void setUp() { - - this.registerLibTester(new PublishNotificationLibTester( - ':white_check_mark:', 'Successful Build' , 'extra', '1.2.0/opensearch-1.2.0.yml', 'jenkins-build-notice-webhook')) - - super.setUp() - } - - @Test - public void test() { - super.testPipeline("tests/jenkins/jobs/PublishNotification_Jenkinsfile") - } -} diff --git a/tests/jenkins/TestReleaseTagDashboardsJob.groovy b/tests/jenkins/TestReleaseTagDashboardsJob.groovy deleted file mode 100644 index 3f895e9d3c..0000000000 --- a/tests/jenkins/TestReleaseTagDashboardsJob.groovy +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - */ - - -import jenkins.tests.BuildPipelineTest -import org.junit.Before -import org.junit.Test -import static com.lesfurets.jenkins.unit.global.lib.LibraryConfiguration.library -import static com.lesfurets.jenkins.unit.global.lib.GitSource.gitSource - -class TestReleaseTagDashboardsJob extends BuildPipelineTest { - - @Override - @Before - void setUp() { - - def distManifest = 'tests/jenkins/data/opensearch-dashboards-bundle-2.0.0-rc1.yml' - - this.registerLibTester(new CreateReleaseTagLibTester(distManifest, '2.0.0-rc1')) - - super.setUp() - - // Variables for Release Tag Job - binding.setVariable('VERSION', '2.0.0-rc1') - binding.setVariable('PRODUCT', 'opensearch-dashboards') - binding.setVariable('DISTRIBUTION_MANIFEST', distManifest) - - helper.registerSharedLibrary( - library().name('jenkins') - .defaultVersion('1.0.0') - .allowOverride(true) - .implicit(true) - .targetPath('vars') - .retriever(gitSource('https://github.com/opensearch-project/opensearch-build-libraries.git')) - .build() - ) - - } - - @Test - void ReleaseTagDashboards_test() { - super.testPipeline('jenkins/release-tag/release-tag.jenkinsfile', - 'tests/jenkins/jenkinsjob-regression-files/release-tag/release-tag-dashboards.jenkinsfile') - } -} diff --git a/tests/jenkins/TestReleaseTagJob.groovy b/tests/jenkins/TestReleaseTagJob.groovy deleted file mode 100644 index bf85db170e..0000000000 --- a/tests/jenkins/TestReleaseTagJob.groovy +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - */ - - -import jenkins.tests.BuildPipelineTest -import org.junit.Before -import org.junit.Test -import static com.lesfurets.jenkins.unit.global.lib.LibraryConfiguration.library -import static com.lesfurets.jenkins.unit.global.lib.GitSource.gitSource - -class TestReleaseTagJob extends BuildPipelineTest { - - @Override - @Before - void setUp() { - - def distManifest = 'tests/data/opensearch-build-1.1.0.yml' - - this.registerLibTester(new CreateReleaseTagLibTester(distManifest, '1.1.0')) - - super.setUp() - - // Variables for Release Tag Job - binding.setVariable('VERSION', '1.1.0') - binding.setVariable('PRODUCT', 'opensearch') - binding.setVariable('DISTRIBUTION_MANIFEST', distManifest) - - helper.registerSharedLibrary( - library().name('jenkins') - .defaultVersion('1.0.0') - .allowOverride(true) - .implicit(true) - .targetPath('vars') - .retriever(gitSource('https://github.com/opensearch-project/opensearch-build-libraries.git')) - .build() - ) - } - - @Test - void ReleaseTag_test() { - super.testPipeline('jenkins/release-tag/release-tag.jenkinsfile', - 'tests/jenkins/jenkinsjob-regression-files/release-tag/release-tag.jenkinsfile') - } -} diff --git a/tests/jenkins/TestRpmDashboardsDistValidation.groovy b/tests/jenkins/TestRpmDashboardsDistValidation.groovy deleted file mode 100644 index 4eac1d3a51..0000000000 --- a/tests/jenkins/TestRpmDashboardsDistValidation.groovy +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - - -import jenkins.tests.BuildPipelineTest -import org.junit.Before -import org.junit.Test - -class TestRpmDashboardsDistValidation extends BuildPipelineTest { - - @Before - void setUp() { - - def bundleManifest = "tests/jenkins/data/opensearch-dashboards-1.3.0-x64-rpm.yml" - def rpmDistribution = "$workspace/opensearch-dashboards-1.3.0-linux-x64.rpm" - this.registerLibTester(new RpmDashboardsDistValidationLibTester(rpmDistribution, bundleManifest)) - super.setUp() - def out = "Name : opensearch-dashboards\n" + - "Version : 1.3.0\n" + - "Release : 1\n" + - "Architecture: x86_64\n" + - "Install Date: (not installed)\n" + - "Group : Application/Internet\n" + - "Size : 698202962\n" + - "License : Apache-2.0\n" + - "Signature : (none)\n" + - "Source RPM : opensearch-dashboards-1.3.0-1.src.rpm\n" + - "Build Date : Wed 30 Mar 2022 01:09:33 AM UTC\n" + - "Build Host : dummy_desktop\n" + - "Relocations : (not relocatable)\n" + - "URL : https://opensearch.org/\n" + - "Summary : Open source visualization dashboards for OpenSearch\n" + - "Description :\n" + - "OpenSearch Dashboards is the visualization tool for data in OpenSearch\n" + - "For more information, see: https://opensearch.org/" - helper.addShMock("rpm -qip $workspace/opensearch-dashboards-1.3.0-linux-x64.rpm") { script -> - return [stdout: out, exitValue: 0] - } - def sigOut = "/tmp/workspace/opensearch-dashboards-1.3.0-linux-x64.rpm:\n" + "Header V4 RSA/SHA512 Signature, key ID 9310d3fc: OK\n" + - "Header SHA256 digest: OK\n" + "Header SHA1 digest: OK\n" + "Payload SHA256 digest: OK\n" + - "V4 RSA/SHA512 Signature, key ID 9310d3fc: OK\n" + "MD5 digest: OK" - helper.addShMock("rpm -K -v $rpmDistribution") { script -> - return [stdout: sigOut, exitValue: 0] - } - def status_message = "opensearch-dashboards.service - \"OpenSearch Dashboards\"\n" + - " Loaded: loaded (/usr/lib/systemd/system/opensearch-dashboards.service; disabled; vendor preset: disabled)\n" + - " Active: active (running) since Mon 2022-04-04 21:38:58 UTC; 3 days ago\n" + - " Main PID: 30297 (node)\n" + - " CGroup: /system.slice/opensearch-dashboards.service\n" + - " └─30297 /usr/share/opensearch-dashboards/bin/../node/bin/node /usr/share/opensearch-dashboards/bin/../src/cli/dist\n" + - "\n" + - "Apr 04 21:41:10 dummy_desktop opensearch-dashboards[30297]: {\"type\":\"log\",\"@timestamp\":\"2022-04-04T21:41:10Z\",\"tags\"...00\"}\n" + - "Apr 04 21:41:12 dummy_desktop opensearch-dashboards[30297]: {\"type\":\"log\",\"@timestamp\":\"2022-04-04T21:41:12Z\",\"tags\"...00\"}\n" + - "Apr 04 21:41:15 dummy_desktop opensearch-dashboards[30297]: {\"type\":\"log\",\"@timestamp\":\"2022-04-04T21:41:15Z\",\"tags\"...00\"}\n" + - "Apr 04 21:41:17 dummy_desktop opensearch-dashboards[30297]: {\"type\":\"log\",\"@timestamp\":\"2022-04-04T21:41:17Z\",\"tags\"...00\"}\n" + - "Apr 04 21:41:20 dummy_desktop opensearch-dashboards[30297]: {\"type\":\"log\",\"@timestamp\":\"2022-04-04T21:41:20Z\",\"tags\"...00\"}\n" + - "Apr 04 21:41:22 dummy_desktop opensearch-dashboards[30297]: {\"type\":\"log\",\"@timestamp\":\"2022-04-04T21:41:22Z\",\"tags\"...00\"}\n" + - "Apr 04 21:41:28 dummy_desktop opensearch-dashboards[30297]: {\"type\":\"response\",\"@timestamp\":\"2022-04-04T21:41:28Z\",\"tags...\n" + - "Apr 05 00:35:41 dummy_desktop opensearch-dashboards[30297]: {\"type\":\"response\",\"@timestamp\":\"2022-04-05T00:35:41Z\",\"tags...\n" + - "Apr 05 18:45:25 dummy_desktop opensearch-dashboards[30297]: {\"type\":\"response\",\"@timestamp\":\"2022-04-05T18:45:25Z\",\"tags...\n" + - "Apr 05 18:45:32 dummy_desktop opensearch-dashboards[30297]: {\"type\":\"response\",\"@timestamp\":\"2022-04-05T18:45:32Z\",\"tags...\n" + - "Hint: Some lines were ellipsized, use -l to show in full." - helper.addShMock("systemctl status opensearch-dashboards") { script -> - return [stdout: status_message, exitValue: 0] - } - def cluster_status = [ - "name": "dummy_desktop", - "uuid": "c4677c7a-d76f-45eb-a124-7e30d2b10e4b", - "version": [ - "number": "1.3.0", - "build_hash": "00e06934211e9819f99aabbf139885682f33e95e", - "build_number": 1, - "build_snapshot": false - ], - "status": [ - "overall": [ - "since": "2022-04-07T21:54:39.960Z", - "state": "green", - "title": "Green", - "nickname": "Looking good", - "icon": "success", - "uiColor": "secondary" - ] - ] - ] - helper.addShMock("curl -s \"http://localhost:5601/api/status\" -u admin:admin") { script -> - return [stdout: cluster_status.inspect(), exitValue: 0] - } - helper.registerAllowedMethod("readJSON", [Map.class], {c -> cluster_status}) - def cluster_plugin = "anomalyDetectionDashboards@1.3.0.0\n" + - "ganttChartDashboards@1.3.0.0\n" + - "reportsDashboards@1.3.0.0\n" + - "securityDashboards@1.3.0.0" - helper.addShMock("/usr/share/opensearch-dashboards/bin/opensearch-dashboards-plugin list --allow-root") { script -> - return [stdout: cluster_plugin, exitValue: 0] - } - } - - @Test - void testRpmDashboardsDistValidation() { - super.testPipeline("tests/jenkins/jobs/RpmDashboardsDistValidation_Jenkinsfile") - } -} diff --git a/tests/jenkins/TestRpmMetaValidation.groovy b/tests/jenkins/TestRpmMetaValidation.groovy deleted file mode 100644 index 4012a61153..0000000000 --- a/tests/jenkins/TestRpmMetaValidation.groovy +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - - -import jenkins.tests.BuildPipelineTest -import org.junit.Before -import org.junit.Test - -class TestRpmMetaValidation extends BuildPipelineTest { - - @Before - void setUp() { - - def rpmDistribution = "$workspace/opensearch-1.3.1-linux-x64.rpm" - def refMap = [Name:"opensearch", Version: "1.3.1", Architecture: "x64", Group: "Application/Internet", - License: "Apache-2.0", Relocations: "(not relocatable)", URL: "https://opensearch.org/", - Summary: "An open source distributed and RESTful search engine", - Description: "OpenSearch makes it easy to ingest, search, visualize, and analyze your data\n" + - "For more information, see: https://opensearch.org/" - ] - this.registerLibTester(new RpmMetaValidationLibTester(rpmDistribution, refMap)) - super.setUp() - def out = "Name : opensearch\n" + - "Version : 1.3.1\n" + - "Release : 1\n" + - "Architecture: x86_64\n" + - "Install Date: (not installed)\n" + - "Group : Application/Internet\n" + - "Size : 646503829\n" + - "License : Apache-2.0\n" + - "Signature : (none)\n" + - "Source RPM : opensearch-1.3.1-1.src.rpm\n" + - "Build Date : Wed Mar 23 22:10:17 2022\n" + - "Build Host : f8a4d27a00d9\n" + - "Relocations : (not relocatable)\n" + - "URL : https://opensearch.org/\n" + - "Summary : An open source distributed and RESTful search engine\n" + - "Description :\n" + - "OpenSearch makes it easy to ingest, search, visualize, and analyze your data\n" + - "For more information, see: https://opensearch.org/" - helper.addShMock("rpm -qip $workspace/opensearch-1.3.1-linux-x64.rpm") { script -> - return [stdout: out, exitValue: 0] - } - def sigOut = "/tmp/workspace/opensearch-1.3.1-linux-x64.rpm:\n" + "Header V4 RSA/SHA512 Signature, key ID 9310d3fc: OK\n" + - "Header SHA256 digest: OK\n" + "Header SHA1 digest: OK\n" + "Payload SHA256 digest: OK\n" + - "V4 RSA/SHA512 Signature, key ID 9310d3fc: OK\n" + "MD5 digest: OK" - helper.addShMock("rpm -K -v $rpmDistribution") { script -> - return [stdout: sigOut, exitValue: 0] - } - } - - @Test - void testRpmMetaValidation() { - super.testPipeline("tests/jenkins/jobs/RpmMetaValidation_Jenkinsfile") - } -} diff --git a/tests/jenkins/TestRpmOpenSearchDistValidation.groovy b/tests/jenkins/TestRpmOpenSearchDistValidation.groovy deleted file mode 100644 index 3ac7f616e5..0000000000 --- a/tests/jenkins/TestRpmOpenSearchDistValidation.groovy +++ /dev/null @@ -1,165 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - - -import jenkins.tests.BuildPipelineTest -import org.junit.Before -import org.junit.Test - -class TestRpmOpenSearchDistValidation extends BuildPipelineTest { - - @Before - void setUp() { - - def bundleManifest = "tests/jenkins/data/opensearch-1.3.1-x64-rpm.yml" - def rpmDistribution = "$workspace/opensearch-1.3.1-linux-x64.rpm" - this.registerLibTester(new RpmOpenSearchDistValidationLibTester(rpmDistribution, bundleManifest)) - super.setUp() - def out = "Name : opensearch\n" + - "Version : 1.3.1\n" + - "Release : 1\n" + - "Architecture: x86_64\n" + - "Install Date: (not installed)\n" + - "Group : Application/Internet\n" + - "Size : 646503829\n" + - "License : Apache-2.0\n" + - "Signature : (none)\n" + - "Source RPM : opensearch-1.3.1-1.src.rpm\n" + - "Build Date : Wed Mar 23 22:10:17 2022\n" + - "Build Host : f8a4d27a00d9\n" + - "Relocations : (not relocatable)\n" + - "URL : https://opensearch.org/\n" + - "Summary : An open source distributed and RESTful search engine\n" + - "Description :\n" + - "OpenSearch makes it easy to ingest, search, visualize, and analyze your data\n" + - "For more information, see: https://opensearch.org/" - helper.addShMock("rpm -qip $workspace/opensearch-1.3.1-linux-x64.rpm") { script -> - return [stdout: out, exitValue: 0] - } - def sigOut = "/tmp/workspace/opensearch-1.3.1-linux-x64.rpm:\n" + "Header V4 RSA/SHA512 Signature, key ID 9310d3fc: OK\n" + - "Header SHA256 digest: OK\n" + "Header SHA1 digest: OK\n" + "Payload SHA256 digest: OK\n" + - "V4 RSA/SHA512 Signature, key ID 9310d3fc: OK\n" + "MD5 digest: OK" - helper.addShMock("rpm -K -v $rpmDistribution") { script -> - return [stdout: sigOut, exitValue: 0] - } - helper.addShMock("ls /etc/opensearch") { script -> - return [stdout: "esnode-key.pem jvm.options.d kirk.pem opensearch-reports-scheduler" + - " performance_analyzer_enabled.conf esnode.pem jvm.options.rpmsave log4j2.properties" + - " opensearch.yml rca_enabled.conf jvm.options kirk-key.pem" + - " opensearch-observability opensearch.yml.rpmsave root-ca.pem", exitValue: 0] - } - def log_message = "OpenSearch Security Demo Installer\n" + - " ** Warning: Do not use on production or public reachable systems **\n" + - "Basedir: /usr/share/opensearch\n" + - "OpenSearch install type: rpm/deb on CentOS Linux release 7.9.2009 (Core)\n" + - "OpenSearch config dir: /etc/opensearch\n" + - "OpenSearch config file: /etc/opensearch/opensearch.yml\n" + - "OpenSearch bin dir: /usr/share/opensearch/bin\n" + - "OpenSearch plugins dir: /usr/share/opensearch/plugins\n" + - "OpenSearch lib dir: /usr/share/opensearch/lib\n" + - "Detected OpenSearch Version: x-content-1.3.0\n" + - "Detected OpenSearch Security Version: 1.3.0.0\n" + - "\n" + - "### Success\n" + - "### Execute this script now on all your nodes and then start all nodes\n" + - "### OpenSearch Security will be automatically initialized.\n" + - "### If you like to change the runtime configuration\n" + - "### change the files in ../securityconfig and execute:\n" + - "\"/usr/share/opensearch/plugins/opensearch-security/tools/securityadmin.sh\" -cd \"/usr/share/opensearch/plugins/opensearch-security/securityconfig\" -icl -key \"/etc/opensearch/kirk-key.pem\" -cert \"/etc/opensearch/kirk.pem\" -cacert \"/etc/opensearch/root-ca.pem\" -nhnv\n" + - "### or run ./securityadmin_demo.sh\n" + - "### To use the Security Plugin ConfigurationGUI\n" + - "### To access your secured cluster open https://: and log in with admin/admin.\n" + - "### (Ignore the SSL certificate warning because we installed self-signed demo certificates)" - helper.addShMock("cat /var/log/opensearch/install_demo_configuration.log") { script -> - return [stdout: log_message, exitValue: 0] - } - def status_message = " Loaded: loaded (/usr/lib/systemd/system/opensearch.service; disabled; vendor preset: disabled)\n" + - " Active: active (running) since Mon 2022-04-04 21:41:23 UTC; 2h 52min ago\n" + - " Docs: https://opensearch.org/\n" + - " Main PID: 32009 (java)\n" + - " CGroup: /system.slice/opensearch.service\n" + - " └─32009 /usr/share/opensearch/jdk/bin/java -Xshare:auto -Dopensearch.networkaddress.cache.ttl=60 -Dopensearch.networkaddress.cache.negative.ttl=1...\n" + - "\n" + - "Apr 04 21:41:25 dummy_desktop systemd-entrypoint[32009]: WARNING: An illegal reflective access operation has occurred\n" + - "Apr 04 21:41:25 dummy_desktop systemd-entrypoint[32009]: WARNING: Illegal reflective access by org.opensearch.securi...name\n" + - "Apr 04 21:41:25 dummy_desktop systemd-entrypoint[32009]: WARNING: Please consider reporting this to the maintainers ...tter\n" + - "Apr 04 21:41:25 dummy_desktop systemd-entrypoint[32009]: WARNING: Use --illegal-access=warn to enable warnings of fu...ions\n" + - "Apr 04 21:41:25 dummy_desktop systemd-entrypoint[32009]: WARNING: All illegal access operations will be denied in a ...ease\n" + - "Apr 04 22:11:35 dummy_desktop systemd-entrypoint[32009]: Exception in thread \"Attach Listener\" Agent failed to start!\n" + - "Apr 04 22:41:47 dummy_desktop systemd-entrypoint[32009]: Exception in thread \"Attach Listener\" Agent failed to start!\n" + - "Apr 04 23:11:59 dummy_desktop systemd-entrypoint[32009]: Exception in thread \"Attach Listener\" Agent failed to start!\n" + - "Apr 04 23:42:10 dummy_desktop systemd-entrypoint[32009]: Exception in thread \"Attach Listener\" Agent failed to start!\n" + - "Apr 05 00:12:22 dummy_desktop systemd-entrypoint[32009]: Exception in thread \"Attach Listener\" Agent failed to start!\n" + - "Hint: Some lines were ellipsized, use -l to show in full." - helper.addShMock("systemctl status opensearch") { script -> - return [stdout: status_message, exitValue: 0] - } - def cluster_info_n_status = [ - "name" : "dummy_desktop", - "cluster_name" : "opensearch", - "status":"green", - "cluster_uuid" : "uClFQNw6T_KCO2fmdP2jTA", - "version" : [ - "distribution" : "opensearch", - "number" : "1.3.1", - "build_type" : "rpm", - "build_hash" : "40481be2be0536a34588b1fad10eb6c289713803", - "build_date" : "2022-03-28T18:33:36.499005Z", - "build_snapshot" : false, - "lucene_version" : "8.10.1", - "minimum_wire_compatibility_version" : "6.8.0", - "minimum_index_compatibility_version" : "6.0.0-beta1"], - "tagline" : "The OpenSearch Project: https://opensearch.org/" - ] - helper.addShMock("curl -s \"https://localhost:9200\" -u admin:admin --insecure") { script -> - return [stdout: cluster_info_n_status.inspect(), exitValue: 0] - } - helper.registerAllowedMethod("readJSON", [Map.class], {c -> cluster_info_n_status}) - def cluster_status = [cluster_name:"opensearch", status:"green", timed_out:false, number_of_nodes:1, - number_of_data_nodes:1, discovered_master:true, active_primary_shards:1, active_shards:1, - relocating_shards:0, initializing_shards:0, unassigned_shards:0, delayed_unassigned_shards:0, - number_of_pending_tasks:0, number_of_in_flight_fetch:0, task_max_waiting_in_queue_millis:0, - active_shards_percent_as_number:100.0] - helper.addShMock("curl -s \"https://localhost:9200/_cluster/health?pretty\" -u admin:admin --insecure") { script -> - return [stdout: cluster_status.inspect(), exitValue: 0] - } - def cluster_plugin = "dummy_desktop opensearch-alerting 1.3.1.0\n" + - "dummy_desktop opensearch-job-scheduler 1.3.1.0\n" + - "dummy_desktop opensearch-ml 1.3.1.0" - helper.addShMock("curl -s \"https://localhost:9200/_cat/plugins\" -u admin:admin --insecure") { script -> - return [stdout: cluster_plugin, exitValue: 0] - } - - def pa_status_message = "opensearch-performance-analyzer.service - OpenSearch Performance Analyzer\n" + - " Loaded: loaded (/usr/lib/systemd/system/opensearch-performance-analyzer.service; disabled; vendor preset: disabled)\n" + - " Active: active (running) since Wed 2022-04-27 23:41:32 UTC; 20min ago\n" + - " Main PID: 518 (java)\n" + - " CGroup: /docker/0ac16d0953dba2520b57227f93645847c916e1747c7d0fb47ffaef593075f809/system.slice/opensearch-performance-analyzer.service\n" + - " └─518 /usr/share/opensearch/jdk/bin/java -Xshare:auto -Xms4m -Xmx64m -XX:+UseSerialGC -Dlog4j.configurationFile=/usr/share/opensearch/plugins/opensearch-performance-a...\n" + - "\n" + - "Apr 28 00:02:00 0ac16d0953db performance-analyzer-agent-cli[518]: 00:02:00.413 [JPhU4pKjSySOd03YU1Fm6g-task-0-] ERROR org.opensearch.performanceanalyzer.rca.store.metric.Aggrega...\n" + - "Hint: Some lines were ellipsized, use -l to show in full." - helper.addShMock("systemctl status opensearch-performance-analyzer") { script -> - return [stdout: pa_status_message, exitValue: 0] - } - - def pa_metrics = "{\"JPhU4pKjSySOd03YU1Fm6g\": {\"timestamp\": 1651104310000, \"data\": {\"fields\":" + - "[{\"name\":\"CPU_Utilization\",\"type\":\"DOUBLE\"}],\"records\":[[1.258446418449754E-4]]}}}" - helper.addShMock("curl -s localhost:9600/_plugins/_performanceanalyzer/metrics?metrics=CPU_Utilization\\&agg=avg") { script -> - return [stdout: pa_metrics, exitValue: 0] - } - - - } - - @Test - void testRpmOpenSearchDistValidation() { - super.testPipeline("tests/jenkins/jobs/RpmOpenSearchDistValidation_Jenkinsfile") - } -} diff --git a/tests/jenkins/TestRunBwcTestScript.groovy b/tests/jenkins/TestRunBwcTestScript.groovy deleted file mode 100644 index 288cfe8106..0000000000 --- a/tests/jenkins/TestRunBwcTestScript.groovy +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -import jenkins.tests.BuildPipelineTest -import org.junit.Before -import org.junit.Test - - -class TestRunBwcTestScript extends BuildPipelineTest { - - @Test - public void TestRunBwcTestScript() { - this.registerLibTester(new RunBwcTestScriptLibTester( - 'dummy_job', - 'tests/jenkins/data/opensearch-1.3.0-build.yml', - 'tests/jenkins/data/opensearch-1.3.0-test.yml', - '717' - ) - ) - - super.testPipeline("tests/jenkins/jobs/RunBwcTestScript_Jenkinsfile") - } - - @Test - public void TestRunBwcTestScript_OpenSearch_Dashboards() { - this.registerLibTester(new RunBwcTestScriptLibTester( - 'dummy_job', - 'tests/jenkins/data/opensearch-dashboards-1.2.0-build.yml', - 'tests/jenkins/data/opensearch-dashboards-1.2.0-test.yml', - '215' - ) - ) - - super.testPipeline("tests/jenkins/jobs/RunBwcTestScript_OpenSearch_Dashboards_Jenkinsfile") - } -} diff --git a/tests/jenkins/TestRunGradleCheck.groovy b/tests/jenkins/TestRunGradleCheck.groovy deleted file mode 100644 index c96754722f..0000000000 --- a/tests/jenkins/TestRunGradleCheck.groovy +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -import jenkins.tests.BuildPipelineTest -import org.junit.Before -import org.junit.Test - - -class TestRunGradleCheck extends BuildPipelineTest { - - @Before - void setUp() { - this.registerLibTester(new RunGradleCheckLibTester( - 'https://github.com/opensearch-project/OpenSearch', - 'main', - ) - ) - super.setUp() - } - - @Test - void testRunGradleCheck() { - super.testPipeline("tests/jenkins/jobs/RunGradleCheck_Jenkinsfile") - } -} diff --git a/tests/jenkins/TestRunIntegTestScript.groovy b/tests/jenkins/TestRunIntegTestScript.groovy deleted file mode 100644 index 29f895860b..0000000000 --- a/tests/jenkins/TestRunIntegTestScript.groovy +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -import jenkins.tests.BuildPipelineTest -import org.junit.Before -import org.junit.Test - - -class TestRunIntegTestScript extends BuildPipelineTest { - - @Test - public void TestRunIntegTestScript() { - this.registerLibTester(new RunIntegTestScriptLibTester( - 'dummy_job', - 'OpenSearch', - 'tests/jenkins/data/opensearch-1.3.0-build.yml', - 'tests/jenkins/data/opensearch-1.3.0-test.yml', - '', - ) - ) - - super.testPipeline("tests/jenkins/jobs/RunIntegTestScript_Jenkinsfile") - } - - @Test - public void TestRunIntegTestScript_OpenSearch_Dashboards() { - this.registerLibTester(new RunIntegTestScriptLibTester( - 'dummy_job', - 'functionalTestDashboards', - 'tests/jenkins/data/opensearch-dashboards-1.2.0-build.yml', - 'tests/jenkins/data/opensearch-dashboards-1.2.0-test.yml', - '', - ) - ) - - super.testPipeline("tests/jenkins/jobs/RunIntegTestScript_OpenSearch_Dashboards_Jenkinsfile") - } - - @Test - public void TestRunIntegTestScript_LocalPath() { - this.registerLibTester(new RunIntegTestScriptLibTester( - 'dummy_job', - 'OpenSearch', - 'tests/jenkins/data/opensearch-1.3.0-build.yml', - 'tests/jenkins/data/opensearch-1.3.0-test.yml', - 'tests/jenkins/artifacts/tar', - ) - ) - - super.testPipeline("tests/jenkins/jobs/RunIntegTestScript_LocalPath_Jenkinsfile") - } -} diff --git a/tests/jenkins/TestRunNonSecurityPerfTestScript.groovy b/tests/jenkins/TestRunNonSecurityPerfTestScript.groovy index 56df22c643..badd7243be 100644 --- a/tests/jenkins/TestRunNonSecurityPerfTestScript.groovy +++ b/tests/jenkins/TestRunNonSecurityPerfTestScript.groovy @@ -24,15 +24,55 @@ class TestRunNonSecurityPerfTestScript extends BuildPipelineTest { @Override @Before void setUp() { - this.registerLibTester(new RunPerfTestScriptLibTester( - 'tests/jenkins/data/opensearch-1.3.0-non-security-bundle.yml', - '1236', - 'true', - 'nyc_taxis', - '1', - '1', - false - )) + // this.registerLibTester(new RunPerfTestScriptLibTester( + // 'tests/jenkins/data/opensearch-1.3.0-non-security-bundle.yml', + // '1236', + // 'true', + // 'nyc_taxis', + // '1', + // '1', + // false + // )) + helper.registerAllowedMethod("s3Download", [Map]) + helper.registerAllowedMethod("uploadTestResults", [Map]) + helper.registerAllowedMethod("s3Upload", [Map]) + helper.registerAllowedMethod("withAWS", [Map, Closure], { + args, + closure -> + closure.delegate = delegate + return helper.callClosure(closure) + }) + helper.registerAllowedMethod('findFiles', [Map.class], null) + helper.registerAllowedMethod("withCredentials", [Map]) + helper.registerAllowedMethod("downloadBuildManifest", [Map], { + c -> lib.jenkins.BuildManifest.new(readYaml(file: 'tests/jenkins/data/opensearch-1.3.0-non-security-bundle.yml')) + }) + helper.registerAllowedMethod('parameterizedCron', [String], null) + binding.setVariable('AGENT_LABEL', 'Jenkins-Agent-AL2-X64-C54xlarge-Docker-Host') + binding.setVariable('AGENT_IMAGE', 'opensearchstaging/ci-runner:ci-runner-centos7-v1') + binding.setVariable('ARCHITECTURE', 'x64') + binding.setVariable('ARTIFACT_BUCKET_NAME', 'test_bucket') + binding.setVariable('ARTIFACT_DOWNLOAD_ROLE_NAME', 'Dummy_Download_Role') + binding.setVariable('AWS_ACCOUNT_PUBLIC', 'dummy_account') + binding.setVariable('BUILD_ID', '1236') + binding.setVariable('env', ['BUILD_NUMBER': '307']) + binding.setVariable('BUILD_NUMBER', '307') + binding.setVariable('BUILD_URL', 'test://artifact.url') + binding.setVariable('BUNDLE_MANIFEST', 'tests/jenkins/data/opensearch-1.3.0-non-security-bundle.yml') + binding.setVariable('BUNDLE_MANIFEST_URL', 'test://artifact.url') + binding.setVariable('GITHUB_BOT_TOKEN_NAME', 'bot_token_name') + binding.setVariable('GITHUB_USER', 'test_user') + binding.setVariable('GITHUB_TOKEN', 'test_token') + binding.setVariable('HAS_SECURITY', true) + binding.setVariable('JOB_NAME', '307') + binding.setVariable('PERF_TEST_CONFIG_LOCATION', 'test_config') + binding.setVariable('PUBLIC_ARTIFACT_URL', 'test://artifact.url') + binding.setVariable('STAGE_NAME', 'test_stage') + binding.setVariable('TEST_ITERATIONS', '1') + binding.setVariable('TEST_WORKLOAD', 'nyc_taxis') + binding.setVariable('WEBHOOK_URL', 'test://artifact.url') + binding.setVariable('WARMUP_ITERATIONS', '1') + super.setUp() helper.registerSharedLibrary( @@ -97,7 +137,7 @@ class TestRunNonSecurityPerfTestScript extends BuildPipelineTest { assertThat(testScriptCommands.size(), equalTo(1)) assertThat(testScriptCommands, hasItem( - "./test.sh perf-test --stack test-single-1236-x64-307 --bundle-manifest tests/jenkins/data/opensearch-1.3.0-non-security-bundle.yml --config config.yml --without-security --workload nyc_taxis --test-iters 1 --warmup-iters 1 ".toString() + "./test.sh perf-test --stack test-single-1236-x64-perf-test --bundle-manifest tests/jenkins/data/opensearch-1.3.0-non-security-bundle.yml --config config.yml --without-security --workload nyc_taxis --test-iters 1 --warmup-iters 1 ".toString() )) def resultUploadScriptCommands = getCommandExecutions('s3Upload', 'test-results').findAll { @@ -105,7 +145,7 @@ class TestRunNonSecurityPerfTestScript extends BuildPipelineTest { } assertThat(resultUploadScriptCommands.size(), equalTo(1)) assertThat(resultUploadScriptCommands, hasItem( - "{file=test-results, bucket=ARTIFACT_BUCKET_NAME, path=perf-test/1.3.0/1236/linux/x64/tar/test-results/307}".toString() + "{file=test-results, bucket=ARTIFACT_BUCKET_NAME, path=307/1.3.0/1236/linux/x64/tar/test-results}".toString() )) } diff --git a/tests/jenkins/TestRunPerfTestScript.groovy b/tests/jenkins/TestRunPerfTestScript.groovy deleted file mode 100644 index 2252c2cb6a..0000000000 --- a/tests/jenkins/TestRunPerfTestScript.groovy +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -import jenkins.tests.BuildPipelineTest -import org.junit.Before -import org.junit.Test - -import static com.lesfurets.jenkins.unit.MethodCall.callArgsToString -import static org.hamcrest.CoreMatchers.equalTo -import static org.hamcrest.CoreMatchers.hasItem -import static org.hamcrest.MatcherAssert.assertThat - -import static com.lesfurets.jenkins.unit.global.lib.LibraryConfiguration.library -import static com.lesfurets.jenkins.unit.global.lib.GitSource.gitSource - -class TestRunPerfTestScript extends BuildPipelineTest { - - @Override - @Before - void setUp() { - this.registerLibTester(new RunPerfTestScriptLibTester( - 'tests/jenkins/data/opensearch-1.3.0-bundle.yml', - '1236', - 'true', - 'nyc_taxis', - '1', - '1', - true - )) - super.setUp() - - helper.registerSharedLibrary( - library().name('jenkins') - .defaultVersion('1.0.0') - .allowOverride(true) - .implicit(true) - .targetPath('vars') - .retriever(gitSource('https://github.com/opensearch-project/opensearch-build-libraries.git')) - .build() - ) - } - - @Test - public void testRunPerfTestScript_Pipeline() { - super.testPipeline("jenkins/opensearch/perf-test.jenkinsfile", - "tests/jenkins/jenkinsjob-regression-files/opensearch/perf-test-with-security.jenkinsfile") - } - - @Test - void testRunPerfTestScript_verifyArtifactDownloads() { - runScript("jenkins/opensearch/perf-test.jenkinsfile") - - def curlCommands = getCommandExecutions('sh', 'curl').findAll { - shCommand -> shCommand.contains('curl') - } - - assertThat(curlCommands.size(), equalTo(4)) - assertThat(curlCommands, hasItem( - "curl -sSL test://artifact.url --output tests/jenkins/data/opensearch-1.3.0-bundle.yml".toString() - )) - - def s3DownloadCommands = getCommandExecutions('s3Download', 'bucket').findAll { - shCommand -> shCommand.contains('bucket') - } - - assertThat(s3DownloadCommands.size(), equalTo(2)) - assertThat(s3DownloadCommands, hasItem( - "{file=config.yml, bucket=ARTIFACT_BUCKET_NAME, path=test_config/config.yml, force=true}".toString() - )) - } - - @Test - void testRunPerfTestScript_verifyPackageInstallation() { - runScript("jenkins/opensearch/perf-test.jenkinsfile") - - def pipenvCommands = getCommandExecutions('sh', 'pipenv').findAll { - shCommand -> shCommand.contains('pipenv') - } - - assertThat(pipenvCommands.size(), equalTo(2)) - - } - - @Test - void testRunPerfTestScript_verifyScriptExecutions() { - runScript("jenkins/opensearch/perf-test.jenkinsfile") - - def testScriptCommands = getCommandExecutions('sh', './test.sh').findAll { - shCommand -> shCommand.contains('./test.sh') - } - - assertThat(testScriptCommands.size(), equalTo(2)) - assertThat(testScriptCommands, hasItem( - "./test.sh perf-test --stack test-single-security-1236-x64-307 --bundle-manifest tests/jenkins/data/opensearch-1.3.0-bundle.yml --config config.yml --workload nyc_taxis --test-iters 1 --warmup-iters 1 ".toString() - )) - assertThat(testScriptCommands, hasItem( - "./test.sh perf-test --stack test-single-1236-x64-307 --bundle-manifest tests/jenkins/data/opensearch-1.3.0-bundle.yml --config config.yml --without-security --workload nyc_taxis --test-iters 1 --warmup-iters 1 ".toString() - )) - - def resultUploadScriptCommands = getCommandExecutions('s3Upload', 'test-results').findAll { - shCommand -> shCommand.contains('test-results') - } - assertThat(resultUploadScriptCommands.size(), equalTo(2)) - assertThat(resultUploadScriptCommands, hasItem( - "{file=test-results, bucket=ARTIFACT_BUCKET_NAME, path=perf-test/1.3.0/1236/linux/x64/tar/test-results/307}".toString() - )) - } - - def getCommandExecutions(methodName, command) { - def shCommands = helper.callStack.findAll { - call -> - call.methodName == methodName - }. - collect { - call -> - callArgsToString(call) - }.findAll { - shCommand -> - shCommand.contains(command) - } - - return shCommands - } -} diff --git a/tests/jenkins/TestScanDockerImage.groovy b/tests/jenkins/TestScanDockerImage.groovy deleted file mode 100644 index cf86609d09..0000000000 --- a/tests/jenkins/TestScanDockerImage.groovy +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -import jenkins.tests.BuildPipelineTest -import org.junit.Before -import org.junit.Test - - -class TestScanDockerImage extends BuildPipelineTest { - - @Before - void setUp() { - this.registerLibTester(new ScanDockerImageLibTester( - "opensearchstaging/opensearch:2.0.0", - "scan_docker_image" - ) - ) - super.setUp() - } - - @Test - void testScanDockerImage() { - super.testPipeline("tests/jenkins/jobs/ScanDockerImage_Jenkinsfile") - } -} diff --git a/tests/jenkins/TestSignArtifacts.groovy b/tests/jenkins/TestSignArtifacts.groovy deleted file mode 100644 index e013298c8f..0000000000 --- a/tests/jenkins/TestSignArtifacts.groovy +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - - -import jenkins.tests.BuildPipelineTest -import org.junit.* - - -class TestSignArtifacts extends BuildPipelineTest { - - @Before - void setUp() { - - this.registerLibTester(new SignArtifactsLibTester('.sig', 'linux', "${this.workspace}/artifacts", null, null)) - this.registerLibTester(new SignArtifactsLibTester('.rpm', 'linux', "${this.workspace}/artifacts", 'null', null)) - this.registerLibTester(new SignArtifactsLibTester(null, 'linux', "${this.workspace}/file.yml", 'maven', null)) - super.setUp() - } - - @Test - void testSignArtifacts() { - super.testPipeline("tests/jenkins/jobs/SignArtifacts_Jenkinsfile") - } -} diff --git a/tests/jenkins/TestSignStandaloneArtifactsJob.groovy b/tests/jenkins/TestSignStandaloneArtifactsJob.groovy index f44bb1b7ca..ceaf976fcb 100644 --- a/tests/jenkins/TestSignStandaloneArtifactsJob.groovy +++ b/tests/jenkins/TestSignStandaloneArtifactsJob.groovy @@ -25,11 +25,32 @@ class TestSignStandaloneArtifactsJob extends BuildPipelineTest { def platform = 'linux' def artifactPath = "${this.workspace}/artifacts" - this.registerLibTester(new SignArtifactsLibTester(sigtype, platform, artifactPath, null, null)) + // this.registerLibTester(new SignArtifactsLibTester(sigtype, platform, artifactPath, null, null)) + binding.setVariable('GITHUB_BOT_TOKEN_NAME', 'github_bot_token_name') + helper.registerAllowedMethod('git', [Map]) + helper.registerAllowedMethod('withCredentials', [Map, Closure], { args, closure -> + closure.delegate = delegate + return helper.callClosure(closure) + }) + helper.registerAllowedMethod('withAWS', [Map, Closure], { args, closure -> + closure.delegate = delegate + return helper.callClosure(closure) + }) - this.registerLibTester(new PrintArtifactDownloadUrlsForStagingLibTester(filenamesForUrls, 'sign_artifacts_job/dummy/upload/path/20/dist/signed')) + // this.registerLibTester(new PrintArtifactDownloadUrlsForStagingLibTester(filenamesForUrls, 'sign_artifacts_job/dummy/upload/path/20/dist/signed')) - this.registerLibTester(new UploadToS3LibTester(artifactPath, 'dummy_bucket_name', 'sign_artifacts_job/dummy/upload/path/20/dist/signed')) + // this.registerLibTester(new UploadToS3LibTester(artifactPath, 'dummy_bucket_name', 'sign_artifacts_job/dummy/upload/path/20/dist/signed')) + binding.setVariable('AWS_ACCOUNT_PUBLIC', 'dummy_account') + binding.setVariable('ARTIFACT_BUCKET_NAME', 'dummy_bucket_name') + helper.registerAllowedMethod("s3Upload", [Map]) + helper.registerAllowedMethod("withCredentials", [Map, Closure], { args, closure -> + closure.delegate = delegate + return helper.callClosure(closure) + }) + helper.registerAllowedMethod("withAWS", [Map, Closure], { args, closure -> + closure.delegate = delegate + return helper.callClosure(closure) + }) super.setUp() diff --git a/tests/jenkins/TestUploadIndexFile.groovy b/tests/jenkins/TestUploadIndexFile.groovy deleted file mode 100644 index 9876cd4d4e..0000000000 --- a/tests/jenkins/TestUploadIndexFile.groovy +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -package jenkins.tests - -import org.junit.* - -class TestUploadIndexFile extends BuildPipelineTest { - - @Before - void setUp() { - this.registerLibTester(new UploadIndexFileLibTester('test')) - this.registerLibTester(new UploadToS3LibTester('index.json', 'ARTIFACT_BUCKET_NAME', 'test/index.json')) - - super.setUp() - } - - @Test - void testUploadIndexFile() { - super.testPipeline('tests/jenkins/jobs/UploadIndexFile_Jenkinsfile') - } - -} diff --git a/tests/jenkins/TestUploadMinSnapshotsToS3.groovy b/tests/jenkins/TestUploadMinSnapshotsToS3.groovy deleted file mode 100644 index 7d67f7e837..0000000000 --- a/tests/jenkins/TestUploadMinSnapshotsToS3.groovy +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -package jenkins.tests - -import jenkins.tests.BuildPipelineTest -import org.junit.* - -class TestUploadMinSnapshotsToS3 extends BuildPipelineTest { - - @Before - void setUp() { - List fileActions = ['createSha512Checksums'] - this.registerLibTester(new UploadMinSnapshotsToS3LibTester( fileActions, 'tests/jenkins/data/opensearch-1.3.0.yml' )) - super.setUp() - } - - @Test - public void test() { - super.testPipeline("tests/jenkins/jobs/uploadMinSnapshotsToS3_Jenkinsfile") - } -} diff --git a/tests/jenkins/TestUploadTestResults.groovy b/tests/jenkins/TestUploadTestResults.groovy deleted file mode 100644 index 7524f41fad..0000000000 --- a/tests/jenkins/TestUploadTestResults.groovy +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -import jenkins.tests.BuildPipelineTest -import org.junit.Before -import org.junit.Test - -class TestUploadTestResults extends BuildPipelineTest { - - @Before - void setUp() { - - this.registerLibTester(new UploadTestResultsLibTester( 'tests/jenkins/data/opensearch-1.3.0-build.yml', 'dummy_job')) - - super.setUp() - } - - @Test - void testUploadToS3() { - super.testPipeline("tests/jenkins/jobs/UploadTestResults_Jenkinsfile") - } -} diff --git a/tests/jenkins/TestUploadToS3.groovy b/tests/jenkins/TestUploadToS3.groovy deleted file mode 100644 index a10d49b765..0000000000 --- a/tests/jenkins/TestUploadToS3.groovy +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -import jenkins.tests.BuildPipelineTest -import org.junit.Before -import org.junit.Test - - -class TestUploadToS3 extends BuildPipelineTest { - - @Before - void setUp() { - - this.registerLibTester(new UploadToS3LibTester( '/tmp/src/path', 'dummy_bucket', '/upload/path' )) - - super.setUp() - } - - @Test - void testUploadToS3() { - super.testPipeline("tests/jenkins/jobs/UploadToS3_Jenkinsfile") - } -} diff --git a/tests/jenkins/TestbuildManifestVar.groovy b/tests/jenkins/TestbuildManifestVar.groovy deleted file mode 100644 index ffba8caaba..0000000000 --- a/tests/jenkins/TestbuildManifestVar.groovy +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -package jenkins.tests - -import org.junit.* - -class TestbuildManifestVar extends BuildPipelineTest { - - @Test - void testbuildManifest() { - super.testPipeline("tests/jenkins/jobs/BuildShManifest_Jenkinsfile") - } -} - diff --git a/tests/jenkins/jenkinsjob-regression-files/cross-cluster-replication/perf-test.jenkinsfile.txt b/tests/jenkins/jenkinsjob-regression-files/cross-cluster-replication/perf-test.jenkinsfile.txt index 48c35cfd7b..6e0bb2d8f7 100644 --- a/tests/jenkins/jenkinsjob-regression-files/cross-cluster-replication/perf-test.jenkinsfile.txt +++ b/tests/jenkins/jenkinsjob-regression-files/cross-cluster-replication/perf-test.jenkinsfile.txt @@ -9,7 +9,7 @@ perf-test.script(groovy.lang.Closure) perf-test.downloadBuildManifest({url=test://artifact.url, path=tests/jenkins/data/opensearch-1.3.0-bundle.yml}) downloadBuildManifest.legacySCM(groovy.lang.Closure) - downloadBuildManifest.library({identifier=jenkins@20211123, retriever=null}) + downloadBuildManifest.library({identifier=jenkins@main, retriever=null}) downloadBuildManifest.sh(curl -sSL test://artifact.url --output tests/jenkins/data/opensearch-1.3.0-bundle.yml) downloadBuildManifest.readYaml({file=tests/jenkins/data/opensearch-1.3.0-bundle.yml}) BuildManifest.asBoolean() @@ -25,7 +25,7 @@ perf-test.script(groovy.lang.Closure) perf-test.downloadBuildManifest({url=test://artifact.url, path=tests/jenkins/data/opensearch-1.3.0-bundle.yml}) downloadBuildManifest.legacySCM(groovy.lang.Closure) - downloadBuildManifest.library({identifier=jenkins@20211123, retriever=null}) + downloadBuildManifest.library({identifier=jenkins@main, retriever=null}) downloadBuildManifest.sh(curl -sSL test://artifact.url --output tests/jenkins/data/opensearch-1.3.0-bundle.yml) downloadBuildManifest.readYaml({file=tests/jenkins/data/opensearch-1.3.0-bundle.yml}) BuildManifest.asBoolean() @@ -34,7 +34,7 @@ perf-test.echo(Architecture: x64) perf-test.runPerfTestScript({bundleManifest=tests/jenkins/data/opensearch-1.3.0-bundle.yml, buildId=1236, architecture=x64, component=cross-cluster-replication, config=config-ccr.yml}) runPerfTestScript.legacySCM(groovy.lang.Closure) - runPerfTestScript.library({identifier=jenkins@20211123, retriever=null}) + runPerfTestScript.library({identifier=jenkins@main, retriever=null}) runPerfTestScript.readYaml({file=tests/jenkins/data/opensearch-1.3.0-bundle.yml}) BuildManifest.asBoolean() runPerfTestScript.sh( @@ -65,7 +65,7 @@ CCR Performance tests for 1236 completed}) perf-test.script(groovy.lang.Closure) perf-test.uploadTestResults({buildManifestFileName=tests/jenkins/data/opensearch-1.3.0-bundle.yml, jobName=perf-test, buildNumber=1236}) uploadTestResults.legacySCM(groovy.lang.Closure) - uploadTestResults.library({identifier=jenkins@20211123, retriever=null}) + uploadTestResults.library({identifier=jenkins@main, retriever=null}) uploadTestResults.readYaml({file=tests/jenkins/data/opensearch-1.3.0-bundle.yml}) BuildManifest.asBoolean() uploadTestResults.echo(Build Id: 1236) diff --git a/tests/jenkins/jenkinsjob-regression-files/opensearch-dashboards/bwc-test.jenkinsfile.txt b/tests/jenkins/jenkinsjob-regression-files/opensearch-dashboards/bwc-test.jenkinsfile.txt index 3e54fcb44a..fb62dd5a7d 100644 --- a/tests/jenkins/jenkinsjob-regression-files/opensearch-dashboards/bwc-test.jenkinsfile.txt +++ b/tests/jenkins/jenkinsjob-regression-files/opensearch-dashboards/bwc-test.jenkinsfile.txt @@ -13,7 +13,7 @@ bwc-test.script(groovy.lang.Closure) bwc-test.detectTestDockerAgent() detectTestDockerAgent.legacySCM(groovy.lang.Closure) - detectTestDockerAgent.library({identifier=jenkins@20211123, retriever=null}) + detectTestDockerAgent.library({identifier=jenkins@main, retriever=null}) detectTestDockerAgent.readYaml({file=manifests/tests/jenkins/data/opensearch-dashboards-1.2.0-test.yml}) TestManifest.asBoolean() detectTestDockerAgent.echo(Using Docker image opensearchstaging/ci-runner:ci-runner-centos7-v1 (null)) @@ -22,7 +22,7 @@ bwc-test.script(groovy.lang.Closure) bwc-test.downloadBuildManifest({url=https://ci.opensearch.org/ci/dbc/distribution-build-opensearch-dashboards/1.2.0/215/linux/x64/dist/opensearch-dashboards/opensearch-dashboards-1.2.0-linux-x64.tar.gz, path=tests/jenkins/data/opensearch-dashboards-1.2.0-build.yml}) downloadBuildManifest.legacySCM(groovy.lang.Closure) - downloadBuildManifest.library({identifier=jenkins@20211123, retriever=null}) + downloadBuildManifest.library({identifier=jenkins@main, retriever=null}) downloadBuildManifest.sh(curl -sSL https://ci.opensearch.org/ci/dbc/distribution-build-opensearch-dashboards/1.2.0/215/linux/x64/dist/opensearch-dashboards/opensearch-dashboards-1.2.0-linux-x64.tar.gz --output tests/jenkins/data/opensearch-dashboards-1.2.0-build.yml) downloadBuildManifest.readYaml({file=tests/jenkins/data/opensearch-dashboards-1.2.0-build.yml}) BuildManifest.asBoolean() @@ -31,17 +31,17 @@ bwc-test.echo(BUILD_ID: 215) bwc-test.runBwcTestScript({jobName=dummy_job, buildManifest=tests/jenkins/data/opensearch-dashboards-1.2.0-build.yml, testManifest=manifests/tests/jenkins/data/opensearch-dashboards-1.2.0-test.yml, buildId=215}) runBwcTestScript.legacySCM(groovy.lang.Closure) - runBwcTestScript.library({identifier=jenkins@20211123, retriever=null}) + runBwcTestScript.library({identifier=jenkins@main, retriever=null}) runBwcTestScript.readYaml({file=tests/jenkins/data/opensearch-dashboards-1.2.0-build.yml}) BuildManifest.asBoolean() BuildManifest.getArtifactRootUrl(dummy_job, 215) runBwcTestScript.echo(Artifact root URL: https://ci.opensearch.org/ci/dbc/dummy_job/1.2.0/215/linux/x64/tar) runBwcTestScript.echo(Paths: opensearch-dashboards=https://ci.opensearch.org/ci/dbc/dummy_job/1.2.0/215/linux/x64/tar) - runBwcTestScript.sh(./test.sh bwc-test manifests/tests/jenkins/data/opensearch-dashboards-1.2.0-test.yml --test-run-id 487 --paths opensearch-dashboards=https://ci.opensearch.org/ci/dbc/dummy_job/1.2.0/215/linux/x64/tar) + runBwcTestScript.sh(./test.sh bwc-test manifests/tests/jenkins/data/opensearch-dashboards-1.2.0-test.yml --test-run-id 215 --paths opensearch-dashboards=https://ci.opensearch.org/ci/dbc/dummy_job/1.2.0/215/linux/x64/tar) bwc-test.script(groovy.lang.Closure) bwc-test.uploadTestResults({buildManifestFileName=tests/jenkins/data/opensearch-dashboards-1.2.0-build.yml, jobName=dummy_job}) uploadTestResults.legacySCM(groovy.lang.Closure) - uploadTestResults.library({identifier=jenkins@20211123, retriever=null}) + uploadTestResults.library({identifier=jenkins@main, retriever=null}) uploadTestResults.readYaml({file=tests/jenkins/data/opensearch-dashboards-1.2.0-build.yml}) BuildManifest.asBoolean() uploadTestResults.echo(Build Id: 215) @@ -72,7 +72,7 @@ publishNotification.withCredentials([WEBHOOK_URL], groovy.lang.Closure) publishNotification.sh(curl -XPOST --header "Content-Type: application/json" --data '{"result_text":":white_check_mark: JOB_NAME=dummy_job -BUILD_NUMBER=[123] +BUILD_NUMBER=[215] MESSAGE=BWC Tests Successful BUILD_URL: htth://BUILD_URL_dummy.com MANIFEST: tests/jenkins/data/opensearch-dashboards-1.2.0-test.yml 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 01e057772c..1ad9494eee 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 @@ -13,7 +13,7 @@ integ-test.script(groovy.lang.Closure) integ-test.detectTestDockerAgent() detectTestDockerAgent.legacySCM(groovy.lang.Closure) - detectTestDockerAgent.library({identifier=jenkins@20211123, retriever=null}) + detectTestDockerAgent.library({identifier=jenkins@main, retriever=null}) detectTestDockerAgent.readYaml({file=manifests/tests/jenkins/data/opensearch-dashboards-1.2.0-test.yml}) TestManifest.asBoolean() detectTestDockerAgent.echo(Using Docker image opensearchstaging/ci-runner:ci-runner-centos7-v1 (null)) @@ -22,7 +22,7 @@ integ-test.script(groovy.lang.Closure) integ-test.downloadBuildManifest({url=https://ci.opensearch.org/ci/dbc/distribution-build-opensearch-dashboards/1.2.0/215/linux/x64/tar/dist/opensearch-dashboards/opensearch-dashboards-1.2.0-linux-x64.tar.gz, path=tests/jenkins/data/opensearch-dashboards-1.2.0-build.yml}) downloadBuildManifest.legacySCM(groovy.lang.Closure) - downloadBuildManifest.library({identifier=jenkins@20211123, retriever=null}) + downloadBuildManifest.library({identifier=jenkins@main, retriever=null}) downloadBuildManifest.sh(curl -sSL https://ci.opensearch.org/ci/dbc/distribution-build-opensearch-dashboards/1.2.0/215/linux/x64/tar/dist/opensearch-dashboards/opensearch-dashboards-1.2.0-linux-x64.tar.gz --output tests/jenkins/data/opensearch-dashboards-1.2.0-build.yml) downloadBuildManifest.readYaml({file=tests/jenkins/data/opensearch-dashboards-1.2.0-build.yml}) BuildManifest.asBoolean() @@ -31,7 +31,7 @@ integ-test.echo(BUILD_ID: 215) integ-test.runIntegTestScript({jobName=dummy_job, componentName=functionalTestDashboards, buildManifest=tests/jenkins/data/opensearch-dashboards-1.2.0-build.yml, testManifest=manifests/tests/jenkins/data/opensearch-dashboards-1.2.0-test.yml}) runIntegTestScript.legacySCM(groovy.lang.Closure) - runIntegTestScript.library({identifier=jenkins@20211123, retriever=null}) + runIntegTestScript.library({identifier=jenkins@main, retriever=null}) runIntegTestScript.readYaml({file=tests/jenkins/data/opensearch-dashboards-1.2.0-build.yml}) BuildManifest.asBoolean() runIntegTestScript.echo(Build Id: 215) @@ -40,11 +40,11 @@ runIntegTestScript.echo(No localPath found, download from url) runIntegTestScript.echo(Paths: opensearch=https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/1.2.0/latest/linux/x64/tar opensearch-dashboards=https://ci.opensearch.org/ci/dbc/dummy_job/1.2.0/215/linux/x64/tar) runIntegTestScript.echo(Component: functionalTestDashboards) - runIntegTestScript.sh(./test.sh integ-test manifests/tests/jenkins/data/opensearch-dashboards-1.2.0-test.yml --component functionalTestDashboards --test-run-id 487 --paths opensearch=https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/1.2.0/latest/linux/x64/tar opensearch-dashboards=https://ci.opensearch.org/ci/dbc/dummy_job/1.2.0/215/linux/x64/tar) + runIntegTestScript.sh(./test.sh integ-test manifests/tests/jenkins/data/opensearch-dashboards-1.2.0-test.yml --component functionalTestDashboards --test-run-id 215 --paths opensearch=https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/1.2.0/latest/linux/x64/tar opensearch-dashboards=https://ci.opensearch.org/ci/dbc/dummy_job/1.2.0/215/linux/x64/tar) integ-test.script(groovy.lang.Closure) integ-test.uploadTestResults({buildManifestFileName=tests/jenkins/data/opensearch-dashboards-1.2.0-build.yml, jobName=dummy_job}) uploadTestResults.legacySCM(groovy.lang.Closure) - uploadTestResults.library({identifier=jenkins@20211123, retriever=null}) + uploadTestResults.library({identifier=jenkins@main, retriever=null}) uploadTestResults.readYaml({file=tests/jenkins/data/opensearch-dashboards-1.2.0-build.yml}) BuildManifest.asBoolean() uploadTestResults.echo(Build Id: 215) @@ -75,7 +75,7 @@ publishNotification.withCredentials([WEBHOOK_URL], groovy.lang.Closure) publishNotification.sh(curl -XPOST --header "Content-Type: application/json" --data '{"result_text":":white_check_mark: JOB_NAME=dummy_job -BUILD_NUMBER=[123] +BUILD_NUMBER=[215] MESSAGE=Integration Tests Successful BUILD_URL: htth://BUILD_URL_dummy.com MANIFEST: tests/jenkins/data/opensearch-dashboards-1.2.0-test.yml diff --git a/tests/jenkins/jenkinsjob-regression-files/opensearch/bwc-test.jenkinsfile.txt b/tests/jenkins/jenkinsjob-regression-files/opensearch/bwc-test.jenkinsfile.txt index 3f210f582c..21828f9881 100644 --- a/tests/jenkins/jenkinsjob-regression-files/opensearch/bwc-test.jenkinsfile.txt +++ b/tests/jenkins/jenkinsjob-regression-files/opensearch/bwc-test.jenkinsfile.txt @@ -13,7 +13,7 @@ bwc-test.script(groovy.lang.Closure) bwc-test.detectTestDockerAgent() detectTestDockerAgent.legacySCM(groovy.lang.Closure) - detectTestDockerAgent.library({identifier=jenkins@20211123, retriever=null}) + detectTestDockerAgent.library({identifier=jenkins@main, retriever=null}) detectTestDockerAgent.readYaml({file=manifests/tests/jenkins/data/opensearch-1.3.0-test.yml}) TestManifest.asBoolean() detectTestDockerAgent.echo(Using Docker image opensearchstaging/ci-runner:ci-runner-centos7-v1 (null)) @@ -22,7 +22,7 @@ bwc-test.script(groovy.lang.Closure) bwc-test.downloadBuildManifest({url=https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/1.3.0/717/linux/x64/dist/opensearch/opensearch-1.3.0-linux-x64.tar.gz, path=tests/jenkins/data/opensearch-1.3.0-build.yml}) downloadBuildManifest.legacySCM(groovy.lang.Closure) - downloadBuildManifest.library({identifier=jenkins@20211123, retriever=null}) + downloadBuildManifest.library({identifier=jenkins@main, retriever=null}) downloadBuildManifest.sh(curl -sSL https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/1.3.0/717/linux/x64/dist/opensearch/opensearch-1.3.0-linux-x64.tar.gz --output tests/jenkins/data/opensearch-1.3.0-build.yml) downloadBuildManifest.readYaml({file=tests/jenkins/data/opensearch-1.3.0-build.yml}) BuildManifest.asBoolean() @@ -31,17 +31,17 @@ bwc-test.echo(BUILD_ID: 717) bwc-test.runBwcTestScript({jobName=dummy_job, buildManifest=tests/jenkins/data/opensearch-1.3.0-build.yml, testManifest=manifests/tests/jenkins/data/opensearch-1.3.0-test.yml, buildId=717}) runBwcTestScript.legacySCM(groovy.lang.Closure) - runBwcTestScript.library({identifier=jenkins@20211123, retriever=null}) + runBwcTestScript.library({identifier=jenkins@main, retriever=null}) runBwcTestScript.readYaml({file=tests/jenkins/data/opensearch-1.3.0-build.yml}) BuildManifest.asBoolean() BuildManifest.getArtifactRootUrl(dummy_job, 717) runBwcTestScript.echo(Artifact root URL: https://ci.opensearch.org/ci/dbc/dummy_job/1.3.0/717/linux/x64/tar) runBwcTestScript.echo(Paths: opensearch=https://ci.opensearch.org/ci/dbc/dummy_job/1.3.0/717/linux/x64/tar) - runBwcTestScript.sh(./test.sh bwc-test manifests/tests/jenkins/data/opensearch-1.3.0-test.yml --test-run-id 487 --paths opensearch=https://ci.opensearch.org/ci/dbc/dummy_job/1.3.0/717/linux/x64/tar) + runBwcTestScript.sh(./test.sh bwc-test manifests/tests/jenkins/data/opensearch-1.3.0-test.yml --test-run-id 717 --paths opensearch=https://ci.opensearch.org/ci/dbc/dummy_job/1.3.0/717/linux/x64/tar) bwc-test.script(groovy.lang.Closure) bwc-test.uploadTestResults({buildManifestFileName=tests/jenkins/data/opensearch-1.3.0-build.yml, jobName=dummy_job}) uploadTestResults.legacySCM(groovy.lang.Closure) - uploadTestResults.library({identifier=jenkins@20211123, retriever=null}) + uploadTestResults.library({identifier=jenkins@main, retriever=null}) uploadTestResults.readYaml({file=tests/jenkins/data/opensearch-1.3.0-build.yml}) BuildManifest.asBoolean() uploadTestResults.echo(Build Id: 717) @@ -72,7 +72,7 @@ publishNotification.withCredentials([WEBHOOK_URL], groovy.lang.Closure) publishNotification.sh(curl -XPOST --header "Content-Type: application/json" --data '{"result_text":":white_check_mark: JOB_NAME=dummy_job -BUILD_NUMBER=[123] +BUILD_NUMBER=[717] MESSAGE=BWC Tests Successful BUILD_URL: htth://BUILD_URL_dummy.com MANIFEST: tests/jenkins/data/opensearch-1.3.0-test.yml diff --git a/tests/jenkins/jenkinsjob-regression-files/opensearch/integ-test.jenkinsfile.txt b/tests/jenkins/jenkinsjob-regression-files/opensearch/integ-test.jenkinsfile.txt index f009e5f759..8fb83d6f67 100644 --- a/tests/jenkins/jenkinsjob-regression-files/opensearch/integ-test.jenkinsfile.txt +++ b/tests/jenkins/jenkinsjob-regression-files/opensearch/integ-test.jenkinsfile.txt @@ -14,7 +14,7 @@ integ-test.script(groovy.lang.Closure) integ-test.detectTestDockerAgent() detectTestDockerAgent.legacySCM(groovy.lang.Closure) - detectTestDockerAgent.library({identifier=jenkins@20211123, retriever=null}) + detectTestDockerAgent.library({identifier=jenkins@main, retriever=null}) detectTestDockerAgent.readYaml({file=manifests/tests/jenkins/data/opensearch-1.3.0-test.yml}) TestManifest.asBoolean() detectTestDockerAgent.echo(Using Docker image opensearchstaging/ci-runner:ci-runner-centos7-v1 (null)) @@ -23,7 +23,7 @@ integ-test.script(groovy.lang.Closure) integ-test.downloadBuildManifest({url=https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/1.3.0/717/linux/x64/dist/opensearch/opensearch-1.3.0-linux-x64.tar.gz, path=tests/jenkins/data/opensearch-1.3.0-build.yml}) downloadBuildManifest.legacySCM(groovy.lang.Closure) - downloadBuildManifest.library({identifier=jenkins@20211123, retriever=null}) + downloadBuildManifest.library({identifier=jenkins@main, retriever=null}) downloadBuildManifest.sh(curl -sSL https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/1.3.0/717/linux/x64/dist/opensearch/opensearch-1.3.0-linux-x64.tar.gz --output tests/jenkins/data/opensearch-1.3.0-build.yml) downloadBuildManifest.readYaml({file=tests/jenkins/data/opensearch-1.3.0-build.yml}) BuildManifest.asBoolean() @@ -51,7 +51,7 @@ integ-test.sh(mv -v /tmp/workspace/artifacts/dummy_job/1.3.0/717/linux/x64/tar /tmp/workspace) integ-test.runIntegTestScript({jobName=dummy_job, componentName=OpenSearch, buildManifest=tests/jenkins/data/opensearch-1.3.0-build.yml, testManifest=manifests/tests/jenkins/data/opensearch-1.3.0-test.yml, localPath=/tmp/workspace/tar}) runIntegTestScript.legacySCM(groovy.lang.Closure) - runIntegTestScript.library({identifier=jenkins@20211123, retriever=null}) + runIntegTestScript.library({identifier=jenkins@main, retriever=null}) runIntegTestScript.readYaml({file=tests/jenkins/data/opensearch-1.3.0-build.yml}) BuildManifest.asBoolean() runIntegTestScript.echo(Build Id: 717) @@ -60,11 +60,11 @@ runIntegTestScript.echo(User provides localPath, use local artifacts: /tmp/workspace/tar) runIntegTestScript.echo(Paths: opensearch=/tmp/workspace/tar) runIntegTestScript.echo(Component: OpenSearch) - runIntegTestScript.sh(./test.sh integ-test manifests/tests/jenkins/data/opensearch-1.3.0-test.yml --component OpenSearch --test-run-id 487 --paths opensearch=/tmp/workspace/tar) + runIntegTestScript.sh(./test.sh integ-test manifests/tests/jenkins/data/opensearch-1.3.0-test.yml --component OpenSearch --test-run-id 717 --paths opensearch=/tmp/workspace/tar) integ-test.echo(Completed running integtest for component OpenSearch) integ-test.uploadTestResults({buildManifestFileName=tests/jenkins/data/opensearch-1.3.0-build.yml, jobName=dummy_job}) uploadTestResults.legacySCM(groovy.lang.Closure) - uploadTestResults.library({identifier=jenkins@20211123, retriever=null}) + uploadTestResults.library({identifier=jenkins@main, retriever=null}) uploadTestResults.readYaml({file=tests/jenkins/data/opensearch-1.3.0-build.yml}) BuildManifest.asBoolean() uploadTestResults.echo(Build Id: 717) @@ -97,7 +97,7 @@ publishNotification.withCredentials([WEBHOOK_URL], groovy.lang.Closure) publishNotification.sh(curl -XPOST --header "Content-Type: application/json" --data '{"result_text":":white_check_mark: JOB_NAME=dummy_job -BUILD_NUMBER=[123] +BUILD_NUMBER=[717] MESSAGE=Integration Tests Successful BUILD_URL: htth://BUILD_URL_dummy.com MANIFEST: tests/jenkins/data/opensearch-1.3.0-test.yml diff --git a/tests/jenkins/jenkinsjob-regression-files/opensearch/perf-test.jenkinsfile.txt b/tests/jenkins/jenkinsjob-regression-files/opensearch/perf-test.jenkinsfile.txt index b0e2d7b8a2..4c2c804481 100644 --- a/tests/jenkins/jenkinsjob-regression-files/opensearch/perf-test.jenkinsfile.txt +++ b/tests/jenkins/jenkinsjob-regression-files/opensearch/perf-test.jenkinsfile.txt @@ -33,7 +33,7 @@ perf-test.script(groovy.lang.Closure) perf-test.downloadBuildManifest({url=test://artifact.url, path=tests/jenkins/data/opensearch-1.3.0-non-security-bundle.yml}) downloadBuildManifest.legacySCM(groovy.lang.Closure) - downloadBuildManifest.library({identifier=jenkins@20211123, retriever=null}) + downloadBuildManifest.library({identifier=jenkins@main, retriever=null}) downloadBuildManifest.sh(curl -sSL test://artifact.url --output tests/jenkins/data/opensearch-1.3.0-non-security-bundle.yml) downloadBuildManifest.readYaml({file=tests/jenkins/data/opensearch-1.3.0-non-security-bundle.yml}) BuildManifest.asBoolean() @@ -41,25 +41,25 @@ BuildManifest.getArtifactArchitecture() perf-test.echo(HAS_SECURITY: false) Messages.asBoolean() - Messages.add(perf-test, Performance tests for #1236) - perf-test.writeFile({file=messages/perf-test.msg, text=Performance tests for #1236}) - perf-test.stash({includes=messages/*, name=messages-perf-test}) + Messages.add(307, Performance tests for #1236) + perf-test.writeFile({file=messages/307.msg, text=Performance tests for #1236}) + perf-test.stash({includes=messages/*, name=messages-307}) perf-test.echo(Skipping stage test-with-security) perf-test.stage(test-without-security, groovy.lang.Closure) perf-test.echo(Executing on agent [docker:[image:opensearchstaging/ci-runner:ci-runner-centos7-v1, reuseNode:false, stages:[:], args:, alwaysPull:true, containerPerStageRoot:false, label:Jenkins-Agent-AL2-X64-C54xlarge-Docker-Host]]) perf-test.script(groovy.lang.Closure) perf-test.downloadBuildManifest({url=test://artifact.url, path=tests/jenkins/data/opensearch-1.3.0-non-security-bundle.yml}) downloadBuildManifest.legacySCM(groovy.lang.Closure) - downloadBuildManifest.library({identifier=jenkins@20211123, retriever=null}) + downloadBuildManifest.library({identifier=jenkins@main, retriever=null}) downloadBuildManifest.sh(curl -sSL test://artifact.url --output tests/jenkins/data/opensearch-1.3.0-non-security-bundle.yml) downloadBuildManifest.readYaml({file=tests/jenkins/data/opensearch-1.3.0-non-security-bundle.yml}) BuildManifest.asBoolean() perf-test.echo(BUNDLE_MANIFEST: tests/jenkins/data/opensearch-1.3.0-non-security-bundle.yml) perf-test.echo(BUILD_ID: 1236) perf-test.echo(Architecture: x64) - perf-test.runPerfTestScript({bundleManifest=tests/jenkins/data/opensearch-1.3.0-non-security-bundle.yml, buildId=1236, architecture=x64, insecure=true, workload=nyc_taxis, testIterations=1, warmupIterations=1, stackNameSuffix=307}) + perf-test.runPerfTestScript({bundleManifest=tests/jenkins/data/opensearch-1.3.0-non-security-bundle.yml, buildId=1236, architecture=x64, insecure=true, workload=nyc_taxis, testIterations=1, warmupIterations=1, stackNameSuffix=null}) runPerfTestScript.legacySCM(groovy.lang.Closure) - runPerfTestScript.library({identifier=jenkins@20211123, retriever=null}) + runPerfTestScript.library({identifier=jenkins@main, retriever=null}) runPerfTestScript.readYaml({file=tests/jenkins/data/opensearch-1.3.0-non-security-bundle.yml}) BuildManifest.asBoolean() runPerfTestScript.sh( @@ -74,45 +74,45 @@ runPerfTestScript.s3Download({file=config.yml, bucket=ARTIFACT_BUCKET_NAME, path=test_config/config.yml, force=true}) runPerfTestScript.usernamePassword({credentialsId=bot_token_name, usernameVariable=GITHUB_USER, passwordVariable=GITHUB_TOKEN}) runPerfTestScript.withCredentials([[GITHUB_USER, GITHUB_TOKEN]], groovy.lang.Closure) - runPerfTestScript.sh(./test.sh perf-test --stack test-single-1236-x64-307 --bundle-manifest tests/jenkins/data/opensearch-1.3.0-non-security-bundle.yml --config config.yml --without-security --workload nyc_taxis --test-iters 1 --warmup-iters 1 ) + runPerfTestScript.sh(./test.sh perf-test --stack test-single-1236-x64-perf-test --bundle-manifest tests/jenkins/data/opensearch-1.3.0-non-security-bundle.yml --config config.yml --without-security --workload nyc_taxis --test-iters 1 --warmup-iters 1 ) Messages.asBoolean() Messages.asBoolean() - Messages.get([perf-test]) - perf-test.unstash({name=messages-perf-test}) + Messages.get([307]) + perf-test.unstash({name=messages-307}) perf-test.findFiles({excludes=, glob=messages/*}) perf-test.dir(messages, groovy.lang.Closure) perf-test.deleteDir() - Messages.add(perf-test, + Messages.add(307, Performance tests without security for 1236 completed) - perf-test.writeFile({file=messages/perf-test.msg, text= + perf-test.writeFile({file=messages/307.msg, text= Performance tests without security for 1236 completed}) - perf-test.stash({includes=messages/*, name=messages-perf-test}) + perf-test.stash({includes=messages/*, name=messages-307}) perf-test.script(groovy.lang.Closure) - perf-test.uploadTestResults({buildManifestFileName=tests/jenkins/data/opensearch-1.3.0-non-security-bundle.yml, jobName=perf-test, buildNumber=307}) + perf-test.uploadTestResults({buildManifestFileName=tests/jenkins/data/opensearch-1.3.0-non-security-bundle.yml, jobName=307, buildNumber=null}) uploadTestResults.legacySCM(groovy.lang.Closure) - uploadTestResults.library({identifier=jenkins@20211123, retriever=null}) + uploadTestResults.library({identifier=jenkins@main, retriever=null}) uploadTestResults.readYaml({file=tests/jenkins/data/opensearch-1.3.0-non-security-bundle.yml}) BuildManifest.asBoolean() uploadTestResults.echo(Build Id: 1236) - BuildManifest.getArtifactRoot(perf-test, 1236) + BuildManifest.getArtifactRoot(307, 1236) uploadTestResults.string({credentialsId=jenkins-artifact-bucket-name, variable=ARTIFACT_BUCKET_NAME}) uploadTestResults.string({credentialsId=jenkins-aws-account-public, variable=AWS_ACCOUNT_PUBLIC}) uploadTestResults.withCredentials([ARTIFACT_BUCKET_NAME, AWS_ACCOUNT_PUBLIC], groovy.lang.Closure) - uploadTestResults.echo(Uploading to s3://ARTIFACT_BUCKET_NAME/perf-test/1.3.0/1236/linux/x64/tar) + uploadTestResults.echo(Uploading to s3://ARTIFACT_BUCKET_NAME/307/1.3.0/1236/linux/x64/tar) uploadTestResults.withAWS({role=opensearch-test, roleAccount=AWS_ACCOUNT_PUBLIC, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure) - uploadTestResults.s3Upload({file=test-results, bucket=ARTIFACT_BUCKET_NAME, path=perf-test/1.3.0/1236/linux/x64/tar/test-results/307}) - BuildManifest.getArtifactRootUrl(test://artifact.url, perf-test) + uploadTestResults.s3Upload({file=test-results, bucket=ARTIFACT_BUCKET_NAME, path=307/1.3.0/1236/linux/x64/tar/test-results}) + BuildManifest.getArtifactRootUrl(test://artifact.url, 307) Messages.asBoolean() - Messages.add(test_stage, https://ci.opensearch.org/ci/dbc/test://artifact.url/1.3.0/perf-test/linux/x64/tar/test-results/) - uploadTestResults.writeFile({file=messages/test_stage.msg, text=https://ci.opensearch.org/ci/dbc/test://artifact.url/1.3.0/perf-test/linux/x64/tar/test-results/}) + Messages.add(test_stage, https://ci.opensearch.org/ci/dbc/test://artifact.url/1.3.0/307/linux/x64/tar/test-results/) + uploadTestResults.writeFile({file=messages/test_stage.msg, text=https://ci.opensearch.org/ci/dbc/test://artifact.url/1.3.0/307/linux/x64/tar/test-results/}) uploadTestResults.stash({includes=messages/*, name=messages-test_stage}) perf-test.postCleanup() postCleanup.cleanWs({disableDeferredWipeout=true, deleteDirs=true}) perf-test.node(Jenkins-Agent-AL2-X64-C54xlarge-Docker-Host, groovy.lang.Closure) perf-test.script(groovy.lang.Closure) Messages.asBoolean() - Messages.get([perf-test]) - perf-test.unstash({name=messages-perf-test}) + Messages.get([307]) + perf-test.unstash({name=messages-307}) perf-test.findFiles({excludes=, glob=messages/*}) perf-test.dir(messages, groovy.lang.Closure) perf-test.deleteDir() @@ -120,7 +120,7 @@ Performance tests without security for 1236 completed}) publishNotification.string({credentialsId=jenkins-integ-test-webhook, variable=WEBHOOK_URL}) publishNotification.withCredentials([WEBHOOK_URL], groovy.lang.Closure) publishNotification.sh(curl -XPOST --header "Content-Type: application/json" --data '{"result_text":":white_check_mark: -JOB_NAME=perf-test +JOB_NAME=307 BUILD_NUMBER=[307] MESSAGE=Performance Tests Successful BUILD_URL: test://artifact.url diff --git a/tests/jenkins/jenkinsjob-regression-files/release-tag/release-tag-dashboards.jenkinsfile.txt b/tests/jenkins/jenkinsjob-regression-files/release-tag/release-tag-dashboards.jenkinsfile.txt index a4a4edac0b..1e983c6957 100644 --- a/tests/jenkins/jenkinsjob-regression-files/release-tag/release-tag-dashboards.jenkinsfile.txt +++ b/tests/jenkins/jenkinsjob-regression-files/release-tag/release-tag-dashboards.jenkinsfile.txt @@ -10,7 +10,7 @@ release-tag.echo(The release distribution manifest is downloaded to tests/jenkins/data/opensearch-dashboards-bundle-2.0.0-rc1.yml) release-tag.createReleaseTag({distManifest=tests/jenkins/data/opensearch-dashboards-bundle-2.0.0-rc1.yml, tagVersion=2.0.0-rc1}) createReleaseTag.legacySCM(groovy.lang.Closure) - createReleaseTag.library({identifier=jenkins@20211123, retriever=null}) + createReleaseTag.library({identifier=jenkins@main, retriever=null}) createReleaseTag.readYaml({file=tests/jenkins/data/opensearch-dashboards-bundle-2.0.0-rc1.yml}) BundleManifest.asBoolean() BundleManifest.getNames() diff --git a/tests/jenkins/jenkinsjob-regression-files/release-tag/release-tag.jenkinsfile.txt b/tests/jenkins/jenkinsjob-regression-files/release-tag/release-tag.jenkinsfile.txt index 8f6ba5aaaa..ae6f52a493 100644 --- a/tests/jenkins/jenkinsjob-regression-files/release-tag/release-tag.jenkinsfile.txt +++ b/tests/jenkins/jenkinsjob-regression-files/release-tag/release-tag.jenkinsfile.txt @@ -10,7 +10,7 @@ release-tag.echo(The release distribution manifest is downloaded to tests/data/opensearch-build-1.1.0.yml) release-tag.createReleaseTag({distManifest=tests/data/opensearch-build-1.1.0.yml, tagVersion=1.1.0}) createReleaseTag.legacySCM(groovy.lang.Closure) - createReleaseTag.library({identifier=jenkins@20211123, retriever=null}) + createReleaseTag.library({identifier=jenkins@main, retriever=null}) createReleaseTag.readYaml({file=tests/data/opensearch-build-1.1.0.yml}) BundleManifest.asBoolean() BundleManifest.getNames() diff --git a/tests/jenkins/jobs/ArchiveAssembleUpload_Jenkinsfile b/tests/jenkins/jobs/ArchiveAssembleUpload_Jenkinsfile deleted file mode 100644 index 7728f595c6..0000000000 --- a/tests/jenkins/jobs/ArchiveAssembleUpload_Jenkinsfile +++ /dev/null @@ -1,18 +0,0 @@ -pipeline { - agent none - stages { - stage('assemble from archive') { - steps { - script { - archiveAssembleUpload( - inputManifest: 'tests/jenkins/data/opensearch-1.3.0.yml', - platform: 'linux', - architecture: 'x64', - distribution: 'tar', - stashName: 'test-stash-tar' - ) - } - } - } - } -} diff --git a/tests/jenkins/jobs/ArchiveAssembleUpload_Jenkinsfile.txt b/tests/jenkins/jobs/ArchiveAssembleUpload_Jenkinsfile.txt deleted file mode 100644 index 6909c43d72..0000000000 --- a/tests/jenkins/jobs/ArchiveAssembleUpload_Jenkinsfile.txt +++ /dev/null @@ -1,59 +0,0 @@ - ArchiveAssembleUpload_Jenkinsfile.run() - ArchiveAssembleUpload_Jenkinsfile.pipeline(groovy.lang.Closure) - ArchiveAssembleUpload_Jenkinsfile.echo(Executing on agent [label:none]) - ArchiveAssembleUpload_Jenkinsfile.stage(assemble from archive, groovy.lang.Closure) - ArchiveAssembleUpload_Jenkinsfile.script(groovy.lang.Closure) - ArchiveAssembleUpload_Jenkinsfile.archiveAssembleUpload({inputManifest=tests/jenkins/data/opensearch-1.3.0.yml, platform=linux, architecture=x64, distribution=tar, stashName=test-stash-tar}) - archiveAssembleUpload.legacySCM(groovy.lang.Closure) - archiveAssembleUpload.library({identifier=jenkins@20211123, retriever=null}) - archiveAssembleUpload.readYaml({file=tests/jenkins/data/opensearch-1.3.0.yml}) - InputManifest.asBoolean() - archiveAssembleUpload.echo(Unstashing test-stash-tar before starting the assemble process) - archiveAssembleUpload.unstash(test-stash-tar) - archiveAssembleUpload.echo(Assembling tests/jenkins/data/opensearch-1.3.0.yml) - archiveAssembleUpload.readYaml({file=tar/builds/opensearch/manifest.yml}) - BuildManifest.asBoolean() - archiveAssembleUpload.assembleUpload({inputManifest=tests/jenkins/data/opensearch-1.3.0.yml, platform=linux, architecture=x64, distribution=tar, stashName=test-stash-tar, buildManifest=tar/builds/opensearch/manifest.yml}) - assembleUpload.legacySCM(groovy.lang.Closure) - assembleUpload.library({identifier=jenkins@20211123, retriever=null}) - assembleUpload.assembleManifest({inputManifest=tests/jenkins/data/opensearch-1.3.0.yml, platform=linux, architecture=x64, distribution=tar, stashName=test-stash-tar, buildManifest=tar/builds/opensearch/manifest.yml}) - assembleManifest.legacySCM(groovy.lang.Closure) - assembleManifest.library({identifier=jenkins@20211123, retriever=null}) - assembleManifest.readYaml({file=tar/builds/opensearch/manifest.yml}) - BuildManifest.asBoolean() - BuildManifest.getArtifactRootUrlWithoutDistribution(https://ci.opensearch.org/dbc, vars-build, 33) - assembleManifest.sh(./assemble.sh "tar/builds/opensearch/manifest.yml" --base-url https://ci.opensearch.org/dbc/vars-build/1.3.0/33/linux/x64) - assembleUpload.uploadArtifacts({inputManifest=tests/jenkins/data/opensearch-1.3.0.yml, platform=linux, architecture=x64, distribution=tar, stashName=test-stash-tar, buildManifest=tar/builds/opensearch/manifest.yml}) - uploadArtifacts.legacySCM(groovy.lang.Closure) - uploadArtifacts.library({identifier=jenkins@20211123, retriever=null}) - uploadArtifacts.readYaml({file=tar/builds/opensearch/manifest.yml}) - BuildManifest.asBoolean() - BuildManifest.getMinArtifact() - BuildManifest.getArtifactRoot(vars-build, 33) - uploadArtifacts.string({credentialsId=jenkins-artifact-bucket-name, variable=ARTIFACT_BUCKET_NAME}) - uploadArtifacts.string({credentialsId=jenkins-artifact-production-bucket-name, variable=ARTIFACT_PRODUCTION_BUCKET_NAME}) - uploadArtifacts.string({credentialsId=jenkins-aws-production-account, variable=AWS_ACCOUNT_ARTIFACT}) - uploadArtifacts.string({credentialsId=jenkins-artifact-promotion-role, variable=ARTIFACT_PROMOTION_ROLE_NAME}) - uploadArtifacts.withCredentials([ARTIFACT_BUCKET_NAME, ARTIFACT_PRODUCTION_BUCKET_NAME, AWS_ACCOUNT_ARTIFACT, ARTIFACT_PROMOTION_ROLE_NAME], groovy.lang.Closure) - uploadArtifacts.echo(Uploading to s3://ARTIFACT_BUCKET_NAME/vars-build/1.3.0/33/linux/x64/tar) - uploadArtifacts.uploadToS3({sourcePath=tar/builds, bucket=ARTIFACT_BUCKET_NAME, path=vars-build/1.3.0/33/linux/x64/tar/builds}) - uploadToS3.string({credentialsId=jenkins-aws-account-public, variable=AWS_ACCOUNT_PUBLIC}) - uploadToS3.withCredentials([AWS_ACCOUNT_PUBLIC], groovy.lang.Closure) - uploadToS3.withAWS({role=opensearch-bundle, roleAccount=AWS_ACCOUNT_PUBLIC, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure) - uploadToS3.s3Upload({file=tar/builds, bucket=ARTIFACT_BUCKET_NAME, path=vars-build/1.3.0/33/linux/x64/tar/builds}) - uploadArtifacts.uploadToS3({sourcePath=tar/dist, bucket=ARTIFACT_BUCKET_NAME, path=vars-build/1.3.0/33/linux/x64/tar/dist}) - uploadToS3.string({credentialsId=jenkins-aws-account-public, variable=AWS_ACCOUNT_PUBLIC}) - uploadToS3.withCredentials([AWS_ACCOUNT_PUBLIC], groovy.lang.Closure) - uploadToS3.withAWS({role=opensearch-bundle, roleAccount=AWS_ACCOUNT_PUBLIC, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure) - uploadToS3.s3Upload({file=tar/dist, bucket=ARTIFACT_BUCKET_NAME, path=vars-build/1.3.0/33/linux/x64/tar/dist}) - uploadArtifacts.echo(Uploading to s3://ARTIFACT_PRODUCTION_BUCKET_NAME/vars-build/1.3.0/33/linux/x64/tar) - uploadArtifacts.withAWS({role=ARTIFACT_PROMOTION_ROLE_NAME, roleAccount=AWS_ACCOUNT_ARTIFACT, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure) - uploadArtifacts.s3Upload({file=tar/builds/opensearch/dist/opensearch-min-1.3.0-linux-x64.tar.gz, bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=release-candidates/core/opensearch/1.3.0/}) - uploadArtifacts.s3Upload({file=tar/dist/opensearch/opensearch-1.3.0-linux-x64.tar.gz, bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=release-candidates/bundle/opensearch/1.3.0/}) - BuildManifest.getArtifactRootUrl(https://ci.opensearch.org/dbc, vars-build, 33) - Messages.asBoolean() - Messages.add(stage, https://ci.opensearch.org/dbc/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/manifest.yml -https://ci.opensearch.org/dbc/vars-build/1.3.0/33/linux/x64/tar/dist/opensearch/manifest.yml) - uploadArtifacts.writeFile({file=messages/stage.msg, text=https://ci.opensearch.org/dbc/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/manifest.yml -https://ci.opensearch.org/dbc/vars-build/1.3.0/33/linux/x64/tar/dist/opensearch/manifest.yml}) - uploadArtifacts.stash({includes=messages/*, name=messages-stage}) diff --git a/tests/jenkins/jobs/AssembleManifest_rpm_Jenkinsfile b/tests/jenkins/jobs/AssembleManifest_rpm_Jenkinsfile deleted file mode 100644 index 9dc2c923ea..0000000000 --- a/tests/jenkins/jobs/AssembleManifest_rpm_Jenkinsfile +++ /dev/null @@ -1,19 +0,0 @@ -lib = library(identifier: 'jenkins@1.0.0', retriever: modernSCM([ - $class: 'GitSCMSource', - remote: 'https://github.com/opensearch-project/opensearch-build-libraries.git', -])) - -pipeline { - agent none - stages { - stage('assembleManifest rpm') { - steps { - script { - assembleManifest( - buildManifest: 'tests/data/opensearch-build-1.3.0-rpm.yml' - ) - } - } - } - } -} \ No newline at end of file diff --git a/tests/jenkins/jobs/AssembleManifest_rpm_Jenkinsfile.txt b/tests/jenkins/jobs/AssembleManifest_rpm_Jenkinsfile.txt deleted file mode 100644 index ab938f5107..0000000000 --- a/tests/jenkins/jobs/AssembleManifest_rpm_Jenkinsfile.txt +++ /dev/null @@ -1,108 +0,0 @@ - AssembleManifest_rpm_Jenkinsfile.run() - AssembleManifest_rpm_Jenkinsfile.modernSCM({$class=GitSCMSource, remote=https://github.com/opensearch-project/opensearch-build-libraries.git}) - AssembleManifest_rpm_Jenkinsfile.library({identifier=jenkins@1.0.0, retriever=null}) - AssembleManifest_rpm_Jenkinsfile.pipeline(groovy.lang.Closure) - AssembleManifest_rpm_Jenkinsfile.echo(Executing on agent [label:none]) - AssembleManifest_rpm_Jenkinsfile.stage(assembleManifest rpm, groovy.lang.Closure) - AssembleManifest_rpm_Jenkinsfile.script(groovy.lang.Closure) - AssembleManifest_rpm_Jenkinsfile.assembleManifest({buildManifest=tests/data/opensearch-build-1.3.0-rpm.yml}) - assembleManifest.legacySCM(groovy.lang.Closure) - assembleManifest.library({identifier=jenkins@20211123, retriever=null}) - assembleManifest.readYaml({file=tests/data/opensearch-build-1.3.0-rpm.yml}) - BuildManifest.asBoolean() - BuildManifest.getArtifactRootUrlWithoutDistribution(https://ci.opensearch.org/dbc, vars-build, 123) - assembleManifest.sh(./assemble.sh "tests/data/opensearch-build-1.3.0-rpm.yml" --base-url https://ci.opensearch.org/dbc/vars-build/1.3.0/123/linux/x64) - assembleManifest.signArtifacts({artifactPath=rpm/dist/opensearch, sigtype=.rpm, platform=linux}) - signArtifacts.string({credentialsId=jenkins-rpm-signing-account-number, variable=RPM_SIGNING_ACCOUNT_NUMBER}) - signArtifacts.string({credentialsId=jenkins-rpm-signing-passphrase-secrets-arn, variable=RPM_SIGNING_PASSPHRASE_SECRETS_ARN}) - signArtifacts.string({credentialsId=jenkins-rpm-signing-secret-key-secrets-arn, variable=RPM_SIGNING_SECRET_KEY_ID_SECRETS_ARN}) - signArtifacts.string({credentialsId=jenkins-rpm-signing-key-id, variable=RPM_SIGNING_KEY_ID}) - signArtifacts.withCredentials([RPM_SIGNING_ACCOUNT_NUMBER, RPM_SIGNING_PASSPHRASE_SECRETS_ARN, RPM_SIGNING_SECRET_KEY_ID_SECRETS_ARN, RPM_SIGNING_KEY_ID], groovy.lang.Closure) - signArtifacts.echo(RPM Add Sign) - signArtifacts.withAWS({role=jenkins-prod-rpm-signing-assume-role, roleAccount=RPM_SIGNING_ACCOUNT_NUMBER, duration=900, roleSessionName=jenkins-signing-session}, groovy.lang.Closure) - signArtifacts.sh( - set -e - set +x - - ARTIFACT_PATH="rpm/dist/opensearch" - - echo "------------------------------------------------------------------------" - echo "Check Utility Versions" - gpg_version_requirement="2.2.0" - rpm_version_requirement="4.13.0" # https://bugzilla.redhat.com/show_bug.cgi?id=227632 - - gpg_version_check=`gpg --version | head -n 1 | grep -oE '[0-9.]+'` - gpg_version_check_final=`echo $gpg_version_check $gpg_version_requirement | tr ' ' ' -' | sort -V | head -n 1` - rpm_version_check=`rpm --version | head -n 1 | grep -oE '[0-9.]+'` - rpm_version_check_final=`echo $rpm_version_check $rpm_version_requirement | tr ' ' ' -' | sort -V | head -n 1` - - echo -e "gpg_version_requirement gpg_version_check" - echo -e "$gpg_version_requirement $gpg_version_check" - echo -e "rpm_version_requirement rpm_version_check" - echo -e "$rpm_version_requirement $rpm_version_check" - - if [[ $gpg_version_requirement = $gpg_version_check_final ]] && [[ $rpm_version_requirement = $rpm_version_check_final ]]; then - echo "Utility version is equal or greater than set limit, continue." - else - echo "Utility version is lower than set limit, exit 1" - exit 1 - fi - - export GPG_TTY=`tty` - - echo "------------------------------------------------------------------------" - echo "Setup RPM Macros" - cp -v scripts/pkg/sign_templates/rpmmacros ~/.rpmmacros - sed -i "s/##key_name##/OpenSearch project/g;s/##passphrase_name##/passphrase/g" ~/.rpmmacros - - echo "------------------------------------------------------------------------" - echo "Import OpenSearch keys" - aws secretsmanager get-secret-value --region us-west-2 --secret-id "RPM_SIGNING_PASSPHRASE_SECRETS_ARN" | jq -r .SecretBinary | base64 --decode > passphrase - aws secretsmanager get-secret-value --region us-west-2 --secret-id "RPM_SIGNING_SECRET_KEY_ID_SECRETS_ARN" | jq -r .SecretBinary | base64 --decode | gpg --quiet --import --pinentry-mode loopback --passphrase-file passphrase - - - echo "------------------------------------------------------------------------" - echo "Start Signing Rpm" - - if file $ARTIFACT_PATH | grep -q directory; then - - echo "Sign directory" - for rpm_file in `ls $ARTIFACT_PATH`; do - if file $ARTIFACT_PATH/$rpm_file | grep -q RPM; then - rpm --addsign $ARTIFACT_PATH/$rpm_file - rpm -qip $ARTIFACT_PATH/$rpm_file | grep Signature - fi - done - - elif file $ARTIFACT_PATH | grep -q RPM; then - echo "Sign single rpm" - rpm --addsign $ARTIFACT_PATH - rpm -qip $ARTIFACT_PATH | grep Signature - - else - echo "This is neither a directory nor a RPM pkg, exit 1" - exit 1 - fi - - echo "------------------------------------------------------------------------" - echo "Clean up gpg" - gpg --batch --yes --delete-secret-keys RPM_SIGNING_KEY_ID - gpg --batch --yes --delete-keys RPM_SIGNING_KEY_ID - rm -v passphrase - - ) - assembleManifest.buildYumRepo({baseUrl=https://ci.opensearch.org/dbc/vars-build/1.3.0/123/linux/x64, buildManifest=tests/data/opensearch-build-1.3.0-rpm.yml}) - buildYumRepo.legacySCM(groovy.lang.Closure) - buildYumRepo.library({identifier=jenkins@20211123, retriever=null}) - buildYumRepo.readYaml({file=tests/data/opensearch-build-1.3.0-rpm.yml}) - BuildManifest.asBoolean() - buildYumRepo.echo(Create yum repo metadata and repo file tests/data/opensearch-build-1.3.0-rpm.yml) - buildYumRepo.sh(createrepo "rpm/dist/opensearch") - buildYumRepo.writeFile({file=rpm/dist/opensearch/opensearch-1.3.0.staging.repo, text=[opensearch-1.3.0-123-staging] -name=OpenSearch 1.3.0 123 Staging -baseurl=https://ci.opensearch.org/dbc/vars-build/1.3.0/123/linux/x64/rpm/dist/opensearch/ -enabled=1 -gpgcheck=0 -autorefresh=1 -type=rpm-md}) diff --git a/tests/jenkins/jobs/AssembleManifest_tar_Jenkinsfile b/tests/jenkins/jobs/AssembleManifest_tar_Jenkinsfile deleted file mode 100644 index b569de0f30..0000000000 --- a/tests/jenkins/jobs/AssembleManifest_tar_Jenkinsfile +++ /dev/null @@ -1,19 +0,0 @@ -lib = library(identifier: 'jenkins@1.0.0', retriever: modernSCM([ - $class: 'GitSCMSource', - remote: 'https://github.com/opensearch-project/opensearch-build-libraries.git', -])) - -pipeline { - agent none - stages { - stage('assembleManifest tar') { - steps { - script { - assembleManifest( - buildManifest: 'tests/data/opensearch-build-1.3.0.yml' - ) - } - } - } - } -} \ No newline at end of file diff --git a/tests/jenkins/jobs/AssembleManifest_tar_Jenkinsfile.txt b/tests/jenkins/jobs/AssembleManifest_tar_Jenkinsfile.txt deleted file mode 100644 index f7535c2cfb..0000000000 --- a/tests/jenkins/jobs/AssembleManifest_tar_Jenkinsfile.txt +++ /dev/null @@ -1,14 +0,0 @@ - AssembleManifest_tar_Jenkinsfile.run() - AssembleManifest_tar_Jenkinsfile.modernSCM({$class=GitSCMSource, remote=https://github.com/opensearch-project/opensearch-build-libraries.git}) - AssembleManifest_tar_Jenkinsfile.library({identifier=jenkins@1.0.0, retriever=null}) - AssembleManifest_tar_Jenkinsfile.pipeline(groovy.lang.Closure) - AssembleManifest_tar_Jenkinsfile.echo(Executing on agent [label:none]) - AssembleManifest_tar_Jenkinsfile.stage(assembleManifest tar, groovy.lang.Closure) - AssembleManifest_tar_Jenkinsfile.script(groovy.lang.Closure) - AssembleManifest_tar_Jenkinsfile.assembleManifest({buildManifest=tests/data/opensearch-build-1.3.0.yml}) - assembleManifest.legacySCM(groovy.lang.Closure) - assembleManifest.library({identifier=jenkins@20211123, retriever=null}) - assembleManifest.readYaml({file=tests/data/opensearch-build-1.3.0.yml}) - BuildManifest.asBoolean() - BuildManifest.getArtifactRootUrlWithoutDistribution(https://ci.opensearch.org/dbc, vars-build, 123) - assembleManifest.sh(./assemble.sh "tests/data/opensearch-build-1.3.0.yml" --base-url https://ci.opensearch.org/dbc/vars-build/1.3.0/123/linux/x64) diff --git a/tests/jenkins/jobs/AssembleUpload_Jenkinsfile b/tests/jenkins/jobs/AssembleUpload_Jenkinsfile deleted file mode 100644 index 36a236eb06..0000000000 --- a/tests/jenkins/jobs/AssembleUpload_Jenkinsfile +++ /dev/null @@ -1,14 +0,0 @@ -pipeline { - agent none - stages { - stage('assemble and upload') { - steps { - script { - assembleUpload( - buildManifest: 'tests/data/opensearch-build-1.1.0.yml', - ) - } - } - } - } -} diff --git a/tests/jenkins/jobs/AssembleUpload_Jenkinsfile.txt b/tests/jenkins/jobs/AssembleUpload_Jenkinsfile.txt deleted file mode 100644 index 0870027038..0000000000 --- a/tests/jenkins/jobs/AssembleUpload_Jenkinsfile.txt +++ /dev/null @@ -1,49 +0,0 @@ - AssembleUpload_Jenkinsfile.run() - AssembleUpload_Jenkinsfile.pipeline(groovy.lang.Closure) - AssembleUpload_Jenkinsfile.echo(Executing on agent [label:none]) - AssembleUpload_Jenkinsfile.stage(assemble and upload, groovy.lang.Closure) - AssembleUpload_Jenkinsfile.script(groovy.lang.Closure) - AssembleUpload_Jenkinsfile.assembleUpload({buildManifest=tests/data/opensearch-build-1.1.0.yml}) - assembleUpload.legacySCM(groovy.lang.Closure) - assembleUpload.library({identifier=jenkins@20211123, retriever=null}) - assembleUpload.assembleManifest({buildManifest=tests/data/opensearch-build-1.1.0.yml}) - assembleManifest.legacySCM(groovy.lang.Closure) - assembleManifest.library({identifier=jenkins@20211123, retriever=null}) - assembleManifest.readYaml({file=tests/data/opensearch-build-1.1.0.yml}) - BuildManifest.asBoolean() - BuildManifest.getArtifactRootUrlWithoutDistribution(https://ci.opensearch.org/dbc, vars-build, 33) - assembleManifest.sh(./assemble.sh "tests/data/opensearch-build-1.1.0.yml" --base-url https://ci.opensearch.org/dbc/vars-build/1.1.0/33/linux/x64) - assembleUpload.uploadArtifacts({buildManifest=tests/data/opensearch-build-1.1.0.yml}) - uploadArtifacts.legacySCM(groovy.lang.Closure) - uploadArtifacts.library({identifier=jenkins@20211123, retriever=null}) - uploadArtifacts.readYaml({file=tests/data/opensearch-build-1.1.0.yml}) - BuildManifest.asBoolean() - BuildManifest.getMinArtifact() - BuildManifest.getArtifactRoot(vars-build, 33) - uploadArtifacts.string({credentialsId=jenkins-artifact-bucket-name, variable=ARTIFACT_BUCKET_NAME}) - uploadArtifacts.string({credentialsId=jenkins-artifact-production-bucket-name, variable=ARTIFACT_PRODUCTION_BUCKET_NAME}) - uploadArtifacts.string({credentialsId=jenkins-aws-production-account, variable=AWS_ACCOUNT_ARTIFACT}) - uploadArtifacts.string({credentialsId=jenkins-artifact-promotion-role, variable=ARTIFACT_PROMOTION_ROLE_NAME}) - uploadArtifacts.withCredentials([ARTIFACT_BUCKET_NAME, ARTIFACT_PRODUCTION_BUCKET_NAME, AWS_ACCOUNT_ARTIFACT, ARTIFACT_PROMOTION_ROLE_NAME], groovy.lang.Closure) - uploadArtifacts.echo(Uploading to s3://ARTIFACT_BUCKET_NAME/vars-build/1.1.0/33/linux/x64/tar) - uploadArtifacts.uploadToS3({sourcePath=tar/builds, bucket=ARTIFACT_BUCKET_NAME, path=vars-build/1.1.0/33/linux/x64/tar/builds}) - uploadToS3.string({credentialsId=jenkins-aws-account-public, variable=AWS_ACCOUNT_PUBLIC}) - uploadToS3.withCredentials([AWS_ACCOUNT_PUBLIC], groovy.lang.Closure) - uploadToS3.withAWS({role=opensearch-bundle, roleAccount=AWS_ACCOUNT_PUBLIC, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure) - uploadToS3.s3Upload({file=tar/builds, bucket=ARTIFACT_BUCKET_NAME, path=vars-build/1.1.0/33/linux/x64/tar/builds}) - uploadArtifacts.uploadToS3({sourcePath=tar/dist, bucket=ARTIFACT_BUCKET_NAME, path=vars-build/1.1.0/33/linux/x64/tar/dist}) - uploadToS3.string({credentialsId=jenkins-aws-account-public, variable=AWS_ACCOUNT_PUBLIC}) - uploadToS3.withCredentials([AWS_ACCOUNT_PUBLIC], groovy.lang.Closure) - uploadToS3.withAWS({role=opensearch-bundle, roleAccount=AWS_ACCOUNT_PUBLIC, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure) - uploadToS3.s3Upload({file=tar/dist, bucket=ARTIFACT_BUCKET_NAME, path=vars-build/1.1.0/33/linux/x64/tar/dist}) - uploadArtifacts.echo(Uploading to s3://ARTIFACT_PRODUCTION_BUCKET_NAME/vars-build/1.1.0/33/linux/x64/tar) - uploadArtifacts.withAWS({role=ARTIFACT_PROMOTION_ROLE_NAME, roleAccount=AWS_ACCOUNT_ARTIFACT, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure) - uploadArtifacts.s3Upload({file=tar/builds/opensearch/dist/opensearch-min-1.1.0-linux-x64.tar.gz, bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=release-candidates/core/opensearch/1.1.0/}) - uploadArtifacts.s3Upload({file=tar/dist/opensearch/opensearch-1.1.0-linux-x64.tar.gz, bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=release-candidates/bundle/opensearch/1.1.0/}) - BuildManifest.getArtifactRootUrl(https://ci.opensearch.org/dbc, vars-build, 33) - Messages.asBoolean() - Messages.add(stage, https://ci.opensearch.org/dbc/vars-build/1.1.0/33/linux/x64/tar/builds/opensearch/manifest.yml -https://ci.opensearch.org/dbc/vars-build/1.1.0/33/linux/x64/tar/dist/opensearch/manifest.yml) - uploadArtifacts.writeFile({file=messages/stage.msg, text=https://ci.opensearch.org/dbc/vars-build/1.1.0/33/linux/x64/tar/builds/opensearch/manifest.yml -https://ci.opensearch.org/dbc/vars-build/1.1.0/33/linux/x64/tar/dist/opensearch/manifest.yml}) - uploadArtifacts.stash({includes=messages/*, name=messages-stage}) diff --git a/tests/jenkins/jobs/BuildArchive_Jenkinsfile b/tests/jenkins/jobs/BuildArchive_Jenkinsfile deleted file mode 100644 index 8b849755e6..0000000000 --- a/tests/jenkins/jobs/BuildArchive_Jenkinsfile +++ /dev/null @@ -1,18 +0,0 @@ -pipeline { - agent none - stages { - stage('build and archive') { - steps { - script { - buildArchive( - inputManifest: 'tests/jenkins/data/opensearch-1.3.0.yml', - platform: 'linux', - architecture: 'x64', - distribution: 'tar', - stashName: 'test-stash-tar' - ) - } - } - } - } -} diff --git a/tests/jenkins/jobs/BuildArchive_Jenkinsfile.txt b/tests/jenkins/jobs/BuildArchive_Jenkinsfile.txt deleted file mode 100644 index c6406534d8..0000000000 --- a/tests/jenkins/jobs/BuildArchive_Jenkinsfile.txt +++ /dev/null @@ -1,16 +0,0 @@ - BuildArchive_Jenkinsfile.run() - BuildArchive_Jenkinsfile.pipeline(groovy.lang.Closure) - BuildArchive_Jenkinsfile.echo(Executing on agent [label:none]) - BuildArchive_Jenkinsfile.stage(build and archive, groovy.lang.Closure) - BuildArchive_Jenkinsfile.script(groovy.lang.Closure) - BuildArchive_Jenkinsfile.buildArchive({inputManifest=tests/jenkins/data/opensearch-1.3.0.yml, platform=linux, architecture=x64, distribution=tar, stashName=test-stash-tar}) - buildArchive.legacySCM(groovy.lang.Closure) - buildArchive.library({identifier=jenkins@20211123, retriever=null}) - buildArchive.buildManifest({inputManifest=tests/jenkins/data/opensearch-1.3.0.yml, platform=linux, architecture=x64, distribution=tar, stashName=test-stash-tar}) - buildManifest.sh(./build.sh tests/jenkins/data/opensearch-1.3.0.yml -d tar -p linux -a x64) - buildArchive.echo(Stashing builds to assemble later with name: test-stash-tar) - buildArchive.stash({includes=tar/builds/**, name=test-stash-tar}) - Messages.asBoolean() - Messages.add(stage, Built stage.) - buildArchive.writeFile({file=messages/stage.msg, text=Built stage.}) - buildArchive.stash({includes=messages/*, name=messages-stage}) diff --git a/tests/jenkins/jobs/BuildAssembleUpload_Jenkinsfile b/tests/jenkins/jobs/BuildAssembleUpload_Jenkinsfile deleted file mode 100644 index 8df311b6fd..0000000000 --- a/tests/jenkins/jobs/BuildAssembleUpload_Jenkinsfile +++ /dev/null @@ -1,17 +0,0 @@ -pipeline { - agent none - stages { - stage('build and assemble') { - steps { - script { - buildAssembleUpload( - inputManifest: 'tests/jenkins/data/opensearch-1.3.0.yml', - platform: 'linux', - architecture: 'x64', - distribution: 'tar' - ) - } - } - } - } -} diff --git a/tests/jenkins/jobs/BuildAssembleUpload_Jenkinsfile.txt b/tests/jenkins/jobs/BuildAssembleUpload_Jenkinsfile.txt deleted file mode 100644 index f00e051369..0000000000 --- a/tests/jenkins/jobs/BuildAssembleUpload_Jenkinsfile.txt +++ /dev/null @@ -1,58 +0,0 @@ - BuildAssembleUpload_Jenkinsfile.run() - BuildAssembleUpload_Jenkinsfile.pipeline(groovy.lang.Closure) - BuildAssembleUpload_Jenkinsfile.echo(Executing on agent [label:none]) - BuildAssembleUpload_Jenkinsfile.stage(build and assemble, groovy.lang.Closure) - BuildAssembleUpload_Jenkinsfile.script(groovy.lang.Closure) - BuildAssembleUpload_Jenkinsfile.buildAssembleUpload({inputManifest=tests/jenkins/data/opensearch-1.3.0.yml, platform=linux, architecture=x64, distribution=tar}) - buildAssembleUpload.legacySCM(groovy.lang.Closure) - buildAssembleUpload.library({identifier=jenkins@20211123, retriever=null}) - buildAssembleUpload.readYaml({file=tests/jenkins/data/opensearch-1.3.0.yml}) - InputManifest.asBoolean() - buildAssembleUpload.buildManifest({inputManifest=tests/jenkins/data/opensearch-1.3.0.yml, platform=linux, architecture=x64, distribution=tar}) - buildManifest.sh(./build.sh tests/jenkins/data/opensearch-1.3.0.yml -d tar -p linux -a x64) - buildAssembleUpload.readYaml({file=tar/builds/opensearch/manifest.yml}) - BuildManifest.asBoolean() - buildAssembleUpload.assembleUpload({inputManifest=tests/jenkins/data/opensearch-1.3.0.yml, platform=linux, architecture=x64, distribution=tar, buildManifest=tar/builds/opensearch/manifest.yml}) - assembleUpload.legacySCM(groovy.lang.Closure) - assembleUpload.library({identifier=jenkins@20211123, retriever=null}) - assembleUpload.assembleManifest({inputManifest=tests/jenkins/data/opensearch-1.3.0.yml, platform=linux, architecture=x64, distribution=tar, buildManifest=tar/builds/opensearch/manifest.yml}) - assembleManifest.legacySCM(groovy.lang.Closure) - assembleManifest.library({identifier=jenkins@20211123, retriever=null}) - assembleManifest.readYaml({file=tar/builds/opensearch/manifest.yml}) - BuildManifest.asBoolean() - BuildManifest.getArtifactRootUrlWithoutDistribution(https://ci.opensearch.org/dbc, vars-build, 33) - assembleManifest.sh(./assemble.sh "tar/builds/opensearch/manifest.yml" --base-url https://ci.opensearch.org/dbc/vars-build/1.3.0/33/linux/x64) - assembleUpload.uploadArtifacts({inputManifest=tests/jenkins/data/opensearch-1.3.0.yml, platform=linux, architecture=x64, distribution=tar, buildManifest=tar/builds/opensearch/manifest.yml}) - uploadArtifacts.legacySCM(groovy.lang.Closure) - uploadArtifacts.library({identifier=jenkins@20211123, retriever=null}) - uploadArtifacts.readYaml({file=tar/builds/opensearch/manifest.yml}) - BuildManifest.asBoolean() - BuildManifest.getMinArtifact() - BuildManifest.getArtifactRoot(vars-build, 33) - uploadArtifacts.string({credentialsId=jenkins-artifact-bucket-name, variable=ARTIFACT_BUCKET_NAME}) - uploadArtifacts.string({credentialsId=jenkins-artifact-production-bucket-name, variable=ARTIFACT_PRODUCTION_BUCKET_NAME}) - uploadArtifacts.string({credentialsId=jenkins-aws-production-account, variable=AWS_ACCOUNT_ARTIFACT}) - uploadArtifacts.string({credentialsId=jenkins-artifact-promotion-role, variable=ARTIFACT_PROMOTION_ROLE_NAME}) - uploadArtifacts.withCredentials([ARTIFACT_BUCKET_NAME, ARTIFACT_PRODUCTION_BUCKET_NAME, AWS_ACCOUNT_ARTIFACT, ARTIFACT_PROMOTION_ROLE_NAME], groovy.lang.Closure) - uploadArtifacts.echo(Uploading to s3://artifact-bucket/vars-build/1.3.0/33/linux/x64/tar) - uploadArtifacts.uploadToS3({sourcePath=tar/builds, bucket=artifact-bucket, path=vars-build/1.3.0/33/linux/x64/tar/builds}) - uploadToS3.string({credentialsId=jenkins-aws-account-public, variable=AWS_ACCOUNT_PUBLIC}) - uploadToS3.withCredentials([AWS_ACCOUNT_PUBLIC], groovy.lang.Closure) - uploadToS3.withAWS({role=opensearch-bundle, roleAccount=account, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure) - uploadToS3.s3Upload({file=tar/builds, bucket=artifact-bucket, path=vars-build/1.3.0/33/linux/x64/tar/builds}) - uploadArtifacts.uploadToS3({sourcePath=tar/dist, bucket=artifact-bucket, path=vars-build/1.3.0/33/linux/x64/tar/dist}) - uploadToS3.string({credentialsId=jenkins-aws-account-public, variable=AWS_ACCOUNT_PUBLIC}) - uploadToS3.withCredentials([AWS_ACCOUNT_PUBLIC], groovy.lang.Closure) - uploadToS3.withAWS({role=opensearch-bundle, roleAccount=account, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure) - uploadToS3.s3Upload({file=tar/dist, bucket=artifact-bucket, path=vars-build/1.3.0/33/linux/x64/tar/dist}) - uploadArtifacts.echo(Uploading to s3://bucket/vars-build/1.3.0/33/linux/x64/tar) - uploadArtifacts.withAWS({role=role, roleAccount=dummy, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure) - uploadArtifacts.s3Upload({file=tar/builds/opensearch/dist/opensearch-min-1.3.0-linux-x64.tar.gz, bucket=bucket, path=release-candidates/core/opensearch/1.3.0/}) - uploadArtifacts.s3Upload({file=tar/dist/opensearch/opensearch-1.3.0-linux-x64.tar.gz, bucket=bucket, path=release-candidates/bundle/opensearch/1.3.0/}) - BuildManifest.getArtifactRootUrl(https://ci.opensearch.org/dbc, vars-build, 33) - Messages.asBoolean() - Messages.add(stage, https://ci.opensearch.org/dbc/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/manifest.yml -https://ci.opensearch.org/dbc/vars-build/1.3.0/33/linux/x64/tar/dist/opensearch/manifest.yml) - uploadArtifacts.writeFile({file=messages/stage.msg, text=https://ci.opensearch.org/dbc/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/manifest.yml -https://ci.opensearch.org/dbc/vars-build/1.3.0/33/linux/x64/tar/dist/opensearch/manifest.yml}) - uploadArtifacts.stash({includes=messages/*, name=messages-stage}) diff --git a/tests/jenkins/jobs/BuildDockerImage_Jenkinsfile b/tests/jenkins/jobs/BuildDockerImage_Jenkinsfile deleted file mode 100644 index f4b6e5c4cf..0000000000 --- a/tests/jenkins/jobs/BuildDockerImage_Jenkinsfile +++ /dev/null @@ -1,16 +0,0 @@ -pipeline { - agent none - stages { - stage('build docker image') { - steps { - script { - buildDockerImage( - inputManifest: 'tests/jenkins/data/opensearch-1.3.0.yml', - artifactUrlX64: env.ARTIFACT_URL_linux_x64, - artifactUrlArm64: env.ARTIFACT_URL_linux_arm64 - ) - } - } - } - } -} diff --git a/tests/jenkins/jobs/BuildDockerImage_Jenkinsfile_builds_both.txt b/tests/jenkins/jobs/BuildDockerImage_Jenkinsfile_builds_both.txt deleted file mode 100644 index f1c78a203f..0000000000 --- a/tests/jenkins/jobs/BuildDockerImage_Jenkinsfile_builds_both.txt +++ /dev/null @@ -1,19 +0,0 @@ - BuildDockerImage_Jenkinsfile.run() - BuildDockerImage_Jenkinsfile.pipeline(groovy.lang.Closure) - BuildDockerImage_Jenkinsfile.echo(Executing on agent [label:none]) - BuildDockerImage_Jenkinsfile.stage(build docker image, groovy.lang.Closure) - BuildDockerImage_Jenkinsfile.script(groovy.lang.Closure) - BuildDockerImage_Jenkinsfile.buildDockerImage({inputManifest=tests/jenkins/data/opensearch-1.3.0.yml, artifactUrlX64=opensearch.linux.x64, artifactUrlArm64=opensearch.linux.arm64}) - buildDockerImage.legacySCM(groovy.lang.Closure) - buildDockerImage.library({identifier=jenkins@20211123, retriever=null}) - buildDockerImage.readYaml({file=tests/jenkins/data/opensearch-1.3.0.yml}) - InputManifest.asBoolean() - buildDockerImage.echo(Trigger docker-build) - buildDockerImage.string({name=DOCKER_BUILD_GIT_REPOSITORY, value=https://github.com/opensearch-project/opensearch-build}) - buildDockerImage.string({name=DOCKER_BUILD_GIT_REPOSITORY_REFERENCE, value=main}) - buildDockerImage.string({name=DOCKER_BUILD_SCRIPT_WITH_COMMANDS, value=id && pwd && cd docker/release && curl -sSL opensearch.linux.x64 -o opensearch-x64.tgz && curl -sSL opensearch.linux.arm64 -o opensearch-arm64.tgz && bash build-image-multi-arch.sh -v 1.3.0 -f ./dockerfiles/opensearch.al2.dockerfile -p opensearch -a 'x64,arm64' -r opensearchstaging/opensearch -t 'opensearch-x64.tgz,opensearch-arm64.tgz' -n 33}) - buildDockerImage.build({job=docker-build, parameters=[null, null, null]}) - buildDockerImage.echo(Trigger docker create tag with build number) - buildDockerImage.echo(Trigger docker-scan for opensearch version 1.3.0) - buildDockerImage.string({name=IMAGE_FULL_NAME, value=opensearchstaging/opensearch:1.3.0}) - buildDockerImage.build({job=docker-scan, parameters=[null]}) diff --git a/tests/jenkins/jobs/BuildDockerImage_Jenkinsfile_skips_arm64.txt b/tests/jenkins/jobs/BuildDockerImage_Jenkinsfile_skips_arm64.txt deleted file mode 100644 index fab8619064..0000000000 --- a/tests/jenkins/jobs/BuildDockerImage_Jenkinsfile_skips_arm64.txt +++ /dev/null @@ -1,11 +0,0 @@ - BuildDockerImage_Jenkinsfile.run() - BuildDockerImage_Jenkinsfile.pipeline(groovy.lang.Closure) - BuildDockerImage_Jenkinsfile.echo(Executing on agent [label:none]) - BuildDockerImage_Jenkinsfile.stage(build docker image, groovy.lang.Closure) - BuildDockerImage_Jenkinsfile.script(groovy.lang.Closure) - BuildDockerImage_Jenkinsfile.buildDockerImage({inputManifest=tests/jenkins/data/opensearch-1.3.0.yml, artifactUrlX64=opensearch.linux.x64, artifactUrlArm64=null}) - buildDockerImage.legacySCM(groovy.lang.Closure) - buildDockerImage.library({identifier=jenkins@20211123, retriever=null}) - buildDockerImage.readYaml({file=tests/jenkins/data/opensearch-1.3.0.yml}) - InputManifest.asBoolean() - buildDockerImage.echo(Skipping docker build, one of x64 or arm64 artifacts was not built.) diff --git a/tests/jenkins/jobs/BuildDockerImage_Jenkinsfile_skips_both.txt b/tests/jenkins/jobs/BuildDockerImage_Jenkinsfile_skips_both.txt deleted file mode 100644 index 808d78a7b2..0000000000 --- a/tests/jenkins/jobs/BuildDockerImage_Jenkinsfile_skips_both.txt +++ /dev/null @@ -1,11 +0,0 @@ - BuildDockerImage_Jenkinsfile.run() - BuildDockerImage_Jenkinsfile.pipeline(groovy.lang.Closure) - BuildDockerImage_Jenkinsfile.echo(Executing on agent [label:none]) - BuildDockerImage_Jenkinsfile.stage(build docker image, groovy.lang.Closure) - BuildDockerImage_Jenkinsfile.script(groovy.lang.Closure) - BuildDockerImage_Jenkinsfile.buildDockerImage({inputManifest=tests/jenkins/data/opensearch-1.3.0.yml, artifactUrlX64=null, artifactUrlArm64=null}) - buildDockerImage.legacySCM(groovy.lang.Closure) - buildDockerImage.library({identifier=jenkins@20211123, retriever=null}) - buildDockerImage.readYaml({file=tests/jenkins/data/opensearch-1.3.0.yml}) - InputManifest.asBoolean() - buildDockerImage.echo(Skipping docker build, one of x64 or arm64 artifacts was not built.) diff --git a/tests/jenkins/jobs/BuildDockerImage_Jenkinsfile_skips_x64.txt b/tests/jenkins/jobs/BuildDockerImage_Jenkinsfile_skips_x64.txt deleted file mode 100644 index 9ed3a5c498..0000000000 --- a/tests/jenkins/jobs/BuildDockerImage_Jenkinsfile_skips_x64.txt +++ /dev/null @@ -1,11 +0,0 @@ - BuildDockerImage_Jenkinsfile.run() - BuildDockerImage_Jenkinsfile.pipeline(groovy.lang.Closure) - BuildDockerImage_Jenkinsfile.echo(Executing on agent [label:none]) - BuildDockerImage_Jenkinsfile.stage(build docker image, groovy.lang.Closure) - BuildDockerImage_Jenkinsfile.script(groovy.lang.Closure) - BuildDockerImage_Jenkinsfile.buildDockerImage({inputManifest=tests/jenkins/data/opensearch-1.3.0.yml, artifactUrlX64=null, artifactUrlArm64=opensearch.linux.arm64}) - buildDockerImage.legacySCM(groovy.lang.Closure) - buildDockerImage.library({identifier=jenkins@20211123, retriever=null}) - buildDockerImage.readYaml({file=tests/jenkins/data/opensearch-1.3.0.yml}) - InputManifest.asBoolean() - buildDockerImage.echo(Skipping docker build, one of x64 or arm64 artifacts was not built.) diff --git a/tests/jenkins/jobs/BuildDockerImage_Qualifier_Jenkinsfile b/tests/jenkins/jobs/BuildDockerImage_Qualifier_Jenkinsfile deleted file mode 100644 index a54e8c6708..0000000000 --- a/tests/jenkins/jobs/BuildDockerImage_Qualifier_Jenkinsfile +++ /dev/null @@ -1,16 +0,0 @@ -pipeline { - agent none - stages { - stage('build docker image') { - steps { - script { - buildDockerImage( - inputManifest: 'tests/jenkins/data/opensearch-2.0.0.yml', - artifactUrlX64: env.ARTIFACT_URL_linux_x64, - artifactUrlArm64: env.ARTIFACT_URL_linux_arm64 - ) - } - } - } - } -} diff --git a/tests/jenkins/jobs/BuildDockerImage_Qualifier_Jenkinsfile_builds_both.txt b/tests/jenkins/jobs/BuildDockerImage_Qualifier_Jenkinsfile_builds_both.txt deleted file mode 100644 index 3f4fbdf7e0..0000000000 --- a/tests/jenkins/jobs/BuildDockerImage_Qualifier_Jenkinsfile_builds_both.txt +++ /dev/null @@ -1,19 +0,0 @@ - BuildDockerImage_Qualifier_Jenkinsfile.run() - BuildDockerImage_Qualifier_Jenkinsfile.pipeline(groovy.lang.Closure) - BuildDockerImage_Qualifier_Jenkinsfile.echo(Executing on agent [label:none]) - BuildDockerImage_Qualifier_Jenkinsfile.stage(build docker image, groovy.lang.Closure) - BuildDockerImage_Qualifier_Jenkinsfile.script(groovy.lang.Closure) - BuildDockerImage_Qualifier_Jenkinsfile.buildDockerImage({inputManifest=tests/jenkins/data/opensearch-2.0.0.yml, artifactUrlX64=opensearch.linux.x64, artifactUrlArm64=opensearch.linux.arm64}) - buildDockerImage.legacySCM(groovy.lang.Closure) - buildDockerImage.library({identifier=jenkins@20211123, retriever=null}) - buildDockerImage.readYaml({file=tests/jenkins/data/opensearch-2.0.0.yml}) - InputManifest.asBoolean() - buildDockerImage.echo(Trigger docker-build) - buildDockerImage.string({name=DOCKER_BUILD_GIT_REPOSITORY, value=https://github.com/opensearch-project/opensearch-build}) - buildDockerImage.string({name=DOCKER_BUILD_GIT_REPOSITORY_REFERENCE, value=main}) - buildDockerImage.string({name=DOCKER_BUILD_SCRIPT_WITH_COMMANDS, value=id && pwd && cd docker/release && curl -sSL opensearch.linux.x64 -o opensearch-x64.tgz && curl -sSL opensearch.linux.arm64 -o opensearch-arm64.tgz && bash build-image-multi-arch.sh -v 2.0.0-alpha1 -f ./dockerfiles/opensearch.al2.dockerfile -p opensearch -a 'x64,arm64' -r opensearchstaging/opensearch -t 'opensearch-x64.tgz,opensearch-arm64.tgz' -n 33}) - buildDockerImage.build({job=docker-build, parameters=[null, null, null]}) - buildDockerImage.echo(Trigger docker create tag with build number) - buildDockerImage.echo(Trigger docker-scan for opensearch version 2.0.0) - buildDockerImage.string({name=IMAGE_FULL_NAME, value=opensearchstaging/opensearch:2.0.0}) - buildDockerImage.build({job=docker-scan, parameters=[null]}) diff --git a/tests/jenkins/jobs/BuildFailureMessage_Jenkinsfile b/tests/jenkins/jobs/BuildFailureMessage_Jenkinsfile deleted file mode 100644 index 83fcccb273..0000000000 --- a/tests/jenkins/jobs/BuildFailureMessage_Jenkinsfile +++ /dev/null @@ -1,19 +0,0 @@ -pipeline { - agent none - stages { - stage('notify') { - steps { - script { - try { - buildFailureMessage() - currentBuild.result = 'SUCCESS' - } catch (Exception err) { -//https://github.com/jenkinsci/JenkinsPipelineUnit/issues/509 - currentBuild.result = 'SUCCESS' - } - } - } - } - } -} - diff --git a/tests/jenkins/jobs/BuildFailureMessage_Jenkinsfile.txt b/tests/jenkins/jobs/BuildFailureMessage_Jenkinsfile.txt deleted file mode 100644 index 4d087bbdf5..0000000000 --- a/tests/jenkins/jobs/BuildFailureMessage_Jenkinsfile.txt +++ /dev/null @@ -1,6 +0,0 @@ - BuildFailureMessage_Jenkinsfile.run() - BuildFailureMessage_Jenkinsfile.pipeline(groovy.lang.Closure) - BuildFailureMessage_Jenkinsfile.echo(Executing on agent [label:none]) - BuildFailureMessage_Jenkinsfile.stage(notify, groovy.lang.Closure) - BuildFailureMessage_Jenkinsfile.script(groovy.lang.Closure) - BuildFailureMessage_Jenkinsfile.buildFailureMessage() diff --git a/tests/jenkins/jobs/BuildInfoYaml_Jenkinsfile b/tests/jenkins/jobs/BuildInfoYaml_Jenkinsfile deleted file mode 100644 index a75cca934f..0000000000 --- a/tests/jenkins/jobs/BuildInfoYaml_Jenkinsfile +++ /dev/null @@ -1,47 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -pipeline { - agent none - stages { - stage('Initialize the buildInfoYaml report') { - steps { - script { - buildInfoYaml( - componentName: "", - inputManifest: "tests/jenkins/data/opensearch-2.2.0.yml", - outputFile: "tests/jenkins/data/buildInfo.yml", - status: "NOT_STARTED", - stage: "INITIALIZE_STAGE" - ) - buildInfoYaml( - componentName: "", - inputManifest: "tests/jenkins/data/buildInfo.yml", - outputFile: "tests/jenkins/data/buildInfo.yml", - status: "SUCCESS", - stage: "x64_tar" - ) - buildInfoYaml( - componentName: "", - inputManifest: "tests/jenkins/data/buildInfo.yml", - outputFile: "tests/jenkins/data/buildInfo.yml", - status: "6", - stage: "integ_test_x64" - ) - buildInfoYaml( - componentName: "", - inputManifest: "tests/jenkins/data/buildInfo.yml", - outputFile: "tests/jenkins/data/buildInfo.yml", - status: "SUCCESS", - stage: "FINALIZE_STAGE" - ) - } - } - } - } -} diff --git a/tests/jenkins/jobs/BuildInfoYaml_Jenkinsfile.txt b/tests/jenkins/jobs/BuildInfoYaml_Jenkinsfile.txt deleted file mode 100644 index 5276261040..0000000000 --- a/tests/jenkins/jobs/BuildInfoYaml_Jenkinsfile.txt +++ /dev/null @@ -1,108 +0,0 @@ - BuildInfoYaml_Jenkinsfile.run() - BuildInfoYaml_Jenkinsfile.pipeline(groovy.lang.Closure) - BuildInfoYaml_Jenkinsfile.echo(Executing on agent [label:none]) - BuildInfoYaml_Jenkinsfile.stage(Initialize the buildInfoYaml report, groovy.lang.Closure) - BuildInfoYaml_Jenkinsfile.script(groovy.lang.Closure) - BuildInfoYaml_Jenkinsfile.buildInfoYaml({componentName=, inputManifest=tests/jenkins/data/opensearch-2.2.0.yml, outputFile=tests/jenkins/data/buildInfo.yml, status=NOT_STARTED, stage=INITIALIZE_STAGE}) - buildInfoYaml.unstash(buildInfo_yml) - buildInfoYaml.echo(No buildInfo.yml exists in stashed. Starting initialize the buildInfo yaml file.) - buildInfoYaml.readYaml({file=tests/jenkins/data/opensearch-2.2.0.yml}) - buildInfoYaml.echo(The status is NOT_STARTED) - buildInfoYaml.echo(Components is ) - buildInfoYaml.echo(Components parameter is null) - buildInfoYaml.echo([OpenSearch, common-utils, job-scheduler, ml-commons, performance-analyzer, security, geospatial, k-NN, cross-cluster-replication, notifications-core, notifications, anomaly-detection, asynchronous-search, alerting, index-management, sql, opensearch-observability, dashboards-reports]) - buildInfoYaml.echo(Initiate the build info yaml file.) - buildInfoYaml.writeYaml({file=buildInfo.yml, data={schema-version=1.0, build={name=OpenSearch, version=2.2.0, status=IN_PROGRESS, number=123}, ci={image={name=opensearchstaging/ci-runner:ci-runner-centos7-opensearch-build-v2, args=-e JAVA_HOME=/opt/java/openjdk-17}}, components=[{name=OpenSearch, repository=https://github.com/opensearch-project/OpenSearch.git, ref=2.2, checks=[gradle:publish, gradle:properties:version]}, {name=common-utils, repository=https://github.com/opensearch-project/common-utils.git, ref=2.x, platforms=[linux], checks=[gradle:publish, gradle:properties:version]}, {name=job-scheduler, repository=https://github.com/opensearch-project/job-scheduler.git, ref=2.2, platforms=[linux], checks=[gradle:properties:version, gradle:dependencies:opensearch.version]}, {name=ml-commons, repository=https://github.com/opensearch-project/ml-commons.git, ref=2.2, platforms=[linux], checks=[gradle:properties:version, {gradle:dependencies:opensearch.version=opensearch-ml-plugin}]}, {name=performance-analyzer, repository=https://github.com/opensearch-project/performance-analyzer.git, ref=2.2, platforms=[linux], checks=[gradle:properties:version, gradle:dependencies:opensearch.version]}, {name=security, repository=https://github.com/opensearch-project/security.git, ref=2.2, platforms=[linux]}, {name=geospatial, repository=https://github.com/opensearch-project/geospatial.git, ref=2.2, platforms=[linux], checks=[gradle:properties:version, gradle:dependencies:opensearch.version]}, {name=k-NN, repository=https://github.com/opensearch-project/k-NN.git, ref=2.2, platforms=[linux], checks=[gradle:properties:version, gradle:dependencies:opensearch.version]}, {name=cross-cluster-replication, repository=https://github.com/opensearch-project/cross-cluster-replication.git, ref=2.2, platforms=[linux], checks=[gradle:properties:version, gradle:dependencies:opensearch.version]}, {name=notifications-core, repository=https://github.com/opensearch-project/notifications.git, ref=2.2, platforms=[linux], working_directory=notifications, checks=[gradle:properties:version, {gradle:dependencies:opensearch.version=opensearch-notifications-core}]}, {name=notifications, repository=https://github.com/opensearch-project/notifications.git, ref=2.2, platforms=[linux], working_directory=notifications, checks=[gradle:properties:version, {gradle:dependencies:opensearch.version=notifications}]}, {name=anomaly-detection, repository=https://github.com/opensearch-project/anomaly-detection.git, ref=2.2, platforms=[linux], checks=[gradle:properties:version, gradle:dependencies:opensearch.version]}, {name=asynchronous-search, repository=https://github.com/opensearch-project/asynchronous-search.git, ref=2.2, platforms=[linux], checks=[gradle:properties:version, gradle:dependencies:opensearch.version]}, {name=alerting, repository=https://github.com/opensearch-project/alerting.git, ref=2.2, platforms=[linux], checks=[gradle:properties:version, {gradle:dependencies:opensearch.version=alerting}]}, {name=index-management, repository=https://github.com/opensearch-project/index-management.git, ref=2.2, platforms=[linux], checks=[gradle:properties:version]}, {name=sql, repository=https://github.com/opensearch-project/sql.git, ref=2.2, platforms=[linux], checks=[gradle:properties:version, {gradle:dependencies:opensearch.version=opensearch-sql-plugin}]}, {name=opensearch-observability, repository=https://github.com/opensearch-project/observability, ref=2.2, platforms=[linux], working_directory=opensearch-observability, checks=[gradle:properties:version, gradle:dependencies:opensearch.version]}, {name=dashboards-reports, repository=https://github.com/opensearch-project/dashboards-reports.git, ref=2.2, platforms=[linux], working_directory=reports-scheduler, checks=[gradle:properties:version, gradle:dependencies:opensearch.version]}], results={startTimestamp=1}}, overwrite=true}) - buildInfoYaml.sh(cat buildInfo.yml) - buildInfoYaml.stash({includes=buildInfo.yml, name=buildInfo_yml}) - BuildInfoYaml_Jenkinsfile.buildInfoYaml({componentName=, inputManifest=tests/jenkins/data/buildInfo.yml, outputFile=tests/jenkins/data/buildInfo.yml, status=SUCCESS, stage=x64_tar}) - buildInfoYaml.unstash(buildInfo_yml) - buildInfoYaml.echo(No buildInfo.yml exists in stashed. Starting initialize the buildInfo yaml file.) - buildInfoYaml.readYaml({file=tests/jenkins/data/buildInfo.yml}) - buildInfoYaml.echo(The status is SUCCESS) - buildInfoYaml.echo(Components is ) - buildInfoYaml.echo(Components parameter is null) - buildInfoYaml.echo([OpenSearch, common-utils, job-scheduler, ml-commons, performance-analyzer, security, geospatial, k-NN, cross-cluster-replication, notifications-core, notifications, anomaly-detection, asynchronous-search, alerting, index-management, sql, opensearch-observability, dashboards-reports]) - buildInfoYaml.echo(stage is x64_tar) - buildInfoYaml.echo(status is SUCCESS) - buildInfoYaml.writeYaml({file=buildInfo.yml, data={schema-version=1.0, build={name=OpenSearch, version=2.2.0, status=SUCCESS, number=30}, ci={image={name=opensearchstaging/ci-runner:ci-runner-centos7-opensearch-build-v2, args=-e JAVA_HOME=/opt/java/openjdk-17}}, components=[{name=OpenSearch, repository=https://github.com/opensearch-project/OpenSearch.git, ref=b1017fa3b9a1c781d4f34ecee411e0cdf930a515, checks=[gradle:publish, gradle:properties:version]}, {name=common-utils, repository=https://github.com/opensearch-project/common-utils.git, ref=ae064c5668f3d46ba8f47ad6e7ea23a14ede557b, platforms=[linux], checks=[gradle:publish, gradle:properties:version]}, {name=job-scheduler, repository=https://github.com/opensearch-project/job-scheduler.git, ref=a5013073ec8de9b7af6fa439c2f4d6fd9af8881d, platforms=[linux], checks=[gradle:properties:version, gradle:dependencies:opensearch.version]}, {name=ml-commons, repository=https://github.com/opensearch-project/ml-commons.git, ref=a7d269500f8667fdd4cd4d582c7148a7e7fb557c, platforms=[linux], checks=[gradle:properties:version, {gradle:dependencies:opensearch.version=opensearch-ml-plugin}]}, {name=performance-analyzer, repository=https://github.com/opensearch-project/performance-analyzer.git, ref=3a75d7d5a6302b3c9fd78fb7104f90689d407484, platforms=[linux], checks=[gradle:properties:version, gradle:dependencies:opensearch.version]}, {name=security, repository=https://github.com/opensearch-project/security.git, ref=ff17b025d15793d600f4b31d6dd4bbde97030f39, platforms=[linux]}, {name=geospatial, repository=https://github.com/opensearch-project/geospatial.git, ref=a71475ab3b0de008ca352e290d99fb3b53f1a1c5, platforms=[linux], checks=[gradle:properties:version, gradle:dependencies:opensearch.version]}, {name=k-NN, repository=https://github.com/opensearch-project/k-NN.git, ref=53185a0f165ebe1f8c3e01fd80a867727ba3674f, platforms=[linux], checks=[gradle:properties:version, gradle:dependencies:opensearch.version]}, {name=cross-cluster-replication, repository=https://github.com/opensearch-project/cross-cluster-replication.git, ref=719634b60056e48e35cccba1f1ed3a0a43bb90e5, platforms=[linux], checks=[gradle:properties:version, gradle:dependencies:opensearch.version]}, {name=notifications-core, repository=https://github.com/opensearch-project/notifications.git, ref=01b4aa8886b4bb8faabf482bf9f4baaa441015fe, platforms=[linux], working_directory=notifications, checks=[gradle:properties:version, {gradle:dependencies:opensearch.version=opensearch-notifications-core}]}, {name=notifications, repository=https://github.com/opensearch-project/notifications.git, ref=01b4aa8886b4bb8faabf482bf9f4baaa441015fe, platforms=[linux], working_directory=notifications, checks=[gradle:properties:version, {gradle:dependencies:opensearch.version=notifications}]}, {name=anomaly-detection, repository=https://github.com/opensearch-project/anomaly-detection.git, ref=04f27418fe97110635b08dd986d77ce0ecc384ec, platforms=[linux], checks=[gradle:properties:version, gradle:dependencies:opensearch.version]}, {name=asynchronous-search, repository=https://github.com/opensearch-project/asynchronous-search.git, ref=4f1f992c6bb134dab191042a87216f1616be8a27, platforms=[linux], checks=[gradle:properties:version, gradle:dependencies:opensearch.version]}, {name=alerting, repository=https://github.com/opensearch-project/alerting.git, ref=b3d676f70b0df8df9cab0919a147ed395c568797, platforms=[linux], checks=[gradle:properties:version, {gradle:dependencies:opensearch.version=alerting}]}, {name=index-management, repository=https://github.com/opensearch-project/index-management.git, ref=8eb5da6b0317506ee0160ddbbc53a14550cbcd5d, platforms=[linux], checks=[gradle:properties:version]}, {name=sql, repository=https://github.com/opensearch-project/sql.git, ref=454122d3c73dcf8944800720e2116fd6540d3b26, platforms=[linux], checks=[gradle:properties:version, {gradle:dependencies:opensearch.version=opensearch-sql-plugin}]}, {name=opensearch-observability, repository=https://github.com/opensearch-project/observability, ref=4055decd159c2cff401b43006f6ccba73e6f67b6, platforms=[linux], working_directory=opensearch-observability, checks=[gradle:properties:version, gradle:dependencies:opensearch.version]}, {name=dashboards-reports, repository=https://github.com/opensearch-project/dashboards-reports.git, ref=1d3980ab2d93a89acd0a5716f575a222389b9e8d, platforms=[linux], working_directory=reports-scheduler, checks=[gradle:properties:version, gradle:dependencies:opensearch.version]}], results={integ_test_x64=NOT_STARTED, bwc_test_x64=NOT_STARTED, integ_test_arm64=NOT_STARTED, bwc_test_arm64=NOT_STARTED, duration=154442, startTimestamp=1660345758679, x64_tar=SUCCESS}}, overwrite=true}) - buildInfoYaml.sh(cat buildInfo.yml) - buildInfoYaml.stash({includes=buildInfo.yml, name=buildInfo_yml}) - BuildInfoYaml_Jenkinsfile.buildInfoYaml({componentName=, inputManifest=tests/jenkins/data/buildInfo.yml, outputFile=tests/jenkins/data/buildInfo.yml, status=6, stage=integ_test_x64}) - buildInfoYaml.unstash(buildInfo_yml) - buildInfoYaml.echo(No buildInfo.yml exists in stashed. Starting initialize the buildInfo yaml file.) - buildInfoYaml.readYaml({file=tests/jenkins/data/buildInfo.yml}) - buildInfoYaml.echo(The status is 6) - buildInfoYaml.echo(Components is ) - buildInfoYaml.echo(Components parameter is null) - buildInfoYaml.echo([OpenSearch, common-utils, job-scheduler, ml-commons, performance-analyzer, security, geospatial, k-NN, cross-cluster-replication, notifications-core, notifications, anomaly-detection, asynchronous-search, alerting, index-management, sql, opensearch-observability, dashboards-reports]) - buildInfoYaml.echo(stage is integ_test_x64) - buildInfoYaml.echo(status is 6) - buildInfoYaml.writeYaml({file=buildInfo.yml, data={schema-version=1.0, build={name=OpenSearch, version=2.2.0, status=SUCCESS, number=30}, ci={image={name=opensearchstaging/ci-runner:ci-runner-centos7-opensearch-build-v2, args=-e JAVA_HOME=/opt/java/openjdk-17}}, components=[{name=OpenSearch, repository=https://github.com/opensearch-project/OpenSearch.git, ref=b1017fa3b9a1c781d4f34ecee411e0cdf930a515, checks=[gradle:publish, gradle:properties:version]}, {name=common-utils, repository=https://github.com/opensearch-project/common-utils.git, ref=ae064c5668f3d46ba8f47ad6e7ea23a14ede557b, platforms=[linux], checks=[gradle:publish, gradle:properties:version]}, {name=job-scheduler, repository=https://github.com/opensearch-project/job-scheduler.git, ref=a5013073ec8de9b7af6fa439c2f4d6fd9af8881d, platforms=[linux], checks=[gradle:properties:version, gradle:dependencies:opensearch.version]}, {name=ml-commons, repository=https://github.com/opensearch-project/ml-commons.git, ref=a7d269500f8667fdd4cd4d582c7148a7e7fb557c, platforms=[linux], checks=[gradle:properties:version, {gradle:dependencies:opensearch.version=opensearch-ml-plugin}]}, {name=performance-analyzer, repository=https://github.com/opensearch-project/performance-analyzer.git, ref=3a75d7d5a6302b3c9fd78fb7104f90689d407484, platforms=[linux], checks=[gradle:properties:version, gradle:dependencies:opensearch.version]}, {name=security, repository=https://github.com/opensearch-project/security.git, ref=ff17b025d15793d600f4b31d6dd4bbde97030f39, platforms=[linux]}, {name=geospatial, repository=https://github.com/opensearch-project/geospatial.git, ref=a71475ab3b0de008ca352e290d99fb3b53f1a1c5, platforms=[linux], checks=[gradle:properties:version, gradle:dependencies:opensearch.version]}, {name=k-NN, repository=https://github.com/opensearch-project/k-NN.git, ref=53185a0f165ebe1f8c3e01fd80a867727ba3674f, platforms=[linux], checks=[gradle:properties:version, gradle:dependencies:opensearch.version]}, {name=cross-cluster-replication, repository=https://github.com/opensearch-project/cross-cluster-replication.git, ref=719634b60056e48e35cccba1f1ed3a0a43bb90e5, platforms=[linux], checks=[gradle:properties:version, gradle:dependencies:opensearch.version]}, {name=notifications-core, repository=https://github.com/opensearch-project/notifications.git, ref=01b4aa8886b4bb8faabf482bf9f4baaa441015fe, platforms=[linux], working_directory=notifications, checks=[gradle:properties:version, {gradle:dependencies:opensearch.version=opensearch-notifications-core}]}, {name=notifications, repository=https://github.com/opensearch-project/notifications.git, ref=01b4aa8886b4bb8faabf482bf9f4baaa441015fe, platforms=[linux], working_directory=notifications, checks=[gradle:properties:version, {gradle:dependencies:opensearch.version=notifications}]}, {name=anomaly-detection, repository=https://github.com/opensearch-project/anomaly-detection.git, ref=04f27418fe97110635b08dd986d77ce0ecc384ec, platforms=[linux], checks=[gradle:properties:version, gradle:dependencies:opensearch.version]}, {name=asynchronous-search, repository=https://github.com/opensearch-project/asynchronous-search.git, ref=4f1f992c6bb134dab191042a87216f1616be8a27, platforms=[linux], checks=[gradle:properties:version, gradle:dependencies:opensearch.version]}, {name=alerting, repository=https://github.com/opensearch-project/alerting.git, ref=b3d676f70b0df8df9cab0919a147ed395c568797, platforms=[linux], checks=[gradle:properties:version, {gradle:dependencies:opensearch.version=alerting}]}, {name=index-management, repository=https://github.com/opensearch-project/index-management.git, ref=8eb5da6b0317506ee0160ddbbc53a14550cbcd5d, platforms=[linux], checks=[gradle:properties:version]}, {name=sql, repository=https://github.com/opensearch-project/sql.git, ref=454122d3c73dcf8944800720e2116fd6540d3b26, platforms=[linux], checks=[gradle:properties:version, {gradle:dependencies:opensearch.version=opensearch-sql-plugin}]}, {name=opensearch-observability, repository=https://github.com/opensearch-project/observability, ref=4055decd159c2cff401b43006f6ccba73e6f67b6, platforms=[linux], working_directory=opensearch-observability, checks=[gradle:properties:version, gradle:dependencies:opensearch.version]}, {name=dashboards-reports, repository=https://github.com/opensearch-project/dashboards-reports.git, ref=1d3980ab2d93a89acd0a5716f575a222389b9e8d, platforms=[linux], working_directory=reports-scheduler, checks=[gradle:properties:version, gradle:dependencies:opensearch.version]}], results={integ_test_x64=6, bwc_test_x64=NOT_STARTED, integ_test_arm64=NOT_STARTED, bwc_test_arm64=NOT_STARTED, duration=154442, startTimestamp=1660345758679}}, overwrite=true}) - buildInfoYaml.sh(cat buildInfo.yml) - buildInfoYaml.stash({includes=buildInfo.yml, name=buildInfo_yml}) - BuildInfoYaml_Jenkinsfile.buildInfoYaml({componentName=, inputManifest=tests/jenkins/data/buildInfo.yml, outputFile=tests/jenkins/data/buildInfo.yml, status=SUCCESS, stage=FINALIZE_STAGE}) - buildInfoYaml.unstash(buildInfo_yml) - buildInfoYaml.echo(No buildInfo.yml exists in stashed. Starting initialize the buildInfo yaml file.) - buildInfoYaml.readYaml({file=tests/jenkins/data/buildInfo.yml}) - buildInfoYaml.echo(The status is SUCCESS) - buildInfoYaml.echo(Components is ) - buildInfoYaml.echo(Components parameter is null) - buildInfoYaml.echo([OpenSearch, common-utils, job-scheduler, ml-commons, performance-analyzer, security, geospatial, k-NN, cross-cluster-replication, notifications-core, notifications, anomaly-detection, asynchronous-search, alerting, index-management, sql, opensearch-observability, dashboards-reports]) - buildInfoYaml.dir(OpenSearch, groovy.lang.Closure) - buildInfoYaml.checkout({$class=GitSCM, branches=[{name=b1017fa3b9a1c781d4f34ecee411e0cdf930a515}], userRemoteConfigs=[{url=https://github.com/opensearch-project/OpenSearch.git}]}) - buildInfoYaml.sh({script=git rev-parse HEAD, returnStdout=true}) - buildInfoYaml.dir(common-utils, groovy.lang.Closure) - buildInfoYaml.checkout({$class=GitSCM, branches=[{name=ae064c5668f3d46ba8f47ad6e7ea23a14ede557b}], userRemoteConfigs=[{url=https://github.com/opensearch-project/common-utils.git}]}) - buildInfoYaml.sh({script=git rev-parse HEAD, returnStdout=true}) - buildInfoYaml.dir(job-scheduler, groovy.lang.Closure) - buildInfoYaml.checkout({$class=GitSCM, branches=[{name=a5013073ec8de9b7af6fa439c2f4d6fd9af8881d}], userRemoteConfigs=[{url=https://github.com/opensearch-project/job-scheduler.git}]}) - buildInfoYaml.sh({script=git rev-parse HEAD, returnStdout=true}) - buildInfoYaml.dir(ml-commons, groovy.lang.Closure) - buildInfoYaml.checkout({$class=GitSCM, branches=[{name=a7d269500f8667fdd4cd4d582c7148a7e7fb557c}], userRemoteConfigs=[{url=https://github.com/opensearch-project/ml-commons.git}]}) - buildInfoYaml.sh({script=git rev-parse HEAD, returnStdout=true}) - buildInfoYaml.dir(performance-analyzer, groovy.lang.Closure) - buildInfoYaml.checkout({$class=GitSCM, branches=[{name=3a75d7d5a6302b3c9fd78fb7104f90689d407484}], userRemoteConfigs=[{url=https://github.com/opensearch-project/performance-analyzer.git}]}) - buildInfoYaml.sh({script=git rev-parse HEAD, returnStdout=true}) - buildInfoYaml.dir(security, groovy.lang.Closure) - buildInfoYaml.checkout({$class=GitSCM, branches=[{name=ff17b025d15793d600f4b31d6dd4bbde97030f39}], userRemoteConfigs=[{url=https://github.com/opensearch-project/security.git}]}) - buildInfoYaml.sh({script=git rev-parse HEAD, returnStdout=true}) - buildInfoYaml.dir(geospatial, groovy.lang.Closure) - buildInfoYaml.checkout({$class=GitSCM, branches=[{name=a71475ab3b0de008ca352e290d99fb3b53f1a1c5}], userRemoteConfigs=[{url=https://github.com/opensearch-project/geospatial.git}]}) - buildInfoYaml.sh({script=git rev-parse HEAD, returnStdout=true}) - buildInfoYaml.dir(k-NN, groovy.lang.Closure) - buildInfoYaml.checkout({$class=GitSCM, branches=[{name=53185a0f165ebe1f8c3e01fd80a867727ba3674f}], userRemoteConfigs=[{url=https://github.com/opensearch-project/k-NN.git}]}) - buildInfoYaml.sh({script=git rev-parse HEAD, returnStdout=true}) - buildInfoYaml.dir(cross-cluster-replication, groovy.lang.Closure) - buildInfoYaml.checkout({$class=GitSCM, branches=[{name=719634b60056e48e35cccba1f1ed3a0a43bb90e5}], userRemoteConfigs=[{url=https://github.com/opensearch-project/cross-cluster-replication.git}]}) - buildInfoYaml.sh({script=git rev-parse HEAD, returnStdout=true}) - buildInfoYaml.dir(notifications-core, groovy.lang.Closure) - buildInfoYaml.checkout({$class=GitSCM, branches=[{name=01b4aa8886b4bb8faabf482bf9f4baaa441015fe}], userRemoteConfigs=[{url=https://github.com/opensearch-project/notifications.git}]}) - buildInfoYaml.sh({script=git rev-parse HEAD, returnStdout=true}) - buildInfoYaml.dir(notifications, groovy.lang.Closure) - buildInfoYaml.checkout({$class=GitSCM, branches=[{name=01b4aa8886b4bb8faabf482bf9f4baaa441015fe}], userRemoteConfigs=[{url=https://github.com/opensearch-project/notifications.git}]}) - buildInfoYaml.sh({script=git rev-parse HEAD, returnStdout=true}) - buildInfoYaml.dir(anomaly-detection, groovy.lang.Closure) - buildInfoYaml.checkout({$class=GitSCM, branches=[{name=04f27418fe97110635b08dd986d77ce0ecc384ec}], userRemoteConfigs=[{url=https://github.com/opensearch-project/anomaly-detection.git}]}) - buildInfoYaml.sh({script=git rev-parse HEAD, returnStdout=true}) - buildInfoYaml.dir(asynchronous-search, groovy.lang.Closure) - buildInfoYaml.checkout({$class=GitSCM, branches=[{name=4f1f992c6bb134dab191042a87216f1616be8a27}], userRemoteConfigs=[{url=https://github.com/opensearch-project/asynchronous-search.git}]}) - buildInfoYaml.sh({script=git rev-parse HEAD, returnStdout=true}) - buildInfoYaml.dir(alerting, groovy.lang.Closure) - buildInfoYaml.checkout({$class=GitSCM, branches=[{name=b3d676f70b0df8df9cab0919a147ed395c568797}], userRemoteConfigs=[{url=https://github.com/opensearch-project/alerting.git}]}) - buildInfoYaml.sh({script=git rev-parse HEAD, returnStdout=true}) - buildInfoYaml.dir(index-management, groovy.lang.Closure) - buildInfoYaml.checkout({$class=GitSCM, branches=[{name=8eb5da6b0317506ee0160ddbbc53a14550cbcd5d}], userRemoteConfigs=[{url=https://github.com/opensearch-project/index-management.git}]}) - buildInfoYaml.sh({script=git rev-parse HEAD, returnStdout=true}) - buildInfoYaml.dir(sql, groovy.lang.Closure) - buildInfoYaml.checkout({$class=GitSCM, branches=[{name=454122d3c73dcf8944800720e2116fd6540d3b26}], userRemoteConfigs=[{url=https://github.com/opensearch-project/sql.git}]}) - buildInfoYaml.sh({script=git rev-parse HEAD, returnStdout=true}) - buildInfoYaml.dir(opensearch-observability, groovy.lang.Closure) - buildInfoYaml.checkout({$class=GitSCM, branches=[{name=4055decd159c2cff401b43006f6ccba73e6f67b6}], userRemoteConfigs=[{url=https://github.com/opensearch-project/observability}]}) - buildInfoYaml.sh({script=git rev-parse HEAD, returnStdout=true}) - buildInfoYaml.dir(dashboards-reports, groovy.lang.Closure) - buildInfoYaml.checkout({$class=GitSCM, branches=[{name=1d3980ab2d93a89acd0a5716f575a222389b9e8d}], userRemoteConfigs=[{url=https://github.com/opensearch-project/dashboards-reports.git}]}) - buildInfoYaml.sh({script=git rev-parse HEAD, returnStdout=true}) - buildInfoYaml.writeYaml({file=buildInfo.yml, data={schema-version=1.0, build={name=OpenSearch, version=2.2.0, status=SUCCESS, number=30}, ci={image={name=opensearchstaging/ci-runner:ci-runner-centos7-opensearch-build-v2, args=-e JAVA_HOME=/opt/java/openjdk-17}}, components=[{name=OpenSearch, repository=https://github.com/opensearch-project/OpenSearch.git, ref=75eccfe03b4e58ede1a69eb6008196c44e7008c6, checks=[gradle:publish, gradle:properties:version]}, {name=common-utils, repository=https://github.com/opensearch-project/common-utils.git, ref=75eccfe03b4e58ede1a69eb6008196c44e7008c6, platforms=[linux], checks=[gradle:publish, gradle:properties:version]}, {name=job-scheduler, repository=https://github.com/opensearch-project/job-scheduler.git, ref=75eccfe03b4e58ede1a69eb6008196c44e7008c6, platforms=[linux], checks=[gradle:properties:version, gradle:dependencies:opensearch.version]}, {name=ml-commons, repository=https://github.com/opensearch-project/ml-commons.git, ref=75eccfe03b4e58ede1a69eb6008196c44e7008c6, platforms=[linux], checks=[gradle:properties:version, {gradle:dependencies:opensearch.version=opensearch-ml-plugin}]}, {name=performance-analyzer, repository=https://github.com/opensearch-project/performance-analyzer.git, ref=75eccfe03b4e58ede1a69eb6008196c44e7008c6, platforms=[linux], checks=[gradle:properties:version, gradle:dependencies:opensearch.version]}, {name=security, repository=https://github.com/opensearch-project/security.git, ref=75eccfe03b4e58ede1a69eb6008196c44e7008c6, platforms=[linux]}, {name=geospatial, repository=https://github.com/opensearch-project/geospatial.git, ref=75eccfe03b4e58ede1a69eb6008196c44e7008c6, platforms=[linux], checks=[gradle:properties:version, gradle:dependencies:opensearch.version]}, {name=k-NN, repository=https://github.com/opensearch-project/k-NN.git, ref=75eccfe03b4e58ede1a69eb6008196c44e7008c6, platforms=[linux], checks=[gradle:properties:version, gradle:dependencies:opensearch.version]}, {name=cross-cluster-replication, repository=https://github.com/opensearch-project/cross-cluster-replication.git, ref=75eccfe03b4e58ede1a69eb6008196c44e7008c6, platforms=[linux], checks=[gradle:properties:version, gradle:dependencies:opensearch.version]}, {name=notifications-core, repository=https://github.com/opensearch-project/notifications.git, ref=75eccfe03b4e58ede1a69eb6008196c44e7008c6, platforms=[linux], working_directory=notifications, checks=[gradle:properties:version, {gradle:dependencies:opensearch.version=opensearch-notifications-core}]}, {name=notifications, repository=https://github.com/opensearch-project/notifications.git, ref=75eccfe03b4e58ede1a69eb6008196c44e7008c6, platforms=[linux], working_directory=notifications, checks=[gradle:properties:version, {gradle:dependencies:opensearch.version=notifications}]}, {name=anomaly-detection, repository=https://github.com/opensearch-project/anomaly-detection.git, ref=75eccfe03b4e58ede1a69eb6008196c44e7008c6, platforms=[linux], checks=[gradle:properties:version, gradle:dependencies:opensearch.version]}, {name=asynchronous-search, repository=https://github.com/opensearch-project/asynchronous-search.git, ref=75eccfe03b4e58ede1a69eb6008196c44e7008c6, platforms=[linux], checks=[gradle:properties:version, gradle:dependencies:opensearch.version]}, {name=alerting, repository=https://github.com/opensearch-project/alerting.git, ref=75eccfe03b4e58ede1a69eb6008196c44e7008c6, platforms=[linux], checks=[gradle:properties:version, {gradle:dependencies:opensearch.version=alerting}]}, {name=index-management, repository=https://github.com/opensearch-project/index-management.git, ref=75eccfe03b4e58ede1a69eb6008196c44e7008c6, platforms=[linux], checks=[gradle:properties:version]}, {name=sql, repository=https://github.com/opensearch-project/sql.git, ref=75eccfe03b4e58ede1a69eb6008196c44e7008c6, platforms=[linux], checks=[gradle:properties:version, {gradle:dependencies:opensearch.version=opensearch-sql-plugin}]}, {name=opensearch-observability, repository=https://github.com/opensearch-project/observability, ref=75eccfe03b4e58ede1a69eb6008196c44e7008c6, platforms=[linux], working_directory=opensearch-observability, checks=[gradle:properties:version, gradle:dependencies:opensearch.version]}, {name=dashboards-reports, repository=https://github.com/opensearch-project/dashboards-reports.git, ref=75eccfe03b4e58ede1a69eb6008196c44e7008c6, platforms=[linux], working_directory=reports-scheduler, checks=[gradle:properties:version, gradle:dependencies:opensearch.version]}], results={integ_test_x64=NOT_STARTED, bwc_test_x64=NOT_STARTED, integ_test_arm64=NOT_STARTED, bwc_test_arm64=NOT_STARTED, duration=1, startTimestamp=1660345758679}}, overwrite=true}) - buildInfoYaml.sh(cat buildInfo.yml) - buildInfoYaml.stash({includes=buildInfo.yml, name=buildInfo_yml}) diff --git a/tests/jenkins/jobs/BuildManifest_Jenkinsfile b/tests/jenkins/jobs/BuildManifest_Jenkinsfile deleted file mode 100644 index 27de2e354e..0000000000 --- a/tests/jenkins/jobs/BuildManifest_Jenkinsfile +++ /dev/null @@ -1,42 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -lib = library(identifier: 'jenkins@1.0.0', retriever: modernSCM([ - $class: 'GitSCMSource', - remote: 'https://github.com/opensearch-project/opensearch-build-libraries.git', -])) - -pipeline { - agent none - stages { - stage('Build Manifest Properties') { - steps { - script { - def buildManifest = lib.jenkins.BuildManifest.new(readYaml(file: "tests/data/opensearch-build-1.1.0.yml")) - echo buildManifest.build.name - echo buildManifest.build.version - echo buildManifest.build.platform - echo buildManifest.build.architecture - echo buildManifest.build.getFilename() - echo buildManifest.build.getFilenameWithExtension('windows', 'x86') - echo buildManifest.getArtifactRoot('bundle-build', '1') - echo buildManifest.getArtifactRootWithoutDistribution('bundle-build', '1') - echo buildManifest.getArtifactRootUrlWithoutDistribution('https://ci.opensearch.org/ci/dbc', 'bundle-build', '1') - echo buildManifest.getArtifactRootUrl('https://ci.opensearch.org/ci/dbc', 'bundle-build', '1') - echo buildManifest.getUrl('https://ci.opensearch.org/ci/dbc', 'bundle-build', '1') - echo buildManifest.getArtifactUrl('https://ci.opensearch.org/ci/dbc', 'bundle-build', '1') - echo buildManifest.build.getPackageName() - echo buildManifest.getMinArtifact() - echo buildManifest.getIndexFileRoot("distribution-build-opensearch") - echo buildManifest.getCommitId("OpenSearch") - echo buildManifest.getRepo("OpenSearch") - } - } - } - } -} diff --git a/tests/jenkins/jobs/BuildManifest_Jenkinsfile.txt b/tests/jenkins/jobs/BuildManifest_Jenkinsfile.txt deleted file mode 100644 index 571f366dfc..0000000000 --- a/tests/jenkins/jobs/BuildManifest_Jenkinsfile.txt +++ /dev/null @@ -1,36 +0,0 @@ - BuildManifest_Jenkinsfile.run() - BuildManifest_Jenkinsfile.modernSCM({$class=GitSCMSource, remote=https://github.com/opensearch-project/opensearch-build-libraries.git}) - BuildManifest_Jenkinsfile.library({identifier=jenkins@1.0.0, retriever=null}) - BuildManifest_Jenkinsfile.pipeline(groovy.lang.Closure) - BuildManifest_Jenkinsfile.echo(Executing on agent [label:none]) - BuildManifest_Jenkinsfile.stage(Build Manifest Properties, groovy.lang.Closure) - BuildManifest_Jenkinsfile.script(groovy.lang.Closure) - BuildManifest_Jenkinsfile.readYaml({file=tests/data/opensearch-build-1.1.0.yml}) - BuildManifest.asBoolean() - BuildManifest_Jenkinsfile.echo(OpenSearch) - BuildManifest_Jenkinsfile.echo(1.1.0) - BuildManifest_Jenkinsfile.echo(linux) - BuildManifest_Jenkinsfile.echo(x64) - BuildManifest_Jenkinsfile.echo(opensearch) - BuildManifest_Jenkinsfile.echo(opensearch-1.1.0-windows-x86.tar.gz) - BuildManifest.getArtifactRoot(bundle-build, 1) - BuildManifest_Jenkinsfile.echo(bundle-build/1.1.0/1/linux/x64/tar) - BuildManifest.getArtifactRootWithoutDistribution(bundle-build, 1) - BuildManifest_Jenkinsfile.echo(bundle-build/1.1.0/1/linux/x64) - BuildManifest.getArtifactRootUrlWithoutDistribution(https://ci.opensearch.org/ci/dbc, bundle-build, 1) - BuildManifest_Jenkinsfile.echo(https://ci.opensearch.org/ci/dbc/bundle-build/1.1.0/1/linux/x64) - BuildManifest.getArtifactRootUrl(https://ci.opensearch.org/ci/dbc, bundle-build, 1) - BuildManifest_Jenkinsfile.echo(https://ci.opensearch.org/ci/dbc/bundle-build/1.1.0/1/linux/x64/tar) - BuildManifest.getUrl(https://ci.opensearch.org/ci/dbc, bundle-build, 1) - BuildManifest_Jenkinsfile.echo(https://ci.opensearch.org/ci/dbc/bundle-build/1.1.0/1/linux/x64/tar/builds/opensearch/manifest.yml) - BuildManifest.getArtifactUrl(https://ci.opensearch.org/ci/dbc, bundle-build, 1) - BuildManifest_Jenkinsfile.echo(https://ci.opensearch.org/ci/dbc/bundle-build/1.1.0/1/linux/x64/tar/dist/opensearch/opensearch-1.1.0-linux-x64.tar.gz) - BuildManifest_Jenkinsfile.echo(opensearch-1.1.0-linux-x64.tar.gz) - BuildManifest.getMinArtifact() - BuildManifest_Jenkinsfile.echo(dist/opensearch-min-1.1.0-linux-x64.tar.gz) - BuildManifest.getIndexFileRoot(distribution-build-opensearch) - BuildManifest_Jenkinsfile.echo(distribution-build-opensearch/1.1.0) - BuildManifest.getCommitId(OpenSearch) - BuildManifest_Jenkinsfile.echo(b7334f49d530ffd1a3f7bd0e5832b9b2a9caa583) - BuildManifest.getRepo(OpenSearch) - BuildManifest_Jenkinsfile.echo(https://github.com/opensearch-project/OpenSearch.git) diff --git a/tests/jenkins/jobs/BuildManifest_Jenkinsfile_component_no_artifact b/tests/jenkins/jobs/BuildManifest_Jenkinsfile_component_no_artifact deleted file mode 100644 index 71950dbc06..0000000000 --- a/tests/jenkins/jobs/BuildManifest_Jenkinsfile_component_no_artifact +++ /dev/null @@ -1,38 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -lib = library(identifier: 'jenkins@1.0.0', retriever: modernSCM([ - $class: 'GitSCMSource', - remote: 'https://github.com/opensearch-project/opensearch-build-libraries.git', -])) - -pipeline { - agent none - stages { - stage('Build Manifest Properties') { - steps { - script { - def buildManifest = lib.jenkins.BuildManifest.new(readYaml(file: "tests/data/opensearch-dashboards-build-1.2.0.yml")) - echo buildManifest.build.name - echo buildManifest.build.version - echo buildManifest.build.platform - echo buildManifest.build.architecture - echo buildManifest.build.getFilename() - echo buildManifest.getArtifactRoot('bundle-build', '1') - echo buildManifest.getArtifactRootWithoutDistribution('bundle-build', '1') - echo buildManifest.getArtifactRootUrl('https://ci.opensearch.org/ci/dbc', 'bundle-build', '1') - echo buildManifest.getArtifactRootUrlWithoutDistribution('https://ci.opensearch.org/ci/dbc', 'bundle-build', '1') - echo buildManifest.build.getPackageName() - echo buildManifest.getMinArtifact() - echo buildManifest.getCommitId("OpenSearch-Dashboards") - echo buildManifest.getRepo("OpenSearch-Dashboards") - } - } - } - } -} diff --git a/tests/jenkins/jobs/BuildManifest_Jenkinsfile_component_no_artifact.txt b/tests/jenkins/jobs/BuildManifest_Jenkinsfile_component_no_artifact.txt deleted file mode 100755 index 793d59c7b5..0000000000 --- a/tests/jenkins/jobs/BuildManifest_Jenkinsfile_component_no_artifact.txt +++ /dev/null @@ -1,29 +0,0 @@ - BuildManifest_Jenkinsfile_component_no_artifact.run() - BuildManifest_Jenkinsfile_component_no_artifact.modernSCM({$class=GitSCMSource, remote=https://github.com/opensearch-project/opensearch-build-libraries.git}) - BuildManifest_Jenkinsfile_component_no_artifact.library({identifier=jenkins@1.0.0, retriever=null}) - BuildManifest_Jenkinsfile_component_no_artifact.pipeline(groovy.lang.Closure) - BuildManifest_Jenkinsfile_component_no_artifact.echo(Executing on agent [label:none]) - BuildManifest_Jenkinsfile_component_no_artifact.stage(Build Manifest Properties, groovy.lang.Closure) - BuildManifest_Jenkinsfile_component_no_artifact.script(groovy.lang.Closure) - BuildManifest_Jenkinsfile_component_no_artifact.readYaml({file=tests/data/opensearch-dashboards-build-1.2.0.yml}) - BuildManifest.asBoolean() - BuildManifest_Jenkinsfile_component_no_artifact.echo(OpenSearch Dashboards) - BuildManifest_Jenkinsfile_component_no_artifact.echo(1.2.0) - BuildManifest_Jenkinsfile_component_no_artifact.echo(linux) - BuildManifest_Jenkinsfile_component_no_artifact.echo(x64) - BuildManifest_Jenkinsfile_component_no_artifact.echo(opensearch-dashboards) - BuildManifest.getArtifactRoot(bundle-build, 1) - BuildManifest_Jenkinsfile_component_no_artifact.echo(bundle-build/1.2.0/1/linux/x64/tar) - BuildManifest.getArtifactRootWithoutDistribution(bundle-build, 1) - BuildManifest_Jenkinsfile_component_no_artifact.echo(bundle-build/1.2.0/1/linux/x64) - BuildManifest.getArtifactRootUrl(https://ci.opensearch.org/ci/dbc, bundle-build, 1) - BuildManifest_Jenkinsfile_component_no_artifact.echo(https://ci.opensearch.org/ci/dbc/bundle-build/1.2.0/1/linux/x64/tar) - BuildManifest.getArtifactRootUrlWithoutDistribution(https://ci.opensearch.org/ci/dbc, bundle-build, 1) - BuildManifest_Jenkinsfile_component_no_artifact.echo(https://ci.opensearch.org/ci/dbc/bundle-build/1.2.0/1/linux/x64) - BuildManifest_Jenkinsfile_component_no_artifact.echo(opensearch-dashboards-1.2.0-linux-x64.tar.gz) - BuildManifest.getMinArtifact() - BuildManifest_Jenkinsfile_component_no_artifact.echo(dist/opensearch-dashboards-min-1.2.0-linux-x64.tar.gz) - BuildManifest.getCommitId(OpenSearch-Dashboards) - BuildManifest_Jenkinsfile_component_no_artifact.echo(caf668e73304bac890f41c37cd6c3a41257cd289) - BuildManifest.getRepo(OpenSearch-Dashboards) - BuildManifest_Jenkinsfile_component_no_artifact.echo(https://github.com/opensearch-project/OpenSearch-Dashboards.git) diff --git a/tests/jenkins/jobs/BuildShManifest_Jenkinsfile b/tests/jenkins/jobs/BuildShManifest_Jenkinsfile deleted file mode 100644 index 174bf7fc6d..0000000000 --- a/tests/jenkins/jobs/BuildShManifest_Jenkinsfile +++ /dev/null @@ -1,29 +0,0 @@ -pipeline { - agent none - stages { - stage('Test build manifest jenkins var') { - steps { - script { - buildManifest( - inputManifest: "tests/jenkins/data/opensearch-2.0.0.yml", - distribution: "tar", - snapshot: true - ) - buildManifest( - componentName: "job-scheduler", - inputManifest: "tests/jenkins/data/opensearch-2.0.0.yml", - distribution: "tar", - snapshot: true - ) - buildManifest( - componentName: "common-utils", - inputManifest: "tests/jenkins/data/opensearch-2.0.0.yml", - distribution: "rpm", - snapshot: true - ) - } - } - } - } -} - diff --git a/tests/jenkins/jobs/BuildShManifest_Jenkinsfile.txt b/tests/jenkins/jobs/BuildShManifest_Jenkinsfile.txt deleted file mode 100644 index 0715c60bbc..0000000000 --- a/tests/jenkins/jobs/BuildShManifest_Jenkinsfile.txt +++ /dev/null @@ -1,11 +0,0 @@ - BuildShManifest_Jenkinsfile.run() - BuildShManifest_Jenkinsfile.pipeline(groovy.lang.Closure) - BuildShManifest_Jenkinsfile.echo(Executing on agent [label:none]) - BuildShManifest_Jenkinsfile.stage(Test build manifest jenkins var, groovy.lang.Closure) - BuildShManifest_Jenkinsfile.script(groovy.lang.Closure) - BuildShManifest_Jenkinsfile.buildManifest({inputManifest=tests/jenkins/data/opensearch-2.0.0.yml, distribution=tar, snapshot=true}) - buildManifest.sh(./build.sh tests/jenkins/data/opensearch-2.0.0.yml -d tar --snapshot) - BuildShManifest_Jenkinsfile.buildManifest({componentName=job-scheduler, inputManifest=tests/jenkins/data/opensearch-2.0.0.yml, distribution=tar, snapshot=true}) - buildManifest.sh(./build.sh tests/jenkins/data/opensearch-2.0.0.yml -d tar --component job-scheduler --snapshot) - BuildShManifest_Jenkinsfile.buildManifest({componentName=common-utils, inputManifest=tests/jenkins/data/opensearch-2.0.0.yml, distribution=rpm, snapshot=true}) - buildManifest.sh(./build.sh tests/jenkins/data/opensearch-2.0.0.yml -d rpm --component common-utils --snapshot) diff --git a/tests/jenkins/jobs/BuildUploadManifestSHA_Jenkinsfile b/tests/jenkins/jobs/BuildUploadManifestSHA_Jenkinsfile deleted file mode 100644 index 21ddbf2acf..0000000000 --- a/tests/jenkins/jobs/BuildUploadManifestSHA_Jenkinsfile +++ /dev/null @@ -1,16 +0,0 @@ -pipeline { - agent none - stages { - stage('upload manifest SHA') { - steps { - script { - buildUploadManifestSHA( - inputManifest: 'tests/jenkins/data/opensearch-1.3.0.yml', - platform: 'linux', - architecture: 'x64' - ) - } - } - } - } -} diff --git a/tests/jenkins/jobs/BuildUploadManifestSHA_Jenkinsfile.txt b/tests/jenkins/jobs/BuildUploadManifestSHA_Jenkinsfile.txt deleted file mode 100644 index c163c31312..0000000000 --- a/tests/jenkins/jobs/BuildUploadManifestSHA_Jenkinsfile.txt +++ /dev/null @@ -1,31 +0,0 @@ - BuildUploadManifestSHA_Jenkinsfile.run() - BuildUploadManifestSHA_Jenkinsfile.pipeline(groovy.lang.Closure) - BuildUploadManifestSHA_Jenkinsfile.echo(Executing on agent [label:none]) - BuildUploadManifestSHA_Jenkinsfile.stage(upload manifest SHA, groovy.lang.Closure) - BuildUploadManifestSHA_Jenkinsfile.script(groovy.lang.Closure) - BuildUploadManifestSHA_Jenkinsfile.buildUploadManifestSHA({inputManifest=tests/jenkins/data/opensearch-1.3.0.yml, platform=linux, architecture=x64}) - buildUploadManifestSHA.legacySCM(groovy.lang.Closure) - buildUploadManifestSHA.library({identifier=jenkins@20211123, retriever=null}) - buildUploadManifestSHA.getManifestSHA({inputManifest=tests/jenkins/data/opensearch-1.3.0.yml, platform=linux, architecture=x64}) - getManifestSHA.buildManifest({inputManifest=tests/jenkins/data/opensearch-1.3.0.yml, platform=linux, architecture=x64, lock=true}) - buildManifest.sh(./build.sh tests/jenkins/data/opensearch-1.3.0.yml -p linux -a x64 --lock) - getManifestSHA.sha1(tests/jenkins/data/opensearch-1.3.0.yml.lock) - getManifestSHA.echo(Manifest SHA: sha1) - getManifestSHA.legacySCM(groovy.lang.Closure) - getManifestSHA.library({identifier=jenkins@20211123, retriever=null}) - getManifestSHA.readYaml({file=tests/jenkins/data/opensearch-1.3.0.yml.lock}) - InputManifest.asBoolean() - InputManifest.getSHAsRoot(get-manifest-sha-build) - getManifestSHA.echo(Manifest lock: tests/jenkins/data/opensearch-1.3.0.yml.lock) - getManifestSHA.echo(Manifest SHA path: get-manifest-sha-build/1.3.0/shas/sha1.yml) - getManifestSHA.string({credentialsId=jenkins-aws-account-public, variable=AWS_ACCOUNT_PUBLIC}) - getManifestSHA.string({credentialsId=jenkins-artifact-bucket-name, variable=ARTIFACT_BUCKET_NAME}) - getManifestSHA.withCredentials([AWS_ACCOUNT_PUBLIC, ARTIFACT_BUCKET_NAME], groovy.lang.Closure) - getManifestSHA.withAWS({role=opensearch-bundle, roleAccount=AWS_ACCOUNT_PUBLIC, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure) - getManifestSHA.s3DoesObjectExist({bucket=ARTIFACT_BUCKET_NAME, path=get-manifest-sha-build/1.3.0/shas/sha1.yml}) - getManifestSHA.echo(Manifest SHA exists: false) - buildUploadManifestSHA.string({credentialsId=jenkins-artifact-bucket-name, variable=ARTIFACT_BUCKET_NAME}) - buildUploadManifestSHA.string({credentialsId=jenkins-aws-account-public, variable=AWS_ACCOUNT_PUBLIC}) - buildUploadManifestSHA.withCredentials([ARTIFACT_BUCKET_NAME, AWS_ACCOUNT_PUBLIC], groovy.lang.Closure) - buildUploadManifestSHA.withAWS({role=opensearch-bundle, roleAccount=AWS_ACCOUNT_PUBLIC, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure) - buildUploadManifestSHA.s3Upload({bucket=ARTIFACT_BUCKET_NAME, file=tests/jenkins/data/opensearch-1.3.0.yml.lock, path=get-manifest-sha-build/1.3.0/shas/sha1.yml}) diff --git a/tests/jenkins/jobs/BuildYumRepo_Jenkinsfile b/tests/jenkins/jobs/BuildYumRepo_Jenkinsfile deleted file mode 100644 index 0467d1f72c..0000000000 --- a/tests/jenkins/jobs/BuildYumRepo_Jenkinsfile +++ /dev/null @@ -1,20 +0,0 @@ -lib = library(identifier: 'jenkins@1.0.0', retriever: modernSCM([ - $class: 'GitSCMSource', - remote: 'https://github.com/opensearch-project/opensearch-build-libraries.git', -])) - -pipeline { - agent none - stages { - stage('buildYumRepo') { - steps { - script { - buildYumRepo( - buildManifest: 'tests/data/opensearch-build-1.3.0.yml', - baseUrl: 'https://ci.opensearch.org/ci/dbc/test/1.3.0/9/linux/x64' - ) - } - } - } - } -} \ No newline at end of file diff --git a/tests/jenkins/jobs/BuildYumRepo_Jenkinsfile.txt b/tests/jenkins/jobs/BuildYumRepo_Jenkinsfile.txt deleted file mode 100644 index fa95f8aff9..0000000000 --- a/tests/jenkins/jobs/BuildYumRepo_Jenkinsfile.txt +++ /dev/null @@ -1,21 +0,0 @@ - BuildYumRepo_Jenkinsfile.run() - BuildYumRepo_Jenkinsfile.modernSCM({$class=GitSCMSource, remote=https://github.com/opensearch-project/opensearch-build-libraries.git}) - BuildYumRepo_Jenkinsfile.library({identifier=jenkins@1.0.0, retriever=null}) - BuildYumRepo_Jenkinsfile.pipeline(groovy.lang.Closure) - BuildYumRepo_Jenkinsfile.echo(Executing on agent [label:none]) - BuildYumRepo_Jenkinsfile.stage(buildYumRepo, groovy.lang.Closure) - BuildYumRepo_Jenkinsfile.script(groovy.lang.Closure) - BuildYumRepo_Jenkinsfile.buildYumRepo({buildManifest=tests/data/opensearch-build-1.3.0.yml, baseUrl=https://ci.opensearch.org/ci/dbc/test/1.3.0/9/linux/x64}) - buildYumRepo.legacySCM(groovy.lang.Closure) - buildYumRepo.library({identifier=jenkins@20211123, retriever=null}) - buildYumRepo.readYaml({file=tests/data/opensearch-build-1.3.0.yml}) - BuildManifest.asBoolean() - buildYumRepo.echo(Create yum repo metadata and repo file tests/data/opensearch-build-1.3.0.yml) - buildYumRepo.sh(createrepo "rpm/dist/opensearch") - buildYumRepo.writeFile({file=rpm/dist/opensearch/opensearch-1.3.0.staging.repo, text=[opensearch-1.3.0-123-staging] -name=OpenSearch 1.3.0 123 Staging -baseurl=https://ci.opensearch.org/ci/dbc/test/1.3.0/9/linux/x64/rpm/dist/opensearch/ -enabled=1 -gpgcheck=0 -autorefresh=1 -type=rpm-md}) diff --git a/tests/jenkins/jobs/Build_OpenSearch_Dashboards_Jenkinsfile b/tests/jenkins/jobs/Build_OpenSearch_Dashboards_Jenkinsfile deleted file mode 100644 index af2c3a6cd7..0000000000 --- a/tests/jenkins/jobs/Build_OpenSearch_Dashboards_Jenkinsfile +++ /dev/null @@ -1,168 +0,0 @@ -lib = library(identifier: 'jenkins@1.0.0', retriever: modernSCM([ - $class: 'GitSCMSource', - remote: 'https://github.com/opensearch-project/opensearch-build-libraries.git', -])) - -pipeline { - agent none - options { - copyArtifactPermission('bundle-build-*') - buildDiscarder(logRotator(artifactNumToKeepStr: '1')) - } - parameters { - string( - name: 'INPUT_MANIFEST', - defaultValue: '1.3.0/opensearch-dashboards-1.3.0.yml', - description: 'Input manifest under the manifests folder, e.g. 2.0.0/opensearch-dashboards-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 { - currentBuild.description = "$INPUT_MANIFEST" - dockerAgent = detectDockerAgent() - } - } - } - stage('build') { - parallel { - stage('build-linux-x64') { - agent { - docker { - label 'Jenkins-Agent-AL2-X64-C54xlarge-Docker-Host' - image dockerAgent.image - args dockerAgent.args - alwaysPull true - } - } - steps { - script { - def buildManifestObj = archiveAssembleUpload( - inputManifest: "manifests/${INPUT_MANIFEST}", - platform: 'linux', - architecture: 'x64', - stashName: 'test-stash-tar-x64' - ) - - String artifactUrl = buildManifestObj.getArtifactUrl('bundle-build', '1') - env.ARTIFACT_URL_X64 = artifactUrl - echo "artifactUrl (x64): ${artifactUrl}" - } - } - post { - always { - postCleanup() - } - } - } - stage('build-linux-arm64') { - agent none - stages { - stage('build-archive-linux-arm64') { - agent { - docker { - label 'Jenkins-Agent-AL2-X64-C54xlarge-Docker-Host' - image dockerAgent.image - args dockerAgent.args - alwaysPull true - } - } - steps { - script { - buildArchive( - inputManifest: "manifests/${INPUT_MANIFEST}", - platform: 'linux', - architecture: 'arm64', - stashName: 'test-stash-tar-arm64' - ) - } - } - post { - always { - postCleanup() - } - } - } - stage('assemble-archive-linux-arm64') { - agent { - docker { - label 'Jenkins-Agent-AL2-Arm64-C6g4xlarge-Docker-Host' - image dockerAgent.image - args dockerAgent.args - alwaysPull true - } - } - steps { - script { - def buildManifestObj = archiveAssembleUpload( - inputManifest: "manifests/${INPUT_MANIFEST}", - platform: 'linux', - architecture: 'arm64' - stashName: 'test-stash-tar-arm64' - ) - - String artifactUrl = buildManifestObj.getArtifactUrl('bundle-build', '1') - env.ARTIFACT_URL_ARM64 = artifactUrl - echo "artifactUrl (arm64): ${artifactUrl}" - } - } - post { - always { - postCleanup() - } - } - } - } - } - } - } - stage('docker build') { - steps { - node('Jenkins-Agent-AL2-X64-C54xlarge-Docker-Host') { - script { - buildDockerImage( - inputManifest: "manifests/${INPUT_MANIFEST}", - artifactUrlX64: env.ARTIFACT_URL_X64, - artifactUrlArm64: env.ARTIFACT_URL_ARM64 - ) - } - } - } - } - } - post { - success { - node('Jenkins-Agent-AL2-X64-C54xlarge-Docker-Host') { - script { - def stashed = lib.jenkins.Messages.new(this).get([ - 'build-linux-x64', - 'build-archive-linux-arm64', - 'assemble-archive-linux-arm64' - ]) - - echo "SUCCESS: ${stashed}" - - postCleanup() - } - } - } - failure { - node('Jenkins-Agent-AL2-X64-C54xlarge-Docker-Host') { - script { - echo 'FAILURE' - - postCleanup() - } - } - } - } -} diff --git a/tests/jenkins/jobs/CreateGithubIssueExisting_Jenkinsfile b/tests/jenkins/jobs/CreateGithubIssueExisting_Jenkinsfile deleted file mode 100644 index 709c4102f8..0000000000 --- a/tests/jenkins/jobs/CreateGithubIssueExisting_Jenkinsfile +++ /dev/null @@ -1,18 +0,0 @@ -pipeline { - agent none - stages { - stage('notify') { - steps { - script { - try { - createGithubIssue( - message: ["Error building OpenSearch, retry with: ./build.sh manifests/2.2.0/opensearch-2.2.0.yml --component OpenSearch --snapshot"] - ) - }catch (Exception e) { - echo 'Exception occurred: ' + e.toString() - } - } - } - } - } -} diff --git a/tests/jenkins/jobs/CreateGithubIssueExisting_Jenkinsfile.txt b/tests/jenkins/jobs/CreateGithubIssueExisting_Jenkinsfile.txt deleted file mode 100644 index d90dc8db34..0000000000 --- a/tests/jenkins/jobs/CreateGithubIssueExisting_Jenkinsfile.txt +++ /dev/null @@ -1,13 +0,0 @@ - CreateGithubIssueExisting_Jenkinsfile.run() - CreateGithubIssueExisting_Jenkinsfile.pipeline(groovy.lang.Closure) - CreateGithubIssueExisting_Jenkinsfile.echo(Executing on agent [label:none]) - CreateGithubIssueExisting_Jenkinsfile.stage(notify, groovy.lang.Closure) - CreateGithubIssueExisting_Jenkinsfile.script(groovy.lang.Closure) - CreateGithubIssueExisting_Jenkinsfile.createGithubIssue({message=[Error building OpenSearch, retry with: ./build.sh manifests/2.2.0/opensearch-2.2.0.yml --component OpenSearch --snapshot]}) - createGithubIssue.readYaml({file=manifests/2.0.0/opensearch-2.0.0.yml}) - createGithubIssue.usernamePassword({credentialsId=jenkins-github-bot-token, passwordVariable=GITHUB_TOKEN, usernameVariable=GITHUB_USER}) - createGithubIssue.withCredentials([[GITHUB_USER, GITHUB_TOKEN]], groovy.lang.Closure) - createGithubIssue.sh({script=gh issue list --repo https://github.com/opensearch-project/OpenSearch.git -S "[AUTOCUT] OS Distribution Build Failed for OpenSearch-2.0.0 in:title" --label autocut, returnStdout=true}) - createGithubIssue.sh({script=gh label list --repo https://github.com/opensearch-project/OpenSearch.git -S v2.0.0, returnStdout=true}) - createGithubIssue.println(Issue already exists in the repository, skipping.) - createGithubIssue.sleep({time=3, unit=SECONDS}) diff --git a/tests/jenkins/jobs/CreateGithubIssue_Jenkinsfile b/tests/jenkins/jobs/CreateGithubIssue_Jenkinsfile deleted file mode 100644 index 709c4102f8..0000000000 --- a/tests/jenkins/jobs/CreateGithubIssue_Jenkinsfile +++ /dev/null @@ -1,18 +0,0 @@ -pipeline { - agent none - stages { - stage('notify') { - steps { - script { - try { - createGithubIssue( - message: ["Error building OpenSearch, retry with: ./build.sh manifests/2.2.0/opensearch-2.2.0.yml --component OpenSearch --snapshot"] - ) - }catch (Exception e) { - echo 'Exception occurred: ' + e.toString() - } - } - } - } - } -} diff --git a/tests/jenkins/jobs/CreateGithubIssue_Jenkinsfile.txt b/tests/jenkins/jobs/CreateGithubIssue_Jenkinsfile.txt deleted file mode 100644 index b2be514156..0000000000 --- a/tests/jenkins/jobs/CreateGithubIssue_Jenkinsfile.txt +++ /dev/null @@ -1,15 +0,0 @@ - CreateGithubIssue_Jenkinsfile.run() - CreateGithubIssue_Jenkinsfile.pipeline(groovy.lang.Closure) - CreateGithubIssue_Jenkinsfile.echo(Executing on agent [label:none]) - CreateGithubIssue_Jenkinsfile.stage(notify, groovy.lang.Closure) - CreateGithubIssue_Jenkinsfile.script(groovy.lang.Closure) - CreateGithubIssue_Jenkinsfile.createGithubIssue({message=[Error building OpenSearch, retry with: ./build.sh manifests/2.2.0/opensearch-2.2.0.yml --component OpenSearch --snapshot]}) - createGithubIssue.readYaml({file=manifests/2.0.0/opensearch-2.0.0.yml}) - createGithubIssue.usernamePassword({credentialsId=jenkins-github-bot-token, passwordVariable=GITHUB_TOKEN, usernameVariable=GITHUB_USER}) - createGithubIssue.withCredentials([[GITHUB_USER, GITHUB_TOKEN]], groovy.lang.Closure) - createGithubIssue.sh({script=gh issue list --repo https://github.com/opensearch-project/OpenSearch.git -S "[AUTOCUT] OS Distribution Build Failed for OpenSearch-2.0.0 in:title" --label autocut, returnStdout=true}) - createGithubIssue.sh({script=gh label list --repo https://github.com/opensearch-project/OpenSearch.git -S v2.0.0, returnStdout=true}) - createGithubIssue.sh({script=gh issue create --title "[AUTOCUT] OS Distribution Build Failed for OpenSearch-2.0.0" --body "***Received Error***: **Error building OpenSearch, retry with: ./build.sh manifests/2.2.0/opensearch-2.2.0.yml --component OpenSearch --snapshot**. - The distribution build for OpenSearch has failed. - Please see build log at www.example.com/jobs/test/123/consoleFull" --label "autocut,v2.0.0" --repo https://github.com/opensearch-project/OpenSearch.git, returnStdout=true}) - createGithubIssue.sleep({time=3, unit=SECONDS}) diff --git a/tests/jenkins/jobs/CreateReleaseTag_Jenkinsfile b/tests/jenkins/jobs/CreateReleaseTag_Jenkinsfile deleted file mode 100644 index 000c5ec96d..0000000000 --- a/tests/jenkins/jobs/CreateReleaseTag_Jenkinsfile +++ /dev/null @@ -1,15 +0,0 @@ -pipeline { - agent none - stages { - stage('createTag') { - steps { - script { - createReleaseTag( - distManifest: "tests/data/opensearch-build-1.1.0.yml", - tagVersion: "1.1.0" - ) - } - } - } - } -} \ No newline at end of file diff --git a/tests/jenkins/jobs/CreateReleaseTag_Jenkinsfile.txt b/tests/jenkins/jobs/CreateReleaseTag_Jenkinsfile.txt deleted file mode 100644 index cbf5415cc4..0000000000 --- a/tests/jenkins/jobs/CreateReleaseTag_Jenkinsfile.txt +++ /dev/null @@ -1,161 +0,0 @@ - CreateReleaseTag_Jenkinsfile.run() - CreateReleaseTag_Jenkinsfile.pipeline(groovy.lang.Closure) - CreateReleaseTag_Jenkinsfile.echo(Executing on agent [label:none]) - CreateReleaseTag_Jenkinsfile.stage(createTag, groovy.lang.Closure) - CreateReleaseTag_Jenkinsfile.script(groovy.lang.Closure) - CreateReleaseTag_Jenkinsfile.createReleaseTag({distManifest=tests/data/opensearch-build-1.1.0.yml, tagVersion=1.1.0}) - createReleaseTag.legacySCM(groovy.lang.Closure) - createReleaseTag.library({identifier=jenkins@20211123, retriever=null}) - createReleaseTag.readYaml({file=tests/data/opensearch-build-1.1.0.yml}) - BundleManifest.asBoolean() - BundleManifest.getNames() - createReleaseTag.echo(Creating 1.1.0 release tag for 15 components in the manifest) - createReleaseTag.usernamePassword({credentialsId=dummy_token_name, usernameVariable=GITHUB_USER, passwordVariable=GITHUB_TOKEN}) - createReleaseTag.withCredentials([[GITHUB_USER, GITHUB_TOKEN]], groovy.lang.Closure) - BundleManifest.getCommitId(index-management) - BundleManifest.getRepo(index-management) - createReleaseTag.echo(Tagging index-management at 7897e9ae9cd5b49535e6a8bbf4c2f73cb458af24 ...) - createReleaseTag.dir(index-management, groovy.lang.Closure) - createReleaseTag.checkout({$class=GitSCM, branches=[{name=7897e9ae9cd5b49535e6a8bbf4c2f73cb458af24}], userRemoteConfigs=[{url=https://github.com/opensearch-project/index-management.git}]}) - createReleaseTag.sh({script=git ls-remote --tags https://github.com/opensearch-project/index-management.git 1.1.0.0 | awk 'NR==1{print $1}', returnStdout=true}) - createReleaseTag.echo(Tag 1.1.0.0 has been created with identical commit ID. Skipping creating new tag for index-management.) - BundleManifest.getCommitId(job-scheduler) - BundleManifest.getRepo(job-scheduler) - createReleaseTag.echo(Tagging job-scheduler at 4504dabfc67dd5628c1451e91e9a1c3c4ca71525 ...) - createReleaseTag.dir(job-scheduler, groovy.lang.Closure) - createReleaseTag.checkout({$class=GitSCM, branches=[{name=4504dabfc67dd5628c1451e91e9a1c3c4ca71525}], userRemoteConfigs=[{url=https://github.com/opensearch-project/job-scheduler.git}]}) - createReleaseTag.sh({script=git ls-remote --tags https://github.com/opensearch-project/job-scheduler.git 1.1.0.0 | awk 'NR==1{print $1}', returnStdout=true}) - createReleaseTag.echo(Creating 1.1.0.0 tag for job-scheduler) - createReleaseTag.sh(git tag 1.1.0.0) - createReleaseTag.sh({script=git push https://GITHUB_TOKEN@github.com/opensearch-project/job-scheduler.git 1.1.0.0, returnStatus=true}) - createReleaseTag.sh(git push https://GITHUB_TOKEN@github.com/opensearch-project/job-scheduler.git 1.1.0.0) - BundleManifest.getCommitId(anomaly-detection) - BundleManifest.getRepo(anomaly-detection) - createReleaseTag.echo(Tagging anomaly-detection at bedc5b620384163abe272e913705fa23cfd3b3a3 ...) - createReleaseTag.dir(anomaly-detection, groovy.lang.Closure) - createReleaseTag.checkout({$class=GitSCM, branches=[{name=bedc5b620384163abe272e913705fa23cfd3b3a3}], userRemoteConfigs=[{url=https://github.com/opensearch-project/anomaly-detection.git}]}) - createReleaseTag.sh({script=git ls-remote --tags https://github.com/opensearch-project/anomaly-detection.git 1.1.0.0 | awk 'NR==1{print $1}', returnStdout=true}) - createReleaseTag.echo(Creating 1.1.0.0 tag for anomaly-detection) - createReleaseTag.sh(git tag 1.1.0.0) - createReleaseTag.sh({script=git push https://GITHUB_TOKEN@github.com/opensearch-project/anomaly-detection.git 1.1.0.0, returnStatus=true}) - createReleaseTag.sh(git push https://GITHUB_TOKEN@github.com/opensearch-project/anomaly-detection.git 1.1.0.0) - BundleManifest.getCommitId(performance-analyzer) - BundleManifest.getRepo(performance-analyzer) - createReleaseTag.echo(Tagging performance-analyzer at f184f0bc39302ac38af2585c663d619048f6cffe ...) - createReleaseTag.dir(performance-analyzer, groovy.lang.Closure) - createReleaseTag.checkout({$class=GitSCM, branches=[{name=f184f0bc39302ac38af2585c663d619048f6cffe}], userRemoteConfigs=[{url=https://github.com/opensearch-project/performance-analyzer.git}]}) - createReleaseTag.sh({script=git ls-remote --tags https://github.com/opensearch-project/performance-analyzer.git 1.1.0.0 | awk 'NR==1{print $1}', returnStdout=true}) - createReleaseTag.echo(Creating 1.1.0.0 tag for performance-analyzer) - createReleaseTag.sh(git tag 1.1.0.0) - createReleaseTag.sh({script=git push https://GITHUB_TOKEN@github.com/opensearch-project/performance-analyzer.git 1.1.0.0, returnStatus=true}) - createReleaseTag.sh(git push https://GITHUB_TOKEN@github.com/opensearch-project/performance-analyzer.git 1.1.0.0) - BundleManifest.getCommitId(common-utils) - BundleManifest.getRepo(common-utils) - createReleaseTag.echo(Tagging common-utils at 3913d7097934cbfe1fdcf919347f22a597d00b76 ...) - createReleaseTag.dir(common-utils, groovy.lang.Closure) - createReleaseTag.checkout({$class=GitSCM, branches=[{name=3913d7097934cbfe1fdcf919347f22a597d00b76}], userRemoteConfigs=[{url=https://github.com/opensearch-project/common-utils.git}]}) - createReleaseTag.sh({script=git ls-remote --tags https://github.com/opensearch-project/common-utils.git 1.1.0.0 | awk 'NR==1{print $1}', returnStdout=true}) - createReleaseTag.echo(Creating 1.1.0.0 tag for common-utils) - createReleaseTag.sh(git tag 1.1.0.0) - createReleaseTag.sh({script=git push https://GITHUB_TOKEN@github.com/opensearch-project/common-utils.git 1.1.0.0, returnStatus=true}) - createReleaseTag.sh(git push https://GITHUB_TOKEN@github.com/opensearch-project/common-utils.git 1.1.0.0) - BundleManifest.getCommitId(asynchronous-search) - BundleManifest.getRepo(asynchronous-search) - createReleaseTag.echo(Tagging asynchronous-search at aa344cc1ecdf9ad21d6cb8d9e368361e6a0f3132 ...) - createReleaseTag.dir(asynchronous-search, groovy.lang.Closure) - createReleaseTag.checkout({$class=GitSCM, branches=[{name=aa344cc1ecdf9ad21d6cb8d9e368361e6a0f3132}], userRemoteConfigs=[{url=https://github.com/opensearch-project/asynchronous-search.git}]}) - createReleaseTag.sh({script=git ls-remote --tags https://github.com/opensearch-project/asynchronous-search.git 1.1.0.0 | awk 'NR==1{print $1}', returnStdout=true}) - createReleaseTag.echo(Creating 1.1.0.0 tag for asynchronous-search) - createReleaseTag.sh(git tag 1.1.0.0) - createReleaseTag.sh({script=git push https://GITHUB_TOKEN@github.com/opensearch-project/asynchronous-search.git 1.1.0.0, returnStatus=true}) - createReleaseTag.sh(git push https://GITHUB_TOKEN@github.com/opensearch-project/asynchronous-search.git 1.1.0.0) - BundleManifest.getCommitId(dashboards-notebooks) - BundleManifest.getRepo(dashboards-notebooks) - createReleaseTag.echo(Tagging dashboards-notebooks at 5a996eb8ec8c92e7469cd5e5f87b237352f60f61 ...) - createReleaseTag.dir(dashboards-notebooks, groovy.lang.Closure) - createReleaseTag.checkout({$class=GitSCM, branches=[{name=5a996eb8ec8c92e7469cd5e5f87b237352f60f61}], userRemoteConfigs=[{url=https://github.com/opensearch-project/dashboards-notebooks.git}]}) - createReleaseTag.sh({script=git ls-remote --tags https://github.com/opensearch-project/dashboards-notebooks.git 1.1.0.0 | awk 'NR==1{print $1}', returnStdout=true}) - createReleaseTag.echo(Creating 1.1.0.0 tag for dashboards-notebooks) - createReleaseTag.sh(git tag 1.1.0.0) - createReleaseTag.sh({script=git push https://GITHUB_TOKEN@github.com/opensearch-project/dashboards-notebooks.git 1.1.0.0, returnStatus=true}) - createReleaseTag.sh(git push https://GITHUB_TOKEN@github.com/opensearch-project/dashboards-notebooks.git 1.1.0.0) - BundleManifest.getCommitId(OpenSearch) - BundleManifest.getRepo(OpenSearch) - createReleaseTag.echo(Tagging OpenSearch at b7334f49d530ffd1a3f7bd0e5832b9b2a9caa583 ...) - createReleaseTag.dir(OpenSearch, groovy.lang.Closure) - createReleaseTag.checkout({$class=GitSCM, branches=[{name=b7334f49d530ffd1a3f7bd0e5832b9b2a9caa583}], userRemoteConfigs=[{url=https://github.com/opensearch-project/OpenSearch.git}]}) - createReleaseTag.sh({script=git ls-remote --tags https://github.com/opensearch-project/OpenSearch.git 1.1.0 | awk 'NR==1{print $1}', returnStdout=true}) - createReleaseTag.echo(Creating 1.1.0 tag for OpenSearch) - createReleaseTag.sh(git tag 1.1.0) - createReleaseTag.sh({script=git push https://GITHUB_TOKEN@github.com/opensearch-project/OpenSearch.git 1.1.0, returnStatus=true}) - createReleaseTag.sh(git push https://GITHUB_TOKEN@github.com/opensearch-project/OpenSearch.git 1.1.0) - BundleManifest.getCommitId(sql) - BundleManifest.getRepo(sql) - createReleaseTag.echo(Tagging sql at d68547d585092af1e053d01e1b834259723cd304 ...) - createReleaseTag.dir(sql, groovy.lang.Closure) - createReleaseTag.checkout({$class=GitSCM, branches=[{name=d68547d585092af1e053d01e1b834259723cd304}], userRemoteConfigs=[{url=https://github.com/opensearch-project/sql.git}]}) - createReleaseTag.sh({script=git ls-remote --tags https://github.com/opensearch-project/sql.git 1.1.0.0 | awk 'NR==1{print $1}', returnStdout=true}) - createReleaseTag.echo(Creating 1.1.0.0 tag for sql) - createReleaseTag.sh(git tag 1.1.0.0) - createReleaseTag.sh({script=git push https://GITHUB_TOKEN@github.com/opensearch-project/sql.git 1.1.0.0, returnStatus=true}) - createReleaseTag.sh(git push https://GITHUB_TOKEN@github.com/opensearch-project/sql.git 1.1.0.0) - BundleManifest.getCommitId(alerting) - BundleManifest.getRepo(alerting) - createReleaseTag.echo(Tagging alerting at 8024b8b9195f837e49e5bebd7f4a31dfc333eb4d ...) - createReleaseTag.dir(alerting, groovy.lang.Closure) - createReleaseTag.checkout({$class=GitSCM, branches=[{name=8024b8b9195f837e49e5bebd7f4a31dfc333eb4d}], userRemoteConfigs=[{url=https://github.com/opensearch-project/alerting.git}]}) - createReleaseTag.sh({script=git ls-remote --tags https://github.com/opensearch-project/alerting.git 1.1.0.0 | awk 'NR==1{print $1}', returnStdout=true}) - createReleaseTag.echo(Creating 1.1.0.0 tag for alerting) - createReleaseTag.sh(git tag 1.1.0.0) - createReleaseTag.sh({script=git push https://GITHUB_TOKEN@github.com/opensearch-project/alerting.git 1.1.0.0, returnStatus=true}) - createReleaseTag.sh(git push https://GITHUB_TOKEN@github.com/opensearch-project/alerting.git 1.1.0.0) - BundleManifest.getCommitId(security) - BundleManifest.getRepo(security) - createReleaseTag.echo(Tagging security at 534fffe0e6cf2b33b9abcbc6508e98fc2d077a3d ...) - createReleaseTag.dir(security, groovy.lang.Closure) - createReleaseTag.checkout({$class=GitSCM, branches=[{name=534fffe0e6cf2b33b9abcbc6508e98fc2d077a3d}], userRemoteConfigs=[{url=https://github.com/opensearch-project/security.git}]}) - createReleaseTag.sh({script=git ls-remote --tags https://github.com/opensearch-project/security.git 1.1.0.0 | awk 'NR==1{print $1}', returnStdout=true}) - createReleaseTag.echo(Creating 1.1.0.0 tag for security) - createReleaseTag.sh(git tag 1.1.0.0) - createReleaseTag.sh({script=git push https://GITHUB_TOKEN@github.com/opensearch-project/security.git 1.1.0.0, returnStatus=true}) - createReleaseTag.sh(git push https://GITHUB_TOKEN@github.com/opensearch-project/security.git 1.1.0.0) - BundleManifest.getCommitId(k-NN) - BundleManifest.getRepo(k-NN) - createReleaseTag.echo(Tagging k-NN at 6a3fdcafd75e63521bcf7893ce908642e1d9fcb6 ...) - createReleaseTag.dir(k-NN, groovy.lang.Closure) - createReleaseTag.checkout({$class=GitSCM, branches=[{name=6a3fdcafd75e63521bcf7893ce908642e1d9fcb6}], userRemoteConfigs=[{url=https://github.com/opensearch-project/k-NN.git}]}) - createReleaseTag.sh({script=git ls-remote --tags https://github.com/opensearch-project/k-NN.git 1.1.0.0 | awk 'NR==1{print $1}', returnStdout=true}) - createReleaseTag.echo(Creating 1.1.0.0 tag for k-NN) - createReleaseTag.sh(git tag 1.1.0.0) - createReleaseTag.sh({script=git push https://GITHUB_TOKEN@github.com/opensearch-project/k-NN.git 1.1.0.0, returnStatus=true}) - createReleaseTag.sh(git push https://GITHUB_TOKEN@github.com/opensearch-project/k-NN.git 1.1.0.0) - BundleManifest.getCommitId(dashboards-reports) - BundleManifest.getRepo(dashboards-reports) - createReleaseTag.echo(Tagging dashboards-reports at 622f334b0724e47f7ffd21cf7e7d521a9f6c949e ...) - createReleaseTag.dir(dashboards-reports, groovy.lang.Closure) - createReleaseTag.checkout({$class=GitSCM, branches=[{name=622f334b0724e47f7ffd21cf7e7d521a9f6c949e}], userRemoteConfigs=[{url=https://github.com/opensearch-project/dashboards-reports.git}]}) - createReleaseTag.sh({script=git ls-remote --tags https://github.com/opensearch-project/dashboards-reports.git 1.1.0.0 | awk 'NR==1{print $1}', returnStdout=true}) - createReleaseTag.echo(Creating 1.1.0.0 tag for dashboards-reports) - createReleaseTag.sh(git tag 1.1.0.0) - createReleaseTag.sh({script=git push https://GITHUB_TOKEN@github.com/opensearch-project/dashboards-reports.git 1.1.0.0, returnStatus=true}) - createReleaseTag.sh(git push https://GITHUB_TOKEN@github.com/opensearch-project/dashboards-reports.git 1.1.0.0) - BundleManifest.getCommitId(notifications) - BundleManifest.getRepo(notifications) - createReleaseTag.echo(Tagging notifications at d0d3e485c4a850f73652a989eeec795b7347fbb6 ...) - createReleaseTag.dir(notifications, groovy.lang.Closure) - createReleaseTag.checkout({$class=GitSCM, branches=[{name=d0d3e485c4a850f73652a989eeec795b7347fbb6}], userRemoteConfigs=[{url=https://github.com/opensearch-project/notifications.git}]}) - createReleaseTag.sh({script=git ls-remote --tags https://github.com/opensearch-project/notifications.git 1.1.0.0 | awk 'NR==1{print $1}', returnStdout=true}) - createReleaseTag.echo(Creating 1.1.0.0 tag for notifications) - createReleaseTag.sh(git tag 1.1.0.0) - createReleaseTag.sh({script=git push https://GITHUB_TOKEN@github.com/opensearch-project/notifications.git 1.1.0.0, returnStatus=true}) - createReleaseTag.sh(git push https://GITHUB_TOKEN@github.com/opensearch-project/notifications.git 1.1.0.0) - BundleManifest.getCommitId(performance-analyzer-rca) - BundleManifest.getRepo(performance-analyzer-rca) - createReleaseTag.echo(Tagging performance-analyzer-rca at 345a10fd4f4e94d6392c925ad95503ba8addd152 ...) - createReleaseTag.dir(performance-analyzer-rca, groovy.lang.Closure) - createReleaseTag.checkout({$class=GitSCM, branches=[{name=345a10fd4f4e94d6392c925ad95503ba8addd152}], userRemoteConfigs=[{url=https://github.com/opensearch-project/performance-analyzer-rca.git}]}) - createReleaseTag.sh({script=git ls-remote --tags https://github.com/opensearch-project/performance-analyzer-rca.git 1.1.0.0 | awk 'NR==1{print $1}', returnStdout=true}) - createReleaseTag.echo(Creating 1.1.0.0 tag for performance-analyzer-rca) - createReleaseTag.sh(git tag 1.1.0.0) - createReleaseTag.sh({script=git push https://GITHUB_TOKEN@github.com/opensearch-project/performance-analyzer-rca.git 1.1.0.0, returnStatus=true}) - createReleaseTag.sh(git push https://GITHUB_TOKEN@github.com/opensearch-project/performance-analyzer-rca.git 1.1.0.0) diff --git a/tests/jenkins/jobs/CreateTestResultsMessage_Jenkinsfile b/tests/jenkins/jobs/CreateTestResultsMessage_Jenkinsfile deleted file mode 100644 index 17f4002214..0000000000 --- a/tests/jenkins/jobs/CreateTestResultsMessage_Jenkinsfile +++ /dev/null @@ -1,24 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -pipeline { - agent none - stages { - stage('stage') { - steps { - script { - createTestResultsMessage( - testType: 'Integ Tests (x64)', - status: 'SUCCESS', - absoluteUrl: 'dummy-test.com/test-results' - ) - } - } - } - } -} \ No newline at end of file diff --git a/tests/jenkins/jobs/CreateTestResultsMessage_Jenkinsfile.txt b/tests/jenkins/jobs/CreateTestResultsMessage_Jenkinsfile.txt deleted file mode 100644 index 560f55c178..0000000000 --- a/tests/jenkins/jobs/CreateTestResultsMessage_Jenkinsfile.txt +++ /dev/null @@ -1,6 +0,0 @@ - CreateTestResultsMessage_Jenkinsfile.run() - CreateTestResultsMessage_Jenkinsfile.pipeline(groovy.lang.Closure) - CreateTestResultsMessage_Jenkinsfile.echo(Executing on agent [label:none]) - CreateTestResultsMessage_Jenkinsfile.stage(stage, groovy.lang.Closure) - CreateTestResultsMessage_Jenkinsfile.script(groovy.lang.Closure) - CreateTestResultsMessage_Jenkinsfile.createTestResultsMessage({testType=Integ Tests (x64), status=SUCCESS, absoluteUrl=dummy-test.com/test-results}) diff --git a/tests/jenkins/jobs/DetectDockerImage_Jenkinsfile b/tests/jenkins/jobs/DetectDockerImage_Jenkinsfile deleted file mode 100644 index b3c6fe5ed3..0000000000 --- a/tests/jenkins/jobs/DetectDockerImage_Jenkinsfile +++ /dev/null @@ -1,54 +0,0 @@ -pipeline { - agent none - stages { - stage('opensearch-1.1.0') { - steps { - script { - currentBuild.description = "1.1.0/opensearch-1.1.0.yml" - dockerAgent = detectDockerAgent( - manifest: 'manifests/templates/opensearch/1.x/os-template-1.1.0.yml' - ) - echo dockerAgent.image - echo dockerAgent.args - echo dockerAgent.javaVersion - } - } - } - stage('opensearch-1.2.0') { - steps { - script { - dockerAgent = detectDockerAgent( - manifest: 'manifests/templates/opensearch/1.x/os-template-1.2.0.yml' - ) - echo dockerAgent.image - echo dockerAgent.args - echo dockerAgent.javaVersion - } - } - } - stage('opensearch-dashboards-1.1.0') { - steps { - script { - dockerAgent = detectDockerAgent( - manifest: 'manifests/templates/opensearch-dashboards/1.x/osd-template-1.1.0.yml' - ) - echo dockerAgent.image - echo dockerAgent.args - echo dockerAgent.javaVersion - } - } - } - stage('opensearch-dashboards-1.2.0') { - steps { - script { - dockerAgent = detectDockerAgent( - manifest: 'legacy-manifests/1.2.0/opensearch-dashboards-1.2.0.yml' - ) - echo dockerAgent.image - echo dockerAgent.args - echo dockerAgent.javaVersion - } - } - } - } -} diff --git a/tests/jenkins/jobs/DetectDockerImage_Jenkinsfile.txt b/tests/jenkins/jobs/DetectDockerImage_Jenkinsfile.txt deleted file mode 100644 index 8b7a5111af..0000000000 --- a/tests/jenkins/jobs/DetectDockerImage_Jenkinsfile.txt +++ /dev/null @@ -1,51 +0,0 @@ - DetectDockerImage_Jenkinsfile.run() - DetectDockerImage_Jenkinsfile.pipeline(groovy.lang.Closure) - DetectDockerImage_Jenkinsfile.echo(Executing on agent [label:none]) - DetectDockerImage_Jenkinsfile.stage(opensearch-1.1.0, groovy.lang.Closure) - DetectDockerImage_Jenkinsfile.script(groovy.lang.Closure) - DetectDockerImage_Jenkinsfile.detectDockerAgent({manifest=manifests/templates/opensearch/1.x/os-template-1.1.0.yml}) - detectDockerAgent.legacySCM(groovy.lang.Closure) - detectDockerAgent.library({identifier=jenkins@20211123, retriever=null}) - detectDockerAgent.readYaml({file=manifests/templates/opensearch/1.x/os-template-1.1.0.yml}) - InputManifest.asBoolean() - detectDockerAgent.echo(Using Docker image opensearchstaging/ci-runner:ci-runner-centos7-v1 (null)) - detectDockerAgent.echo(Using java version openjdk-17) - DetectDockerImage_Jenkinsfile.echo(opensearchstaging/ci-runner:ci-runner-centos7-v1) - DetectDockerImage_Jenkinsfile.echo(null) - DetectDockerImage_Jenkinsfile.echo(openjdk-17) - DetectDockerImage_Jenkinsfile.stage(opensearch-1.2.0, groovy.lang.Closure) - DetectDockerImage_Jenkinsfile.script(groovy.lang.Closure) - DetectDockerImage_Jenkinsfile.detectDockerAgent({manifest=manifests/templates/opensearch/1.x/os-template-1.2.0.yml}) - detectDockerAgent.legacySCM(groovy.lang.Closure) - detectDockerAgent.library({identifier=jenkins@20211123, retriever=null}) - detectDockerAgent.readYaml({file=manifests/templates/opensearch/1.x/os-template-1.2.0.yml}) - InputManifest.asBoolean() - detectDockerAgent.echo(Using Docker image opensearchstaging/ci-runner:centos7-x64-arm64-jdkmulti-node10.24.1-cypress6.9.1-20211028 (-e JAVA_HOME=/usr/lib/jvm/adoptopenjdk-14-hotspot)) - detectDockerAgent.echo(Using java version openjdk-14) - DetectDockerImage_Jenkinsfile.echo(opensearchstaging/ci-runner:centos7-x64-arm64-jdkmulti-node10.24.1-cypress6.9.1-20211028) - DetectDockerImage_Jenkinsfile.echo(-e JAVA_HOME=/usr/lib/jvm/adoptopenjdk-14-hotspot) - DetectDockerImage_Jenkinsfile.echo(openjdk-14) - DetectDockerImage_Jenkinsfile.stage(opensearch-dashboards-1.1.0, groovy.lang.Closure) - DetectDockerImage_Jenkinsfile.script(groovy.lang.Closure) - DetectDockerImage_Jenkinsfile.detectDockerAgent({manifest=manifests/templates/opensearch-dashboards/1.x/osd-template-1.1.0.yml}) - detectDockerAgent.legacySCM(groovy.lang.Closure) - detectDockerAgent.library({identifier=jenkins@20211123, retriever=null}) - detectDockerAgent.readYaml({file=manifests/templates/opensearch-dashboards/1.x/osd-template-1.1.0.yml}) - InputManifest.asBoolean() - detectDockerAgent.echo(Using Docker image opensearchstaging/ci-runner:centos7-x64-arm64-jdkmulti-node10.24.1-cypress6.9.1-20211028 (null)) - detectDockerAgent.echo(Using java version openjdk-17) - DetectDockerImage_Jenkinsfile.echo(opensearchstaging/ci-runner:centos7-x64-arm64-jdkmulti-node10.24.1-cypress6.9.1-20211028) - DetectDockerImage_Jenkinsfile.echo(null) - DetectDockerImage_Jenkinsfile.echo(openjdk-17) - DetectDockerImage_Jenkinsfile.stage(opensearch-dashboards-1.2.0, groovy.lang.Closure) - DetectDockerImage_Jenkinsfile.script(groovy.lang.Closure) - DetectDockerImage_Jenkinsfile.detectDockerAgent({manifest=legacy-manifests/1.2.0/opensearch-dashboards-1.2.0.yml}) - detectDockerAgent.legacySCM(groovy.lang.Closure) - detectDockerAgent.library({identifier=jenkins@20211123, retriever=null}) - detectDockerAgent.readYaml({file=legacy-manifests/1.2.0/opensearch-dashboards-1.2.0.yml}) - InputManifest.asBoolean() - detectDockerAgent.echo(Using Docker image opensearchstaging/ci-runner:centos7-x64-arm64-jdkmulti-node10.24.1-cypress6.9.1-20211028 (null)) - detectDockerAgent.echo(Using java version openjdk-17) - DetectDockerImage_Jenkinsfile.echo(opensearchstaging/ci-runner:centos7-x64-arm64-jdkmulti-node10.24.1-cypress6.9.1-20211028) - DetectDockerImage_Jenkinsfile.echo(null) - DetectDockerImage_Jenkinsfile.echo(openjdk-17) diff --git a/tests/jenkins/jobs/DetectTestDockerAgent_Jenkinsfile b/tests/jenkins/jobs/DetectTestDockerAgent_Jenkinsfile deleted file mode 100644 index a11850b9c5..0000000000 --- a/tests/jenkins/jobs/DetectTestDockerAgent_Jenkinsfile +++ /dev/null @@ -1,22 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -pipeline { - agent none - stages { - stage('detect test docker') { - steps { - script { - detectTestDockerAgent( - testManifest: 'tests/jenkins/data/opensearch-1.3.0-test.yml', - ) - } - } - } - } -} \ No newline at end of file diff --git a/tests/jenkins/jobs/DetectTestDockerAgent_Jenkinsfile.txt b/tests/jenkins/jobs/DetectTestDockerAgent_Jenkinsfile.txt deleted file mode 100644 index edd4259856..0000000000 --- a/tests/jenkins/jobs/DetectTestDockerAgent_Jenkinsfile.txt +++ /dev/null @@ -1,11 +0,0 @@ - DetectTestDockerAgent_Jenkinsfile.run() - DetectTestDockerAgent_Jenkinsfile.pipeline(groovy.lang.Closure) - DetectTestDockerAgent_Jenkinsfile.echo(Executing on agent [label:none]) - DetectTestDockerAgent_Jenkinsfile.stage(detect test docker, groovy.lang.Closure) - DetectTestDockerAgent_Jenkinsfile.script(groovy.lang.Closure) - DetectTestDockerAgent_Jenkinsfile.detectTestDockerAgent({testManifest=tests/jenkins/data/opensearch-1.3.0-test.yml}) - detectTestDockerAgent.legacySCM(groovy.lang.Closure) - detectTestDockerAgent.library({identifier=jenkins@20211123, retriever=null}) - detectTestDockerAgent.readYaml({file=tests/jenkins/data/opensearch-1.3.0-test.yml}) - TestManifest.asBoolean() - detectTestDockerAgent.echo(Using Docker image opensearchstaging/ci-runner:ci-runner-centos7-v1 (null)) diff --git a/tests/jenkins/jobs/DownloadFromS3_Jenkinsfile b/tests/jenkins/jobs/DownloadFromS3_Jenkinsfile deleted file mode 100644 index 0f6f30f779..0000000000 --- a/tests/jenkins/jobs/DownloadFromS3_Jenkinsfile +++ /dev/null @@ -1,25 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -pipeline { - agent none - stages { - stage('download') { - steps { - script { - downloadFromS3( - destPath: '/tmp/src/path', - bucket: 'dummy_bucket', - path: '/download/path', - force: true - ) - } - } - } - } -} \ No newline at end of file diff --git a/tests/jenkins/jobs/DownloadFromS3_Jenkinsfile.txt b/tests/jenkins/jobs/DownloadFromS3_Jenkinsfile.txt deleted file mode 100644 index d8eb6c1c83..0000000000 --- a/tests/jenkins/jobs/DownloadFromS3_Jenkinsfile.txt +++ /dev/null @@ -1,10 +0,0 @@ - DownloadFromS3_Jenkinsfile.run() - DownloadFromS3_Jenkinsfile.pipeline(groovy.lang.Closure) - DownloadFromS3_Jenkinsfile.echo(Executing on agent [label:none]) - DownloadFromS3_Jenkinsfile.stage(download, groovy.lang.Closure) - DownloadFromS3_Jenkinsfile.script(groovy.lang.Closure) - DownloadFromS3_Jenkinsfile.downloadFromS3({destPath=/tmp/src/path, bucket=dummy_bucket, path=/download/path, force=true}) - downloadFromS3.string({credentialsId=jenkins-aws-account-public, variable=AWS_ACCOUNT_PUBLIC}) - downloadFromS3.withCredentials([AWS_ACCOUNT_PUBLIC], groovy.lang.Closure) - downloadFromS3.withAWS({role=opensearch-bundle, roleAccount=AWS_ACCOUNT_PUBLIC, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure) - downloadFromS3.s3Download({file=/tmp/src/path, bucket=dummy_bucket, path=/download/path, force=true}) diff --git a/tests/jenkins/jobs/GetManifestSHA_Jenkinsfile b/tests/jenkins/jobs/GetManifestSHA_Jenkinsfile deleted file mode 100644 index 3100489237..0000000000 --- a/tests/jenkins/jobs/GetManifestSHA_Jenkinsfile +++ /dev/null @@ -1,21 +0,0 @@ -pipeline { - agent none - stages { - stage('manifest SHA') { - steps { - script { - def sha = getManifestSHA( - inputManifest: 'tests/jenkins/data/opensearch-1.3.0.yml', - platform: 'linux', - architecture: 'x64' - ) - - echo "sha: ${sha.sha}" - echo "exists: ${sha.exists}" - echo "lock: ${sha.lock}" - echo "path: ${sha.path}" - } - } - } - } -} diff --git a/tests/jenkins/jobs/GetManifestSHA_Jenkinsfile_does_not_exist.txt b/tests/jenkins/jobs/GetManifestSHA_Jenkinsfile_does_not_exist.txt deleted file mode 100644 index 219eadbcc4..0000000000 --- a/tests/jenkins/jobs/GetManifestSHA_Jenkinsfile_does_not_exist.txt +++ /dev/null @@ -1,27 +0,0 @@ - GetManifestSHA_Jenkinsfile.run() - GetManifestSHA_Jenkinsfile.pipeline(groovy.lang.Closure) - GetManifestSHA_Jenkinsfile.echo(Executing on agent [label:none]) - GetManifestSHA_Jenkinsfile.stage(manifest SHA, groovy.lang.Closure) - GetManifestSHA_Jenkinsfile.script(groovy.lang.Closure) - GetManifestSHA_Jenkinsfile.getManifestSHA({inputManifest=tests/jenkins/data/opensearch-1.3.0.yml, platform=linux, architecture=x64}) - getManifestSHA.buildManifest({inputManifest=tests/jenkins/data/opensearch-1.3.0.yml, platform=linux, architecture=x64, lock=true}) - buildManifest.sh(./build.sh tests/jenkins/data/opensearch-1.3.0.yml -p linux -a x64 --lock) - getManifestSHA.sha1(tests/jenkins/data/opensearch-1.3.0.yml.lock) - getManifestSHA.echo(Manifest SHA: sha1) - getManifestSHA.legacySCM(groovy.lang.Closure) - getManifestSHA.library({identifier=jenkins@20211123, retriever=null}) - getManifestSHA.readYaml({file=tests/jenkins/data/opensearch-1.3.0.yml.lock}) - InputManifest.asBoolean() - InputManifest.getSHAsRoot(get-manifest-sha-build) - getManifestSHA.echo(Manifest lock: tests/jenkins/data/opensearch-1.3.0.yml.lock) - getManifestSHA.echo(Manifest SHA path: get-manifest-sha-build/1.3.0/shas/sha1.yml) - getManifestSHA.string({credentialsId=jenkins-aws-account-public, variable=AWS_ACCOUNT_PUBLIC}) - getManifestSHA.string({credentialsId=jenkins-artifact-bucket-name, variable=ARTIFACT_BUCKET_NAME}) - getManifestSHA.withCredentials([AWS_ACCOUNT_PUBLIC, ARTIFACT_BUCKET_NAME], groovy.lang.Closure) - getManifestSHA.withAWS({role=opensearch-bundle, roleAccount=AWS_ACCOUNT_PUBLIC, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure) - getManifestSHA.s3DoesObjectExist({bucket=ARTIFACT_BUCKET_NAME, path=get-manifest-sha-build/1.3.0/shas/sha1.yml}) - getManifestSHA.echo(Manifest SHA exists: false) - GetManifestSHA_Jenkinsfile.echo(sha: sha1) - GetManifestSHA_Jenkinsfile.echo(exists: false) - GetManifestSHA_Jenkinsfile.echo(lock: tests/jenkins/data/opensearch-1.3.0.yml.lock) - GetManifestSHA_Jenkinsfile.echo(path: get-manifest-sha-build/1.3.0/shas/sha1.yml) diff --git a/tests/jenkins/jobs/GetManifestSHA_Jenkinsfile_exists.txt b/tests/jenkins/jobs/GetManifestSHA_Jenkinsfile_exists.txt deleted file mode 100644 index 5a18992ce9..0000000000 --- a/tests/jenkins/jobs/GetManifestSHA_Jenkinsfile_exists.txt +++ /dev/null @@ -1,27 +0,0 @@ - GetManifestSHA_Jenkinsfile.run() - GetManifestSHA_Jenkinsfile.pipeline(groovy.lang.Closure) - GetManifestSHA_Jenkinsfile.echo(Executing on agent [label:none]) - GetManifestSHA_Jenkinsfile.stage(manifest SHA, groovy.lang.Closure) - GetManifestSHA_Jenkinsfile.script(groovy.lang.Closure) - GetManifestSHA_Jenkinsfile.getManifestSHA({inputManifest=tests/jenkins/data/opensearch-1.3.0.yml, platform=linux, architecture=x64}) - getManifestSHA.buildManifest({inputManifest=tests/jenkins/data/opensearch-1.3.0.yml, platform=linux, architecture=x64, lock=true}) - buildManifest.sh(./build.sh tests/jenkins/data/opensearch-1.3.0.yml -p linux -a x64 --lock) - getManifestSHA.sha1(tests/jenkins/data/opensearch-1.3.0.yml.lock) - getManifestSHA.echo(Manifest SHA: sha1) - getManifestSHA.legacySCM(groovy.lang.Closure) - getManifestSHA.library({identifier=jenkins@20211123, retriever=null}) - getManifestSHA.readYaml({file=tests/jenkins/data/opensearch-1.3.0.yml.lock}) - InputManifest.asBoolean() - InputManifest.getSHAsRoot(get-manifest-sha-build) - getManifestSHA.echo(Manifest lock: tests/jenkins/data/opensearch-1.3.0.yml.lock) - getManifestSHA.echo(Manifest SHA path: get-manifest-sha-build/1.3.0/shas/sha1.yml) - getManifestSHA.string({credentialsId=jenkins-aws-account-public, variable=AWS_ACCOUNT_PUBLIC}) - getManifestSHA.string({credentialsId=jenkins-artifact-bucket-name, variable=ARTIFACT_BUCKET_NAME}) - getManifestSHA.withCredentials([AWS_ACCOUNT_PUBLIC, ARTIFACT_BUCKET_NAME], groovy.lang.Closure) - getManifestSHA.withAWS({role=opensearch-bundle, roleAccount=AWS_ACCOUNT_PUBLIC, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure) - getManifestSHA.s3DoesObjectExist({bucket=ARTIFACT_BUCKET_NAME, path=get-manifest-sha-build/1.3.0/shas/sha1.yml}) - getManifestSHA.echo(Manifest SHA exists: true) - GetManifestSHA_Jenkinsfile.echo(sha: sha1) - GetManifestSHA_Jenkinsfile.echo(exists: true) - GetManifestSHA_Jenkinsfile.echo(lock: tests/jenkins/data/opensearch-1.3.0.yml.lock) - GetManifestSHA_Jenkinsfile.echo(path: get-manifest-sha-build/1.3.0/shas/sha1.yml) diff --git a/tests/jenkins/jobs/Hello_Jenkinsfile b/tests/jenkins/jobs/Hello_Jenkinsfile deleted file mode 100644 index 2f5c1d21dc..0000000000 --- a/tests/jenkins/jobs/Hello_Jenkinsfile +++ /dev/null @@ -1,13 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -def greet = 'Hello World!' - -node() { - echo greet -} diff --git a/tests/jenkins/jobs/Hello_Jenkinsfile.txt b/tests/jenkins/jobs/Hello_Jenkinsfile.txt deleted file mode 100644 index 37e0121b9c..0000000000 --- a/tests/jenkins/jobs/Hello_Jenkinsfile.txt +++ /dev/null @@ -1,3 +0,0 @@ - Hello_Jenkinsfile.run() - Hello_Jenkinsfile.node(groovy.lang.Closure) - Hello_Jenkinsfile.echo(Hello World!) diff --git a/tests/jenkins/jobs/InputManifest_Jenkinsfile b/tests/jenkins/jobs/InputManifest_Jenkinsfile deleted file mode 100644 index e0c073ce5f..0000000000 --- a/tests/jenkins/jobs/InputManifest_Jenkinsfile +++ /dev/null @@ -1,43 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -lib = library(identifier: 'jenkins@1.0.0', retriever: modernSCM([ - $class: 'GitSCMSource', - remote: 'https://github.com/opensearch-project/opensearch-build-libraries.git', -])) - -pipeline { - agent none - stages { - stage('input manifest 1.1.0') { - steps { - script { - def inputManifest = lib.jenkins.InputManifest.new(readYaml(file: "manifests/templates/opensearch/1.x/os-template-1.1.0.yml")) - echo inputManifest.ci - echo inputManifest.build.name - echo inputManifest.build.version - echo inputManifest.build.getFilename() - echo inputManifest.getSHAsRoot('bundle-build') - } - } - } - stage('input manifest 1.2.0') { - steps { - script { - def inputManifest = lib.jenkins.InputManifest.new(readYaml(file: "manifests/templates/opensearch/1.x/os-template-1.2.0.yml")) - echo inputManifest.ci.image.name - echo inputManifest.ci.image.args - echo inputManifest.build.name - echo inputManifest.build.version - echo inputManifest.build.getFilename() - echo inputManifest.getSHAsRoot('bundle-build') - } - } - } - } -} \ No newline at end of file diff --git a/tests/jenkins/jobs/InputManifest_Jenkinsfile.txt b/tests/jenkins/jobs/InputManifest_Jenkinsfile.txt deleted file mode 100644 index 80b78ebe4a..0000000000 --- a/tests/jenkins/jobs/InputManifest_Jenkinsfile.txt +++ /dev/null @@ -1,26 +0,0 @@ - InputManifest_Jenkinsfile.run() - InputManifest_Jenkinsfile.modernSCM({$class=GitSCMSource, remote=https://github.com/opensearch-project/opensearch-build-libraries.git}) - InputManifest_Jenkinsfile.library({identifier=jenkins@1.0.0, retriever=null}) - InputManifest_Jenkinsfile.pipeline(groovy.lang.Closure) - InputManifest_Jenkinsfile.echo(Executing on agent [label:none]) - InputManifest_Jenkinsfile.stage(input manifest 1.1.0, groovy.lang.Closure) - InputManifest_Jenkinsfile.script(groovy.lang.Closure) - InputManifest_Jenkinsfile.readYaml({file=manifests/templates/opensearch/1.x/os-template-1.1.0.yml}) - InputManifest.asBoolean() - InputManifest_Jenkinsfile.echo(null) - InputManifest_Jenkinsfile.echo(OpenSearch) - InputManifest_Jenkinsfile.echo(1.1.0) - InputManifest_Jenkinsfile.echo(opensearch) - InputManifest.getSHAsRoot(bundle-build) - InputManifest_Jenkinsfile.echo(bundle-build/1.1.0/shas) - InputManifest_Jenkinsfile.stage(input manifest 1.2.0, groovy.lang.Closure) - InputManifest_Jenkinsfile.script(groovy.lang.Closure) - InputManifest_Jenkinsfile.readYaml({file=manifests/templates/opensearch/1.x/os-template-1.2.0.yml}) - InputManifest.asBoolean() - InputManifest_Jenkinsfile.echo(opensearchstaging/ci-runner:centos7-x64-arm64-jdkmulti-node10.24.1-cypress6.9.1-20211028) - InputManifest_Jenkinsfile.echo(-e JAVA_HOME=/usr/lib/jvm/adoptopenjdk-14-hotspot) - InputManifest_Jenkinsfile.echo(OpenSearch) - InputManifest_Jenkinsfile.echo(1.2.0) - InputManifest_Jenkinsfile.echo(opensearch) - InputManifest.getSHAsRoot(bundle-build) - InputManifest_Jenkinsfile.echo(bundle-build/1.2.0/shas) diff --git a/tests/jenkins/jobs/Messages_Jenkinsfile b/tests/jenkins/jobs/Messages_Jenkinsfile deleted file mode 100644 index 9ab6b35876..0000000000 --- a/tests/jenkins/jobs/Messages_Jenkinsfile +++ /dev/null @@ -1,36 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -lib = library(identifier: 'jenkins@1.0.0', retriever: modernSCM([ - $class: 'GitSCMSource', - remote: 'https://github.com/opensearch-project/opensearch-build-libraries.git', -])) - -pipeline { - agent none - stages { - stage('Example Build') { - steps { - script { - def messages = lib.jenkins.Messages.new(this) - messages.add("stage1", "message 1") - messages.add("stage2", "message 2") - } - } - } - post() { - success { - script { - def messages = lib.jenkins.Messages.new(this) - def stashed = messages.get(["stage1", "stage2"]) - echo stashed - } - } - } - } -} \ No newline at end of file diff --git a/tests/jenkins/jobs/Messages_Jenkinsfile.txt b/tests/jenkins/jobs/Messages_Jenkinsfile.txt deleted file mode 100644 index b0f76c6657..0000000000 --- a/tests/jenkins/jobs/Messages_Jenkinsfile.txt +++ /dev/null @@ -1,23 +0,0 @@ - Messages_Jenkinsfile.run() - Messages_Jenkinsfile.modernSCM({$class=GitSCMSource, remote=https://github.com/opensearch-project/opensearch-build-libraries.git}) - Messages_Jenkinsfile.library({identifier=jenkins@1.0.0, retriever=null}) - Messages_Jenkinsfile.pipeline(groovy.lang.Closure) - Messages_Jenkinsfile.echo(Executing on agent [label:none]) - Messages_Jenkinsfile.stage(Example Build, groovy.lang.Closure) - Messages_Jenkinsfile.script(groovy.lang.Closure) - Messages.asBoolean() - Messages.add(stage1, message 1) - Messages_Jenkinsfile.writeFile({file=messages/stage1.msg, text=message 1}) - Messages_Jenkinsfile.stash({includes=messages/*, name=messages-stage1}) - Messages.add(stage2, message 2) - Messages_Jenkinsfile.writeFile({file=messages/stage2.msg, text=message 2}) - Messages_Jenkinsfile.stash({includes=messages/*, name=messages-stage2}) - Messages_Jenkinsfile.script(groovy.lang.Closure) - Messages.asBoolean() - Messages.get([stage1, stage2]) - Messages_Jenkinsfile.unstash({name=messages-stage1}) - Messages_Jenkinsfile.unstash({name=messages-stage2}) - Messages_Jenkinsfile.findFiles({excludes=, glob=messages/*}) - Messages_Jenkinsfile.dir(messages, groovy.lang.Closure) - Messages_Jenkinsfile.deleteDir() - Messages_Jenkinsfile.echo() diff --git a/tests/jenkins/jobs/ParallelMessages_Jenkinsfile b/tests/jenkins/jobs/ParallelMessages_Jenkinsfile deleted file mode 100644 index 28b57ac98e..0000000000 --- a/tests/jenkins/jobs/ParallelMessages_Jenkinsfile +++ /dev/null @@ -1,82 +0,0 @@ -lib = library(identifier: 'jenkins@1.0.0', retriever: modernSCM([ - $class: 'GitSCMSource', - remote: 'https://github.com/opensearch-project/opensearch-build-libraries.git', -])) - -pipeline { - agent none - stages { - stage('build') { - parallel { - stage('build-on-host') { - steps { - node('Jenkins-Agent-AL2-X64-C54xlarge-Docker-Host') { - script { - def messages = lib.jenkins.Messages.new(this); - messages.add("${STAGE_NAME}", "built ${STAGE_NAME}") - } - } - } - } - stage('build-snapshots') { - agent { - docker { - label 'Jenkins-Agent-AL2-X64-C54xlarge-Docker-Host' - image 'ubuntu:latest' - alwaysPull - } - } - steps { - script { - build() - } - } - } - stage('build-x86') { - agent { - docker { - label 'Jenkins-Agent-AL2-X64-C54xlarge-Docker-Host' - image 'amazonlinux' - alwaysPull - } - } - steps { - script { - build() - } - } - } - stage('build-arm64') { - agent { - docker { - label 'Jenkins-Agent-AL2-Arm64-C6g4xlarge-Docker-Host' - image 'ubuntu:jammy' - alwaysPull - } - } - steps { - script { - build() - } - } - } - } - post() { - success { - node('Jenkins-Agent-AL2-X64-C54xlarge-Docker-Host') { - script { - def messages = lib.jenkins.Messages.new(this) - def stashed = messages.get(['build-on-host', 'build-snapshots', 'build-x86', 'build-arm64']) - echo stashed - } - } - } - } - } - } -} - -def build() { - def messages = lib.jenkins.Messages.new(this); - messages.add("${STAGE_NAME}", "built ${STAGE_NAME}") -} \ No newline at end of file diff --git a/tests/jenkins/jobs/PostCleanup_Jenkinsfile b/tests/jenkins/jobs/PostCleanup_Jenkinsfile deleted file mode 100644 index 1cbca416c5..0000000000 --- a/tests/jenkins/jobs/PostCleanup_Jenkinsfile +++ /dev/null @@ -1,17 +0,0 @@ -pipeline { - agent none - stages { - stage('cleanup') { - steps { - script { - - } - } - } - post { - script { - postCleanup() - } - } - } -} diff --git a/tests/jenkins/jobs/PostCleanup_Jenkinsfile.txt b/tests/jenkins/jobs/PostCleanup_Jenkinsfile.txt deleted file mode 100644 index b42bdec907..0000000000 --- a/tests/jenkins/jobs/PostCleanup_Jenkinsfile.txt +++ /dev/null @@ -1,8 +0,0 @@ - PostCleanup_Jenkinsfile.run() - PostCleanup_Jenkinsfile.pipeline(groovy.lang.Closure) - PostCleanup_Jenkinsfile.script(groovy.lang.Closure) - PostCleanup_Jenkinsfile.postCleanup() - postCleanup.cleanWs({disableDeferredWipeout=true, deleteDirs=true}) - PostCleanup_Jenkinsfile.echo(Executing on agent [label:none]) - PostCleanup_Jenkinsfile.stage(cleanup, groovy.lang.Closure) - PostCleanup_Jenkinsfile.script(groovy.lang.Closure) diff --git a/tests/jenkins/jobs/PrintArtifactDownloadUrlsForStaging_Jenkinsfile b/tests/jenkins/jobs/PrintArtifactDownloadUrlsForStaging_Jenkinsfile deleted file mode 100644 index 5f6e87e081..0000000000 --- a/tests/jenkins/jobs/PrintArtifactDownloadUrlsForStaging_Jenkinsfile +++ /dev/null @@ -1,15 +0,0 @@ -pipeline { - agent none - stages { - stage('print_urls') { - steps { - script { - printArtifactDownloadUrlsForStaging( - artifactFileNames: ['dummy_file.tar.gz', 'dummy_file.tar.gz.sig', 'a_dummy_file.tar.gz'], - uploadPath: 'dummy/upload/path' - ) - } - } - } - } -} diff --git a/tests/jenkins/jobs/PrintArtifactDownloadUrlsForStaging_Jenkinsfile.txt b/tests/jenkins/jobs/PrintArtifactDownloadUrlsForStaging_Jenkinsfile.txt deleted file mode 100644 index 8cebd61fb2..0000000000 --- a/tests/jenkins/jobs/PrintArtifactDownloadUrlsForStaging_Jenkinsfile.txt +++ /dev/null @@ -1,9 +0,0 @@ - PrintArtifactDownloadUrlsForStaging_Jenkinsfile.run() - PrintArtifactDownloadUrlsForStaging_Jenkinsfile.pipeline(groovy.lang.Closure) - PrintArtifactDownloadUrlsForStaging_Jenkinsfile.echo(Executing on agent [label:none]) - PrintArtifactDownloadUrlsForStaging_Jenkinsfile.stage(print_urls, groovy.lang.Closure) - PrintArtifactDownloadUrlsForStaging_Jenkinsfile.script(groovy.lang.Closure) - PrintArtifactDownloadUrlsForStaging_Jenkinsfile.printArtifactDownloadUrlsForStaging({artifactFileNames=[dummy_file.tar.gz, dummy_file.tar.gz.sig, a_dummy_file.tar.gz], uploadPath=dummy/upload/path}) - printArtifactDownloadUrlsForStaging.echo(File dummy_file.tar.gz can be accessed using the url - https://ci.opensearch.org/ci/dbc/dummy/upload/path/dummy_file.tar.gz) - printArtifactDownloadUrlsForStaging.echo(File dummy_file.tar.gz.sig can be accessed using the url - https://ci.opensearch.org/ci/dbc/dummy/upload/path/dummy_file.tar.gz.sig) - printArtifactDownloadUrlsForStaging.echo(File a_dummy_file.tar.gz can be accessed using the url - https://ci.opensearch.org/ci/dbc/dummy/upload/path/a_dummy_file.tar.gz) diff --git a/tests/jenkins/jobs/PromoteArtifactsQualifier_Jenkinsfile b/tests/jenkins/jobs/PromoteArtifactsQualifier_Jenkinsfile deleted file mode 100644 index f1a24627c2..0000000000 --- a/tests/jenkins/jobs/PromoteArtifactsQualifier_Jenkinsfile +++ /dev/null @@ -1,14 +0,0 @@ -pipeline { - agent none - stages { - stage('promote') { - steps { - script { - promoteArtifacts( - manifest: 'tests/jenkins/data/opensearch-2.0.0-rc1.yml' - ) - } - } - } - } -} diff --git a/tests/jenkins/jobs/PromoteArtifactsQualifier_Jenkinsfile.txt b/tests/jenkins/jobs/PromoteArtifactsQualifier_Jenkinsfile.txt deleted file mode 100644 index 1a75c7f2b9..0000000000 --- a/tests/jenkins/jobs/PromoteArtifactsQualifier_Jenkinsfile.txt +++ /dev/null @@ -1,35 +0,0 @@ - PromoteArtifactsQualifier_Jenkinsfile.run() - PromoteArtifactsQualifier_Jenkinsfile.pipeline(groovy.lang.Closure) - PromoteArtifactsQualifier_Jenkinsfile.echo(Executing on agent [label:none]) - PromoteArtifactsQualifier_Jenkinsfile.stage(promote, groovy.lang.Closure) - PromoteArtifactsQualifier_Jenkinsfile.script(groovy.lang.Closure) - PromoteArtifactsQualifier_Jenkinsfile.promoteArtifacts({manifest=tests/jenkins/data/opensearch-2.0.0-rc1.yml}) - promoteArtifacts.legacySCM(groovy.lang.Closure) - promoteArtifacts.library({identifier=jenkins@20211123, retriever=null}) - promoteArtifacts.readYaml({file=tests/jenkins/data/opensearch-2.0.0-rc1.yml}) - InputManifest.asBoolean() - promoteArtifacts.string({credentialsId=jenkins-aws-account-public, variable=AWS_ACCOUNT_PUBLIC}) - promoteArtifacts.string({credentialsId=jenkins-artifact-bucket-name, variable=ARTIFACT_BUCKET_NAME}) - promoteArtifacts.string({credentialsId=jenkins-artifact-promotion-role, variable=ARTIFACT_PROMOTION_ROLE_NAME}) - promoteArtifacts.string({credentialsId=jenkins-aws-production-account, variable=AWS_ACCOUNT_ARTIFACT}) - promoteArtifacts.string({credentialsId=jenkins-artifact-production-bucket-name, variable=ARTIFACT_PRODUCTION_BUCKET_NAME}) - promoteArtifacts.withCredentials([AWS_ACCOUNT_PUBLIC, ARTIFACT_BUCKET_NAME, ARTIFACT_PROMOTION_ROLE_NAME, AWS_ACCOUNT_ARTIFACT, ARTIFACT_PRODUCTION_BUCKET_NAME], groovy.lang.Closure) - promoteArtifacts.println(S3 download tar artifacts before creating signatures) - promoteArtifacts.withAWS({role=opensearch-bundle, roleAccount=AWS_ACCOUNT_PUBLIC, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure) - promoteArtifacts.s3Download({bucket=ARTIFACT_BUCKET_NAME, file=tests/jenkins/artifacts/tar, path=vars-build/2.0.0-rc1/33/linux/x64/tar/, force=true}) - promoteArtifacts.readYaml({file=tests/jenkins/artifacts/tar/vars-build/2.0.0-rc1/33/linux/x64/tar/builds/opensearch/manifest.yml}) - promoteArtifacts.fileExists(tests/jenkins/artifacts/tar/vars-build/2.0.0-rc1/33/linux/x64/tar/builds/opensearch/core-plugins) - promoteArtifacts.println(Signing Starts) - promoteArtifacts.println(Signing Core/Bundle Artifacts) - promoteArtifacts.withAWS({role=ARTIFACT_PROMOTION_ROLE_NAME, roleAccount=AWS_ACCOUNT_ARTIFACT, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure) - promoteArtifacts.s3Upload({bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=releases/core/opensearch/2.0.0-rc1/, workingDir=tests/jenkins/artifacts/tar/vars-build/2.0.0-rc1/33/linux/x64/tar/builds/opensearch/dist/, includePathPattern=**/opensearch-min-2.0.0-rc1-linux-x64*}) - promoteArtifacts.s3Upload({bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=releases/bundle/opensearch/2.0.0-rc1/, workingDir=tests/jenkins/artifacts/tar/vars-build/2.0.0-rc1/33/linux/x64/tar/dist/opensearch/, includePathPattern=**/opensearch-2.0.0-rc1-linux-x64*}) - promoteArtifacts.println(S3 download rpm artifacts before creating signatures) - promoteArtifacts.withAWS({role=opensearch-bundle, roleAccount=AWS_ACCOUNT_PUBLIC, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure) - promoteArtifacts.s3Download({bucket=ARTIFACT_BUCKET_NAME, file=tests/jenkins/artifacts/rpm, path=vars-build/2.0.0-rc1/33/linux/x64/rpm/, force=true}) - promoteArtifacts.readYaml({file=tests/jenkins/artifacts/rpm/vars-build/2.0.0-rc1/33/linux/x64/rpm/builds/opensearch/manifest.yml}) - promoteArtifacts.fileExists(tests/jenkins/artifacts/rpm/vars-build/2.0.0-rc1/33/linux/x64/rpm/builds/opensearch/core-plugins) - promoteArtifacts.println(Signing Starts) - promoteArtifacts.println(Signing Core/Bundle Artifacts) - promoteArtifacts.withAWS({role=ARTIFACT_PROMOTION_ROLE_NAME, roleAccount=AWS_ACCOUNT_ARTIFACT, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure) - promoteArtifacts.s3Upload({bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=releases/bundle/opensearch/2.0.0-rc1/, workingDir=tests/jenkins/artifacts/rpm/vars-build/2.0.0-rc1/33/linux/x64/rpm/dist/opensearch/, includePathPattern=**/opensearch-2.0.0-rc1-linux-x64*}) diff --git a/tests/jenkins/jobs/PromoteArtifactsQualifier_OpenSearch_Dashboards_Jenkinsfile b/tests/jenkins/jobs/PromoteArtifactsQualifier_OpenSearch_Dashboards_Jenkinsfile deleted file mode 100644 index be3064df6b..0000000000 --- a/tests/jenkins/jobs/PromoteArtifactsQualifier_OpenSearch_Dashboards_Jenkinsfile +++ /dev/null @@ -1,14 +0,0 @@ -pipeline { - agent none - stages { - stage('promote') { - steps { - script { - promoteArtifacts( - manifest: 'tests/jenkins/data/opensearch-dashboards-2.0.0-rc1.yml' - ) - } - } - } - } -} diff --git a/tests/jenkins/jobs/PromoteArtifactsQualifier_OpenSearch_Dashboards_Jenkinsfile.txt b/tests/jenkins/jobs/PromoteArtifactsQualifier_OpenSearch_Dashboards_Jenkinsfile.txt deleted file mode 100644 index d72924bc28..0000000000 --- a/tests/jenkins/jobs/PromoteArtifactsQualifier_OpenSearch_Dashboards_Jenkinsfile.txt +++ /dev/null @@ -1,35 +0,0 @@ - PromoteArtifactsQualifier_OpenSearch_Dashboards_Jenkinsfile.run() - PromoteArtifactsQualifier_OpenSearch_Dashboards_Jenkinsfile.pipeline(groovy.lang.Closure) - PromoteArtifactsQualifier_OpenSearch_Dashboards_Jenkinsfile.echo(Executing on agent [label:none]) - PromoteArtifactsQualifier_OpenSearch_Dashboards_Jenkinsfile.stage(promote, groovy.lang.Closure) - PromoteArtifactsQualifier_OpenSearch_Dashboards_Jenkinsfile.script(groovy.lang.Closure) - PromoteArtifactsQualifier_OpenSearch_Dashboards_Jenkinsfile.promoteArtifacts({manifest=tests/jenkins/data/opensearch-dashboards-2.0.0-rc1.yml}) - promoteArtifacts.legacySCM(groovy.lang.Closure) - promoteArtifacts.library({identifier=jenkins@20211123, retriever=null}) - promoteArtifacts.readYaml({file=tests/jenkins/data/opensearch-dashboards-2.0.0-rc1.yml}) - InputManifest.asBoolean() - promoteArtifacts.string({credentialsId=jenkins-aws-account-public, variable=AWS_ACCOUNT_PUBLIC}) - promoteArtifacts.string({credentialsId=jenkins-artifact-bucket-name, variable=ARTIFACT_BUCKET_NAME}) - promoteArtifacts.string({credentialsId=jenkins-artifact-promotion-role, variable=ARTIFACT_PROMOTION_ROLE_NAME}) - promoteArtifacts.string({credentialsId=jenkins-aws-production-account, variable=AWS_ACCOUNT_ARTIFACT}) - promoteArtifacts.string({credentialsId=jenkins-artifact-production-bucket-name, variable=ARTIFACT_PRODUCTION_BUCKET_NAME}) - promoteArtifacts.withCredentials([AWS_ACCOUNT_PUBLIC, ARTIFACT_BUCKET_NAME, ARTIFACT_PROMOTION_ROLE_NAME, AWS_ACCOUNT_ARTIFACT, ARTIFACT_PRODUCTION_BUCKET_NAME], groovy.lang.Closure) - promoteArtifacts.println(S3 download tar artifacts before creating signatures) - promoteArtifacts.withAWS({role=opensearch-bundle, roleAccount=AWS_ACCOUNT_PUBLIC, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure) - promoteArtifacts.s3Download({bucket=ARTIFACT_BUCKET_NAME, file=tests/jenkins/artifacts/tar, path=vars-build/2.0.0-rc1/33/linux/x64/tar/, force=true}) - promoteArtifacts.readYaml({file=tests/jenkins/artifacts/tar/vars-build/2.0.0-rc1/33/linux/x64/tar/builds/opensearch-dashboards/manifest.yml}) - promoteArtifacts.fileExists(tests/jenkins/artifacts/tar/vars-build/2.0.0-rc1/33/linux/x64/tar/builds/opensearch-dashboards/core-plugins) - promoteArtifacts.println(Signing Starts) - promoteArtifacts.println(Signing Core/Bundle Artifacts) - promoteArtifacts.withAWS({role=ARTIFACT_PROMOTION_ROLE_NAME, roleAccount=AWS_ACCOUNT_ARTIFACT, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure) - promoteArtifacts.s3Upload({bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=releases/core/opensearch-dashboards/2.0.0-rc1/, workingDir=tests/jenkins/artifacts/tar/vars-build/2.0.0-rc1/33/linux/x64/tar/builds/opensearch-dashboards/dist/, includePathPattern=**/opensearch-dashboards-min-2.0.0-rc1-linux-x64*}) - promoteArtifacts.s3Upload({bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=releases/bundle/opensearch-dashboards/2.0.0-rc1/, workingDir=tests/jenkins/artifacts/tar/vars-build/2.0.0-rc1/33/linux/x64/tar/dist/opensearch-dashboards/, includePathPattern=**/opensearch-dashboards-2.0.0-rc1-linux-x64*}) - promoteArtifacts.println(S3 download rpm artifacts before creating signatures) - promoteArtifacts.withAWS({role=opensearch-bundle, roleAccount=AWS_ACCOUNT_PUBLIC, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure) - promoteArtifacts.s3Download({bucket=ARTIFACT_BUCKET_NAME, file=tests/jenkins/artifacts/rpm, path=vars-build/2.0.0-rc1/33/linux/x64/rpm/, force=true}) - promoteArtifacts.readYaml({file=tests/jenkins/artifacts/rpm/vars-build/2.0.0-rc1/33/linux/x64/rpm/builds/opensearch-dashboards/manifest.yml}) - promoteArtifacts.fileExists(tests/jenkins/artifacts/rpm/vars-build/2.0.0-rc1/33/linux/x64/rpm/builds/opensearch-dashboards/core-plugins) - promoteArtifacts.println(Signing Starts) - promoteArtifacts.println(Signing Core/Bundle Artifacts) - promoteArtifacts.withAWS({role=ARTIFACT_PROMOTION_ROLE_NAME, roleAccount=AWS_ACCOUNT_ARTIFACT, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure) - promoteArtifacts.s3Upload({bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=releases/bundle/opensearch-dashboards/2.0.0-rc1/, workingDir=tests/jenkins/artifacts/rpm/vars-build/2.0.0-rc1/33/linux/x64/rpm/dist/opensearch-dashboards/, includePathPattern=**/opensearch-dashboards-2.0.0-rc1-linux-x64*}) diff --git a/tests/jenkins/jobs/PromoteArtifactsQualifier_actions_Jenkinsfile b/tests/jenkins/jobs/PromoteArtifactsQualifier_actions_Jenkinsfile deleted file mode 100644 index 87400987ca..0000000000 --- a/tests/jenkins/jobs/PromoteArtifactsQualifier_actions_Jenkinsfile +++ /dev/null @@ -1,15 +0,0 @@ -pipeline { - agent none - stages { - stage('promote') { - steps { - script { - promoteArtifacts( - manifest: 'tests/jenkins/data/opensearch-2.0.0-rc1.yml', - fileActions: [createSha512Checksums(), createSignatureFiles()] - ) - } - } - } - } -} diff --git a/tests/jenkins/jobs/PromoteArtifactsQualifier_actions_Jenkinsfile.txt b/tests/jenkins/jobs/PromoteArtifactsQualifier_actions_Jenkinsfile.txt deleted file mode 100644 index 3406463300..0000000000 --- a/tests/jenkins/jobs/PromoteArtifactsQualifier_actions_Jenkinsfile.txt +++ /dev/null @@ -1,95 +0,0 @@ - PromoteArtifactsQualifier_actions_Jenkinsfile.run() - PromoteArtifactsQualifier_actions_Jenkinsfile.pipeline(groovy.lang.Closure) - PromoteArtifactsQualifier_actions_Jenkinsfile.echo(Executing on agent [label:none]) - PromoteArtifactsQualifier_actions_Jenkinsfile.stage(promote, groovy.lang.Closure) - PromoteArtifactsQualifier_actions_Jenkinsfile.script(groovy.lang.Closure) - PromoteArtifactsQualifier_actions_Jenkinsfile.createSha512Checksums() - PromoteArtifactsQualifier_actions_Jenkinsfile.createSignatureFiles() - createSignatureFiles.legacySCM(groovy.lang.Closure) - createSignatureFiles.library({identifier=jenkins@20211123, retriever=null}) - PromoteArtifactsQualifier_actions_Jenkinsfile.promoteArtifacts({manifest=tests/jenkins/data/opensearch-2.0.0-rc1.yml, fileActions=[groovy.lang.Closure, groovy.lang.Closure]}) - promoteArtifacts.legacySCM(groovy.lang.Closure) - promoteArtifacts.library({identifier=jenkins@20211123, retriever=null}) - promoteArtifacts.readYaml({file=tests/jenkins/data/opensearch-2.0.0-rc1.yml}) - InputManifest.asBoolean() - promoteArtifacts.string({credentialsId=jenkins-aws-account-public, variable=AWS_ACCOUNT_PUBLIC}) - promoteArtifacts.string({credentialsId=jenkins-artifact-bucket-name, variable=ARTIFACT_BUCKET_NAME}) - promoteArtifacts.string({credentialsId=jenkins-artifact-promotion-role, variable=ARTIFACT_PROMOTION_ROLE_NAME}) - promoteArtifacts.string({credentialsId=jenkins-aws-production-account, variable=AWS_ACCOUNT_ARTIFACT}) - promoteArtifacts.string({credentialsId=jenkins-artifact-production-bucket-name, variable=ARTIFACT_PRODUCTION_BUCKET_NAME}) - promoteArtifacts.withCredentials([AWS_ACCOUNT_PUBLIC, ARTIFACT_BUCKET_NAME, ARTIFACT_PROMOTION_ROLE_NAME, AWS_ACCOUNT_ARTIFACT, ARTIFACT_PRODUCTION_BUCKET_NAME], groovy.lang.Closure) - promoteArtifacts.println(S3 download tar artifacts before creating signatures) - promoteArtifacts.withAWS({role=opensearch-bundle, roleAccount=AWS_ACCOUNT_PUBLIC, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure) - promoteArtifacts.s3Download({bucket=ARTIFACT_BUCKET_NAME, file=tests/jenkins/artifacts/tar, path=vars-build/2.0.0-rc1/33/linux/x64/tar/, force=true}) - promoteArtifacts.readYaml({file=tests/jenkins/artifacts/tar/vars-build/2.0.0-rc1/33/linux/x64/tar/builds/opensearch/manifest.yml}) - promoteArtifacts.fileExists(tests/jenkins/artifacts/tar/vars-build/2.0.0-rc1/33/linux/x64/tar/builds/opensearch/core-plugins) - promoteArtifacts.println(Signing Starts) - promoteArtifacts.println(Signing Core/Bundle Artifacts) - promoteArtifacts.findFiles({glob=**/opensearch-min-2.0.0-rc1*.tar*,**/opensearch-2.0.0-rc1*.tar*}) - promoteArtifacts.getPath() - createSha512Checksums.sh({script=find tests/jenkins/tests/jenkins/file/found.zip -type f, returnStdout=true}) - createSha512Checksums.echo(Not generating sha for bbb in tests/jenkins/tests/jenkins/file/found.zip, doesn't match allowed types [.tar.gz, .zip, .rpm]) - createSha512Checksums.echo(Not generating sha for ccc in tests/jenkins/tests/jenkins/file/found.zip, doesn't match allowed types [.tar.gz, .zip, .rpm]) - promoteArtifacts.findFiles({glob=**/opensearch-min-2.0.0-rc1*.tar*,**/opensearch-2.0.0-rc1*.tar*}) - promoteArtifacts.getPath() - createSignatureFiles.signArtifacts({sigtype=.sig, artifactPath=tests/jenkins/tests/jenkins/file/found.zip}) - signArtifacts.echo(PGP or Windows Signature Signing) - signArtifacts.fileExists(tests/jenkins/sign.sh) - signArtifacts.git({url=https://github.com/opensearch-project/opensearch-build.git, branch=main}) - signArtifacts.sh(curl -sSL https://artifacts.opensearch.org/publickeys/opensearch.pgp | gpg --import -) - signArtifacts.usernamePassword({credentialsId=github_bot_token_name, usernameVariable=GITHUB_USER, passwordVariable=GITHUB_TOKEN}) - signArtifacts.string({credentialsId=jenkins-signer-client-role, variable=SIGNER_CLIENT_ROLE}) - signArtifacts.string({credentialsId=jenkins-signer-client-external-id, variable=SIGNER_CLIENT_EXTERNAL_ID}) - signArtifacts.string({credentialsId=jenkins-signer-client-unsigned-bucket, variable=SIGNER_CLIENT_UNSIGNED_BUCKET}) - signArtifacts.string({credentialsId=jenkins-signer-client-signed-bucket, variable=SIGNER_CLIENT_SIGNED_BUCKET}) - signArtifacts.withCredentials([[GITHUB_USER, GITHUB_TOKEN], SIGNER_CLIENT_ROLE, SIGNER_CLIENT_EXTERNAL_ID, SIGNER_CLIENT_UNSIGNED_BUCKET, SIGNER_CLIENT_SIGNED_BUCKET], groovy.lang.Closure) - signArtifacts.sh( - #!/bin/bash - set +x - export ROLE=SIGNER_CLIENT_ROLE - export EXTERNAL_ID=SIGNER_CLIENT_EXTERNAL_ID - export UNSIGNED_BUCKET=SIGNER_CLIENT_UNSIGNED_BUCKET - export SIGNED_BUCKET=SIGNER_CLIENT_SIGNED_BUCKET - - tests/jenkins/sign.sh tests/jenkins/tests/jenkins/file/found.zip --sigtype=.sig - ) - promoteArtifacts.withAWS({role=ARTIFACT_PROMOTION_ROLE_NAME, roleAccount=AWS_ACCOUNT_ARTIFACT, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure) - promoteArtifacts.s3Upload({bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=releases/core/opensearch/2.0.0-rc1/, workingDir=tests/jenkins/artifacts/tar/vars-build/2.0.0-rc1/33/linux/x64/tar/builds/opensearch/dist/, includePathPattern=**/opensearch-min-2.0.0-rc1-linux-x64*}) - promoteArtifacts.s3Upload({bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=releases/bundle/opensearch/2.0.0-rc1/, workingDir=tests/jenkins/artifacts/tar/vars-build/2.0.0-rc1/33/linux/x64/tar/dist/opensearch/, includePathPattern=**/opensearch-2.0.0-rc1-linux-x64*}) - promoteArtifacts.println(S3 download rpm artifacts before creating signatures) - promoteArtifacts.withAWS({role=opensearch-bundle, roleAccount=AWS_ACCOUNT_PUBLIC, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure) - promoteArtifacts.s3Download({bucket=ARTIFACT_BUCKET_NAME, file=tests/jenkins/artifacts/rpm, path=vars-build/2.0.0-rc1/33/linux/x64/rpm/, force=true}) - promoteArtifacts.readYaml({file=tests/jenkins/artifacts/rpm/vars-build/2.0.0-rc1/33/linux/x64/rpm/builds/opensearch/manifest.yml}) - promoteArtifacts.fileExists(tests/jenkins/artifacts/rpm/vars-build/2.0.0-rc1/33/linux/x64/rpm/builds/opensearch/core-plugins) - promoteArtifacts.println(Signing Starts) - promoteArtifacts.println(Signing Core/Bundle Artifacts) - promoteArtifacts.findFiles({glob=**/opensearch-min-2.0.0-rc1*.rpm*,**/opensearch-2.0.0-rc1*.rpm*}) - promoteArtifacts.getPath() - createSha512Checksums.sh({script=find tests/jenkins/tests/jenkins/file/found.zip -type f, returnStdout=true}) - createSha512Checksums.echo(Not generating sha for bbb in tests/jenkins/tests/jenkins/file/found.zip, doesn't match allowed types [.tar.gz, .zip, .rpm]) - createSha512Checksums.echo(Not generating sha for ccc in tests/jenkins/tests/jenkins/file/found.zip, doesn't match allowed types [.tar.gz, .zip, .rpm]) - promoteArtifacts.findFiles({glob=**/opensearch-min-2.0.0-rc1*.rpm*,**/opensearch-2.0.0-rc1*.rpm*}) - promoteArtifacts.getPath() - createSignatureFiles.signArtifacts({sigtype=.sig, artifactPath=tests/jenkins/tests/jenkins/file/found.zip}) - signArtifacts.echo(PGP or Windows Signature Signing) - signArtifacts.fileExists(tests/jenkins/sign.sh) - signArtifacts.git({url=https://github.com/opensearch-project/opensearch-build.git, branch=main}) - signArtifacts.sh(curl -sSL https://artifacts.opensearch.org/publickeys/opensearch.pgp | gpg --import -) - signArtifacts.usernamePassword({credentialsId=github_bot_token_name, usernameVariable=GITHUB_USER, passwordVariable=GITHUB_TOKEN}) - signArtifacts.string({credentialsId=jenkins-signer-client-role, variable=SIGNER_CLIENT_ROLE}) - signArtifacts.string({credentialsId=jenkins-signer-client-external-id, variable=SIGNER_CLIENT_EXTERNAL_ID}) - signArtifacts.string({credentialsId=jenkins-signer-client-unsigned-bucket, variable=SIGNER_CLIENT_UNSIGNED_BUCKET}) - signArtifacts.string({credentialsId=jenkins-signer-client-signed-bucket, variable=SIGNER_CLIENT_SIGNED_BUCKET}) - signArtifacts.withCredentials([[GITHUB_USER, GITHUB_TOKEN], SIGNER_CLIENT_ROLE, SIGNER_CLIENT_EXTERNAL_ID, SIGNER_CLIENT_UNSIGNED_BUCKET, SIGNER_CLIENT_SIGNED_BUCKET], groovy.lang.Closure) - signArtifacts.sh( - #!/bin/bash - set +x - export ROLE=SIGNER_CLIENT_ROLE - export EXTERNAL_ID=SIGNER_CLIENT_EXTERNAL_ID - export UNSIGNED_BUCKET=SIGNER_CLIENT_UNSIGNED_BUCKET - export SIGNED_BUCKET=SIGNER_CLIENT_SIGNED_BUCKET - - tests/jenkins/sign.sh tests/jenkins/tests/jenkins/file/found.zip --sigtype=.sig - ) - promoteArtifacts.withAWS({role=ARTIFACT_PROMOTION_ROLE_NAME, roleAccount=AWS_ACCOUNT_ARTIFACT, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure) - promoteArtifacts.s3Upload({bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=releases/bundle/opensearch/2.0.0-rc1/, workingDir=tests/jenkins/artifacts/rpm/vars-build/2.0.0-rc1/33/linux/x64/rpm/dist/opensearch/, includePathPattern=**/opensearch-2.0.0-rc1-linux-x64*}) diff --git a/tests/jenkins/jobs/PromoteArtifactsQualifier_actions_OpenSearch_Dashboards_Jenkinsfile b/tests/jenkins/jobs/PromoteArtifactsQualifier_actions_OpenSearch_Dashboards_Jenkinsfile deleted file mode 100644 index e822a85ada..0000000000 --- a/tests/jenkins/jobs/PromoteArtifactsQualifier_actions_OpenSearch_Dashboards_Jenkinsfile +++ /dev/null @@ -1,15 +0,0 @@ -pipeline { - agent none - stages { - stage('promote') { - steps { - script { - promoteArtifacts( - manifest: 'tests/jenkins/data/opensearch-dashboards-2.0.0-rc1.yml', - fileActions: [createSha512Checksums(), createSignatureFiles()] - ) - } - } - } - } -} diff --git a/tests/jenkins/jobs/PromoteArtifactsQualifier_actions_OpenSearch_Dashboards_Jenkinsfile.txt b/tests/jenkins/jobs/PromoteArtifactsQualifier_actions_OpenSearch_Dashboards_Jenkinsfile.txt deleted file mode 100644 index eb5d38293f..0000000000 --- a/tests/jenkins/jobs/PromoteArtifactsQualifier_actions_OpenSearch_Dashboards_Jenkinsfile.txt +++ /dev/null @@ -1,95 +0,0 @@ - PromoteArtifactsQualifier_actions_OpenSearch_Dashboards_Jenkinsfile.run() - PromoteArtifactsQualifier_actions_OpenSearch_Dashboards_Jenkinsfile.pipeline(groovy.lang.Closure) - PromoteArtifactsQualifier_actions_OpenSearch_Dashboards_Jenkinsfile.echo(Executing on agent [label:none]) - PromoteArtifactsQualifier_actions_OpenSearch_Dashboards_Jenkinsfile.stage(promote, groovy.lang.Closure) - PromoteArtifactsQualifier_actions_OpenSearch_Dashboards_Jenkinsfile.script(groovy.lang.Closure) - PromoteArtifactsQualifier_actions_OpenSearch_Dashboards_Jenkinsfile.createSha512Checksums() - PromoteArtifactsQualifier_actions_OpenSearch_Dashboards_Jenkinsfile.createSignatureFiles() - createSignatureFiles.legacySCM(groovy.lang.Closure) - createSignatureFiles.library({identifier=jenkins@20211123, retriever=null}) - PromoteArtifactsQualifier_actions_OpenSearch_Dashboards_Jenkinsfile.promoteArtifacts({manifest=tests/jenkins/data/opensearch-dashboards-2.0.0-rc1.yml, fileActions=[groovy.lang.Closure, groovy.lang.Closure]}) - promoteArtifacts.legacySCM(groovy.lang.Closure) - promoteArtifacts.library({identifier=jenkins@20211123, retriever=null}) - promoteArtifacts.readYaml({file=tests/jenkins/data/opensearch-dashboards-2.0.0-rc1.yml}) - InputManifest.asBoolean() - promoteArtifacts.string({credentialsId=jenkins-aws-account-public, variable=AWS_ACCOUNT_PUBLIC}) - promoteArtifacts.string({credentialsId=jenkins-artifact-bucket-name, variable=ARTIFACT_BUCKET_NAME}) - promoteArtifacts.string({credentialsId=jenkins-artifact-promotion-role, variable=ARTIFACT_PROMOTION_ROLE_NAME}) - promoteArtifacts.string({credentialsId=jenkins-aws-production-account, variable=AWS_ACCOUNT_ARTIFACT}) - promoteArtifacts.string({credentialsId=jenkins-artifact-production-bucket-name, variable=ARTIFACT_PRODUCTION_BUCKET_NAME}) - promoteArtifacts.withCredentials([AWS_ACCOUNT_PUBLIC, ARTIFACT_BUCKET_NAME, ARTIFACT_PROMOTION_ROLE_NAME, AWS_ACCOUNT_ARTIFACT, ARTIFACT_PRODUCTION_BUCKET_NAME], groovy.lang.Closure) - promoteArtifacts.println(S3 download tar artifacts before creating signatures) - promoteArtifacts.withAWS({role=opensearch-bundle, roleAccount=AWS_ACCOUNT_PUBLIC, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure) - promoteArtifacts.s3Download({bucket=ARTIFACT_BUCKET_NAME, file=tests/jenkins/artifacts/tar, path=vars-build/2.0.0-rc1/33/linux/x64/tar/, force=true}) - promoteArtifacts.readYaml({file=tests/jenkins/artifacts/tar/vars-build/2.0.0-rc1/33/linux/x64/tar/builds/opensearch-dashboards/manifest.yml}) - promoteArtifacts.fileExists(tests/jenkins/artifacts/tar/vars-build/2.0.0-rc1/33/linux/x64/tar/builds/opensearch-dashboards/core-plugins) - promoteArtifacts.println(Signing Starts) - promoteArtifacts.println(Signing Core/Bundle Artifacts) - promoteArtifacts.findFiles({glob=**/opensearch-dashboards-min-2.0.0-rc1*.tar*,**/opensearch-dashboards-2.0.0-rc1*.tar*}) - promoteArtifacts.getPath() - createSha512Checksums.sh({script=find tests/jenkins/tests/jenkins/file/found.zip -type f, returnStdout=true}) - createSha512Checksums.echo(Not generating sha for bbb in tests/jenkins/tests/jenkins/file/found.zip, doesn't match allowed types [.tar.gz, .zip, .rpm]) - createSha512Checksums.echo(Not generating sha for ccc in tests/jenkins/tests/jenkins/file/found.zip, doesn't match allowed types [.tar.gz, .zip, .rpm]) - promoteArtifacts.findFiles({glob=**/opensearch-dashboards-min-2.0.0-rc1*.tar*,**/opensearch-dashboards-2.0.0-rc1*.tar*}) - promoteArtifacts.getPath() - createSignatureFiles.signArtifacts({sigtype=.sig, artifactPath=tests/jenkins/tests/jenkins/file/found.zip}) - signArtifacts.echo(PGP or Windows Signature Signing) - signArtifacts.fileExists(tests/jenkins/sign.sh) - signArtifacts.git({url=https://github.com/opensearch-project/opensearch-build.git, branch=main}) - signArtifacts.sh(curl -sSL https://artifacts.opensearch.org/publickeys/opensearch.pgp | gpg --import -) - signArtifacts.usernamePassword({credentialsId=github_bot_token_name, usernameVariable=GITHUB_USER, passwordVariable=GITHUB_TOKEN}) - signArtifacts.string({credentialsId=jenkins-signer-client-role, variable=SIGNER_CLIENT_ROLE}) - signArtifacts.string({credentialsId=jenkins-signer-client-external-id, variable=SIGNER_CLIENT_EXTERNAL_ID}) - signArtifacts.string({credentialsId=jenkins-signer-client-unsigned-bucket, variable=SIGNER_CLIENT_UNSIGNED_BUCKET}) - signArtifacts.string({credentialsId=jenkins-signer-client-signed-bucket, variable=SIGNER_CLIENT_SIGNED_BUCKET}) - signArtifacts.withCredentials([[GITHUB_USER, GITHUB_TOKEN], SIGNER_CLIENT_ROLE, SIGNER_CLIENT_EXTERNAL_ID, SIGNER_CLIENT_UNSIGNED_BUCKET, SIGNER_CLIENT_SIGNED_BUCKET], groovy.lang.Closure) - signArtifacts.sh( - #!/bin/bash - set +x - export ROLE=SIGNER_CLIENT_ROLE - export EXTERNAL_ID=SIGNER_CLIENT_EXTERNAL_ID - export UNSIGNED_BUCKET=SIGNER_CLIENT_UNSIGNED_BUCKET - export SIGNED_BUCKET=SIGNER_CLIENT_SIGNED_BUCKET - - tests/jenkins/sign.sh tests/jenkins/tests/jenkins/file/found.zip --sigtype=.sig - ) - promoteArtifacts.withAWS({role=ARTIFACT_PROMOTION_ROLE_NAME, roleAccount=AWS_ACCOUNT_ARTIFACT, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure) - promoteArtifacts.s3Upload({bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=releases/core/opensearch-dashboards/2.0.0-rc1/, workingDir=tests/jenkins/artifacts/tar/vars-build/2.0.0-rc1/33/linux/x64/tar/builds/opensearch-dashboards/dist/, includePathPattern=**/opensearch-dashboards-min-2.0.0-rc1-linux-x64*}) - promoteArtifacts.s3Upload({bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=releases/bundle/opensearch-dashboards/2.0.0-rc1/, workingDir=tests/jenkins/artifacts/tar/vars-build/2.0.0-rc1/33/linux/x64/tar/dist/opensearch-dashboards/, includePathPattern=**/opensearch-dashboards-2.0.0-rc1-linux-x64*}) - promoteArtifacts.println(S3 download rpm artifacts before creating signatures) - promoteArtifacts.withAWS({role=opensearch-bundle, roleAccount=AWS_ACCOUNT_PUBLIC, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure) - promoteArtifacts.s3Download({bucket=ARTIFACT_BUCKET_NAME, file=tests/jenkins/artifacts/rpm, path=vars-build/2.0.0-rc1/33/linux/x64/rpm/, force=true}) - promoteArtifacts.readYaml({file=tests/jenkins/artifacts/rpm/vars-build/2.0.0-rc1/33/linux/x64/rpm/builds/opensearch-dashboards/manifest.yml}) - promoteArtifacts.fileExists(tests/jenkins/artifacts/rpm/vars-build/2.0.0-rc1/33/linux/x64/rpm/builds/opensearch-dashboards/core-plugins) - promoteArtifacts.println(Signing Starts) - promoteArtifacts.println(Signing Core/Bundle Artifacts) - promoteArtifacts.findFiles({glob=**/opensearch-dashboards-min-2.0.0-rc1*.rpm*,**/opensearch-dashboards-2.0.0-rc1*.rpm*}) - promoteArtifacts.getPath() - createSha512Checksums.sh({script=find tests/jenkins/tests/jenkins/file/found.zip -type f, returnStdout=true}) - createSha512Checksums.echo(Not generating sha for bbb in tests/jenkins/tests/jenkins/file/found.zip, doesn't match allowed types [.tar.gz, .zip, .rpm]) - createSha512Checksums.echo(Not generating sha for ccc in tests/jenkins/tests/jenkins/file/found.zip, doesn't match allowed types [.tar.gz, .zip, .rpm]) - promoteArtifacts.findFiles({glob=**/opensearch-dashboards-min-2.0.0-rc1*.rpm*,**/opensearch-dashboards-2.0.0-rc1*.rpm*}) - promoteArtifacts.getPath() - createSignatureFiles.signArtifacts({sigtype=.sig, artifactPath=tests/jenkins/tests/jenkins/file/found.zip}) - signArtifacts.echo(PGP or Windows Signature Signing) - signArtifacts.fileExists(tests/jenkins/sign.sh) - signArtifacts.git({url=https://github.com/opensearch-project/opensearch-build.git, branch=main}) - signArtifacts.sh(curl -sSL https://artifacts.opensearch.org/publickeys/opensearch.pgp | gpg --import -) - signArtifacts.usernamePassword({credentialsId=github_bot_token_name, usernameVariable=GITHUB_USER, passwordVariable=GITHUB_TOKEN}) - signArtifacts.string({credentialsId=jenkins-signer-client-role, variable=SIGNER_CLIENT_ROLE}) - signArtifacts.string({credentialsId=jenkins-signer-client-external-id, variable=SIGNER_CLIENT_EXTERNAL_ID}) - signArtifacts.string({credentialsId=jenkins-signer-client-unsigned-bucket, variable=SIGNER_CLIENT_UNSIGNED_BUCKET}) - signArtifacts.string({credentialsId=jenkins-signer-client-signed-bucket, variable=SIGNER_CLIENT_SIGNED_BUCKET}) - signArtifacts.withCredentials([[GITHUB_USER, GITHUB_TOKEN], SIGNER_CLIENT_ROLE, SIGNER_CLIENT_EXTERNAL_ID, SIGNER_CLIENT_UNSIGNED_BUCKET, SIGNER_CLIENT_SIGNED_BUCKET], groovy.lang.Closure) - signArtifacts.sh( - #!/bin/bash - set +x - export ROLE=SIGNER_CLIENT_ROLE - export EXTERNAL_ID=SIGNER_CLIENT_EXTERNAL_ID - export UNSIGNED_BUCKET=SIGNER_CLIENT_UNSIGNED_BUCKET - export SIGNED_BUCKET=SIGNER_CLIENT_SIGNED_BUCKET - - tests/jenkins/sign.sh tests/jenkins/tests/jenkins/file/found.zip --sigtype=.sig - ) - promoteArtifacts.withAWS({role=ARTIFACT_PROMOTION_ROLE_NAME, roleAccount=AWS_ACCOUNT_ARTIFACT, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure) - promoteArtifacts.s3Upload({bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=releases/bundle/opensearch-dashboards/2.0.0-rc1/, workingDir=tests/jenkins/artifacts/rpm/vars-build/2.0.0-rc1/33/linux/x64/rpm/dist/opensearch-dashboards/, includePathPattern=**/opensearch-dashboards-2.0.0-rc1-linux-x64*}) diff --git a/tests/jenkins/jobs/PromoteArtifacts_Jenkinsfile b/tests/jenkins/jobs/PromoteArtifacts_Jenkinsfile deleted file mode 100644 index ba5718f747..0000000000 --- a/tests/jenkins/jobs/PromoteArtifacts_Jenkinsfile +++ /dev/null @@ -1,14 +0,0 @@ -pipeline { - agent none - stages { - stage('promote') { - steps { - script { - promoteArtifacts( - manifest: 'tests/jenkins/data/opensearch-1.3.0.yml' - ) - } - } - } - } -} diff --git a/tests/jenkins/jobs/PromoteArtifacts_Jenkinsfile.txt b/tests/jenkins/jobs/PromoteArtifacts_Jenkinsfile.txt deleted file mode 100644 index 8eab96af73..0000000000 --- a/tests/jenkins/jobs/PromoteArtifacts_Jenkinsfile.txt +++ /dev/null @@ -1,56 +0,0 @@ - PromoteArtifacts_Jenkinsfile.run() - PromoteArtifacts_Jenkinsfile.pipeline(groovy.lang.Closure) - PromoteArtifacts_Jenkinsfile.echo(Executing on agent [label:none]) - PromoteArtifacts_Jenkinsfile.stage(promote, groovy.lang.Closure) - PromoteArtifacts_Jenkinsfile.script(groovy.lang.Closure) - PromoteArtifacts_Jenkinsfile.promoteArtifacts({manifest=tests/jenkins/data/opensearch-1.3.0.yml}) - promoteArtifacts.legacySCM(groovy.lang.Closure) - promoteArtifacts.library({identifier=jenkins@20211123, retriever=null}) - promoteArtifacts.readYaml({file=tests/jenkins/data/opensearch-1.3.0.yml}) - InputManifest.asBoolean() - promoteArtifacts.string({credentialsId=jenkins-aws-account-public, variable=AWS_ACCOUNT_PUBLIC}) - promoteArtifacts.string({credentialsId=jenkins-artifact-bucket-name, variable=ARTIFACT_BUCKET_NAME}) - promoteArtifacts.string({credentialsId=jenkins-artifact-promotion-role, variable=ARTIFACT_PROMOTION_ROLE_NAME}) - promoteArtifacts.string({credentialsId=jenkins-aws-production-account, variable=AWS_ACCOUNT_ARTIFACT}) - promoteArtifacts.string({credentialsId=jenkins-artifact-production-bucket-name, variable=ARTIFACT_PRODUCTION_BUCKET_NAME}) - promoteArtifacts.withCredentials([AWS_ACCOUNT_PUBLIC, ARTIFACT_BUCKET_NAME, ARTIFACT_PROMOTION_ROLE_NAME, AWS_ACCOUNT_ARTIFACT, ARTIFACT_PRODUCTION_BUCKET_NAME], groovy.lang.Closure) - promoteArtifacts.println(S3 download tar artifacts before creating signatures) - promoteArtifacts.withAWS({role=opensearch-bundle, roleAccount=AWS_ACCOUNT_PUBLIC, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure) - promoteArtifacts.s3Download({bucket=ARTIFACT_BUCKET_NAME, file=tests/jenkins/artifacts/tar, path=vars-build/1.3.0/33/linux/x64/tar/, force=true}) - promoteArtifacts.readYaml({file=tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/manifest.yml}) - promoteArtifacts.fileExists(tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins) - promoteArtifacts.println(Signing Starts) - promoteArtifacts.println(Signing Core Plugins) - promoteArtifacts.println(Signing Core/Bundle Artifacts) - promoteArtifacts.withAWS({role=ARTIFACT_PROMOTION_ROLE_NAME, roleAccount=AWS_ACCOUNT_ARTIFACT, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure) - promoteArtifacts.s3Upload({bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=releases/plugins/discovery-ec2/1.3.0/, workingDir=tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins/, includePathPattern=**/discovery-ec2*}) - promoteArtifacts.s3Upload({bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=releases/plugins/transport-nio/1.3.0/, workingDir=tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins/, includePathPattern=**/transport-nio*}) - promoteArtifacts.s3Upload({bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=releases/plugins/discovery-gce/1.3.0/, workingDir=tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins/, includePathPattern=**/discovery-gce*}) - promoteArtifacts.s3Upload({bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=releases/plugins/analysis-ukrainian/1.3.0/, workingDir=tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins/, includePathPattern=**/analysis-ukrainian*}) - promoteArtifacts.s3Upload({bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=releases/plugins/discovery-azure-classic/1.3.0/, workingDir=tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins/, includePathPattern=**/discovery-azure-classic*}) - promoteArtifacts.s3Upload({bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=releases/plugins/analysis-phonetic/1.3.0/, workingDir=tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins/, includePathPattern=**/analysis-phonetic*}) - promoteArtifacts.s3Upload({bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=releases/plugins/mapper-murmur3/1.3.0/, workingDir=tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins/, includePathPattern=**/mapper-murmur3*}) - promoteArtifacts.s3Upload({bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=releases/plugins/analysis-kuromoji/1.3.0/, workingDir=tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins/, includePathPattern=**/analysis-kuromoji*}) - promoteArtifacts.s3Upload({bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=releases/plugins/analysis-stempel/1.3.0/, workingDir=tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins/, includePathPattern=**/analysis-stempel*}) - promoteArtifacts.s3Upload({bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=releases/plugins/mapper-annotated-text/1.3.0/, workingDir=tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins/, includePathPattern=**/mapper-annotated-text*}) - promoteArtifacts.s3Upload({bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=releases/plugins/repository-hdfs/1.3.0/, workingDir=tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins/, includePathPattern=**/repository-hdfs*}) - promoteArtifacts.s3Upload({bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=releases/plugins/analysis-icu/1.3.0/, workingDir=tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins/, includePathPattern=**/analysis-icu*}) - promoteArtifacts.s3Upload({bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=releases/plugins/mapper-size/1.3.0/, workingDir=tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins/, includePathPattern=**/mapper-size*}) - promoteArtifacts.s3Upload({bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=releases/plugins/ingest-attachment/1.3.0/, workingDir=tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins/, includePathPattern=**/ingest-attachment*}) - promoteArtifacts.s3Upload({bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=releases/plugins/repository-azure/1.3.0/, workingDir=tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins/, includePathPattern=**/repository-azure*}) - promoteArtifacts.s3Upload({bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=releases/plugins/repository-s3/1.3.0/, workingDir=tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins/, includePathPattern=**/repository-s3*}) - promoteArtifacts.s3Upload({bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=releases/plugins/analysis-nori/1.3.0/, workingDir=tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins/, includePathPattern=**/analysis-nori*}) - promoteArtifacts.s3Upload({bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=releases/plugins/store-smb/1.3.0/, workingDir=tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins/, includePathPattern=**/store-smb*}) - promoteArtifacts.s3Upload({bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=releases/plugins/analysis-smartcn/1.3.0/, workingDir=tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins/, includePathPattern=**/analysis-smartcn*}) - promoteArtifacts.s3Upload({bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=releases/plugins/repository-gcs/1.3.0/, workingDir=tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins/, includePathPattern=**/repository-gcs*}) - promoteArtifacts.s3Upload({bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=releases/core/opensearch/1.3.0/, workingDir=tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/dist/, includePathPattern=**/opensearch-min-1.3.0-linux-x64*}) - promoteArtifacts.s3Upload({bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=releases/bundle/opensearch/1.3.0/, workingDir=tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/dist/opensearch/, includePathPattern=**/opensearch-1.3.0-linux-x64*}) - promoteArtifacts.println(S3 download rpm artifacts before creating signatures) - promoteArtifacts.withAWS({role=opensearch-bundle, roleAccount=AWS_ACCOUNT_PUBLIC, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure) - promoteArtifacts.s3Download({bucket=ARTIFACT_BUCKET_NAME, file=tests/jenkins/artifacts/rpm, path=vars-build/1.3.0/33/linux/x64/rpm/, force=true}) - promoteArtifacts.readYaml({file=tests/jenkins/artifacts/rpm/vars-build/1.3.0/33/linux/x64/rpm/builds/opensearch/manifest.yml}) - promoteArtifacts.fileExists(tests/jenkins/artifacts/rpm/vars-build/1.3.0/33/linux/x64/rpm/builds/opensearch/core-plugins) - promoteArtifacts.println(Signing Starts) - promoteArtifacts.println(Signing Core/Bundle Artifacts) - promoteArtifacts.withAWS({role=ARTIFACT_PROMOTION_ROLE_NAME, roleAccount=AWS_ACCOUNT_ARTIFACT, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure) - promoteArtifacts.s3Upload({bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=releases/bundle/opensearch/1.3.0/, workingDir=tests/jenkins/artifacts/rpm/vars-build/1.3.0/33/linux/x64/rpm/dist/opensearch/, includePathPattern=**/opensearch-1.3.0-linux-x64*}) diff --git a/tests/jenkins/jobs/PromoteArtifacts_OpenSearch_Dashboards_Jenkinsfile b/tests/jenkins/jobs/PromoteArtifacts_OpenSearch_Dashboards_Jenkinsfile deleted file mode 100644 index 2dfdee8865..0000000000 --- a/tests/jenkins/jobs/PromoteArtifacts_OpenSearch_Dashboards_Jenkinsfile +++ /dev/null @@ -1,14 +0,0 @@ -pipeline { - agent none - stages { - stage('promote') { - steps { - script { - promoteArtifacts( - manifest: 'tests/jenkins/data/opensearch-dashboards-1.3.0.yml' - ) - } - } - } - } -} diff --git a/tests/jenkins/jobs/PromoteArtifacts_OpenSearch_Dashboards_Jenkinsfile.txt b/tests/jenkins/jobs/PromoteArtifacts_OpenSearch_Dashboards_Jenkinsfile.txt deleted file mode 100644 index 8528bfb223..0000000000 --- a/tests/jenkins/jobs/PromoteArtifacts_OpenSearch_Dashboards_Jenkinsfile.txt +++ /dev/null @@ -1,35 +0,0 @@ - PromoteArtifacts_OpenSearch_Dashboards_Jenkinsfile.run() - PromoteArtifacts_OpenSearch_Dashboards_Jenkinsfile.pipeline(groovy.lang.Closure) - PromoteArtifacts_OpenSearch_Dashboards_Jenkinsfile.echo(Executing on agent [label:none]) - PromoteArtifacts_OpenSearch_Dashboards_Jenkinsfile.stage(promote, groovy.lang.Closure) - PromoteArtifacts_OpenSearch_Dashboards_Jenkinsfile.script(groovy.lang.Closure) - PromoteArtifacts_OpenSearch_Dashboards_Jenkinsfile.promoteArtifacts({manifest=tests/jenkins/data/opensearch-dashboards-1.3.0.yml}) - promoteArtifacts.legacySCM(groovy.lang.Closure) - promoteArtifacts.library({identifier=jenkins@20211123, retriever=null}) - promoteArtifacts.readYaml({file=tests/jenkins/data/opensearch-dashboards-1.3.0.yml}) - InputManifest.asBoolean() - promoteArtifacts.string({credentialsId=jenkins-aws-account-public, variable=AWS_ACCOUNT_PUBLIC}) - promoteArtifacts.string({credentialsId=jenkins-artifact-bucket-name, variable=ARTIFACT_BUCKET_NAME}) - promoteArtifacts.string({credentialsId=jenkins-artifact-promotion-role, variable=ARTIFACT_PROMOTION_ROLE_NAME}) - promoteArtifacts.string({credentialsId=jenkins-aws-production-account, variable=AWS_ACCOUNT_ARTIFACT}) - promoteArtifacts.string({credentialsId=jenkins-artifact-production-bucket-name, variable=ARTIFACT_PRODUCTION_BUCKET_NAME}) - promoteArtifacts.withCredentials([AWS_ACCOUNT_PUBLIC, ARTIFACT_BUCKET_NAME, ARTIFACT_PROMOTION_ROLE_NAME, AWS_ACCOUNT_ARTIFACT, ARTIFACT_PRODUCTION_BUCKET_NAME], groovy.lang.Closure) - promoteArtifacts.println(S3 download tar artifacts before creating signatures) - promoteArtifacts.withAWS({role=opensearch-bundle, roleAccount=AWS_ACCOUNT_PUBLIC, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure) - promoteArtifacts.s3Download({bucket=ARTIFACT_BUCKET_NAME, file=tests/jenkins/artifacts/tar, path=vars-build/1.3.0/33/linux/x64/tar/, force=true}) - promoteArtifacts.readYaml({file=tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch-dashboards/manifest.yml}) - promoteArtifacts.fileExists(tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch-dashboards/core-plugins) - promoteArtifacts.println(Signing Starts) - promoteArtifacts.println(Signing Core/Bundle Artifacts) - promoteArtifacts.withAWS({role=ARTIFACT_PROMOTION_ROLE_NAME, roleAccount=AWS_ACCOUNT_ARTIFACT, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure) - promoteArtifacts.s3Upload({bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=releases/core/opensearch-dashboards/1.3.0/, workingDir=tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch-dashboards/dist/, includePathPattern=**/opensearch-dashboards-min-1.3.0-linux-x64*}) - promoteArtifacts.s3Upload({bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=releases/bundle/opensearch-dashboards/1.3.0/, workingDir=tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/dist/opensearch-dashboards/, includePathPattern=**/opensearch-dashboards-1.3.0-linux-x64*}) - promoteArtifacts.println(S3 download rpm artifacts before creating signatures) - promoteArtifacts.withAWS({role=opensearch-bundle, roleAccount=AWS_ACCOUNT_PUBLIC, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure) - promoteArtifacts.s3Download({bucket=ARTIFACT_BUCKET_NAME, file=tests/jenkins/artifacts/rpm, path=vars-build/1.3.0/33/linux/x64/rpm/, force=true}) - promoteArtifacts.readYaml({file=tests/jenkins/artifacts/rpm/vars-build/1.3.0/33/linux/x64/rpm/builds/opensearch-dashboards/manifest.yml}) - promoteArtifacts.fileExists(tests/jenkins/artifacts/rpm/vars-build/1.3.0/33/linux/x64/rpm/builds/opensearch-dashboards/core-plugins) - promoteArtifacts.println(Signing Starts) - promoteArtifacts.println(Signing Core/Bundle Artifacts) - promoteArtifacts.withAWS({role=ARTIFACT_PROMOTION_ROLE_NAME, roleAccount=AWS_ACCOUNT_ARTIFACT, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure) - promoteArtifacts.s3Upload({bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=releases/bundle/opensearch-dashboards/1.3.0/, workingDir=tests/jenkins/artifacts/rpm/vars-build/1.3.0/33/linux/x64/rpm/dist/opensearch-dashboards/, includePathPattern=**/opensearch-dashboards-1.3.0-linux-x64*}) diff --git a/tests/jenkins/jobs/PromoteArtifacts_actions_Jenkinsfile b/tests/jenkins/jobs/PromoteArtifacts_actions_Jenkinsfile deleted file mode 100644 index 36722a0ec2..0000000000 --- a/tests/jenkins/jobs/PromoteArtifacts_actions_Jenkinsfile +++ /dev/null @@ -1,15 +0,0 @@ -pipeline { - agent none - stages { - stage('promote') { - steps { - script { - promoteArtifacts( - manifest: 'tests/jenkins/data/opensearch-1.3.0.yml', - fileActions: [createSha512Checksums(), createSignatureFiles()] - ) - } - } - } - } -} diff --git a/tests/jenkins/jobs/PromoteArtifacts_actions_Jenkinsfile.txt b/tests/jenkins/jobs/PromoteArtifacts_actions_Jenkinsfile.txt deleted file mode 100644 index 4c85171470..0000000000 --- a/tests/jenkins/jobs/PromoteArtifacts_actions_Jenkinsfile.txt +++ /dev/null @@ -1,147 +0,0 @@ - PromoteArtifacts_actions_Jenkinsfile.run() - PromoteArtifacts_actions_Jenkinsfile.pipeline(groovy.lang.Closure) - PromoteArtifacts_actions_Jenkinsfile.echo(Executing on agent [label:none]) - PromoteArtifacts_actions_Jenkinsfile.stage(promote, groovy.lang.Closure) - PromoteArtifacts_actions_Jenkinsfile.script(groovy.lang.Closure) - PromoteArtifacts_actions_Jenkinsfile.createSha512Checksums() - PromoteArtifacts_actions_Jenkinsfile.createSignatureFiles() - createSignatureFiles.legacySCM(groovy.lang.Closure) - createSignatureFiles.library({identifier=jenkins@20211123, retriever=null}) - PromoteArtifacts_actions_Jenkinsfile.promoteArtifacts({manifest=tests/jenkins/data/opensearch-1.3.0.yml, fileActions=[groovy.lang.Closure, groovy.lang.Closure]}) - promoteArtifacts.legacySCM(groovy.lang.Closure) - promoteArtifacts.library({identifier=jenkins@20211123, retriever=null}) - promoteArtifacts.readYaml({file=tests/jenkins/data/opensearch-1.3.0.yml}) - InputManifest.asBoolean() - promoteArtifacts.string({credentialsId=jenkins-aws-account-public, variable=AWS_ACCOUNT_PUBLIC}) - promoteArtifacts.string({credentialsId=jenkins-artifact-bucket-name, variable=ARTIFACT_BUCKET_NAME}) - promoteArtifacts.string({credentialsId=jenkins-artifact-promotion-role, variable=ARTIFACT_PROMOTION_ROLE_NAME}) - promoteArtifacts.string({credentialsId=jenkins-aws-production-account, variable=AWS_ACCOUNT_ARTIFACT}) - promoteArtifacts.string({credentialsId=jenkins-artifact-production-bucket-name, variable=ARTIFACT_PRODUCTION_BUCKET_NAME}) - promoteArtifacts.withCredentials([AWS_ACCOUNT_PUBLIC, ARTIFACT_BUCKET_NAME, ARTIFACT_PROMOTION_ROLE_NAME, AWS_ACCOUNT_ARTIFACT, ARTIFACT_PRODUCTION_BUCKET_NAME], groovy.lang.Closure) - promoteArtifacts.println(S3 download tar artifacts before creating signatures) - promoteArtifacts.withAWS({role=opensearch-bundle, roleAccount=AWS_ACCOUNT_PUBLIC, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure) - promoteArtifacts.s3Download({bucket=ARTIFACT_BUCKET_NAME, file=tests/jenkins/artifacts/tar, path=vars-build/1.3.0/33/linux/x64/tar/, force=true}) - promoteArtifacts.readYaml({file=tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/manifest.yml}) - promoteArtifacts.fileExists(tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins) - promoteArtifacts.println(Signing Starts) - promoteArtifacts.println(Signing Core Plugins) - createSha512Checksums.sh({script=find tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins -type f, returnStdout=true}) - createSha512Checksums.echo(Creating sha for tar_dummy_artifact_1.3.0.tar.gz) - createSha512Checksums.sh({script=sha512sum tar_dummy_artifact_1.3.0.tar.gz, returnStdout=true}) - createSha512Checksums.sh({script=basename tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins/tar_dummy_artifact_1.3.0.tar.gz, returnStdout=true}) - createSha512Checksums.writeFile({file=tar_dummy_artifact_1.3.0.tar.gz.sha512, text=shaHashDummy_tar_dummy_artifact_1.3.0.tar.gz tar_dummy_artifact_1.3.0.tar.gz}) - createSha512Checksums.echo(Creating sha for zip_dummy_artifact_1.3.0.zip) - createSha512Checksums.sh({script=sha512sum zip_dummy_artifact_1.3.0.zip, returnStdout=true}) - createSha512Checksums.sh({script=basename tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins/zip_dummy_artifact_1.3.0.zip, returnStdout=true}) - createSha512Checksums.writeFile({file=zip_dummy_artifact_1.3.0.zip.sha512, text=shaHashDummy_zip_dummy_artifact_1.3.0.zip zip_dummy_artifact_1.3.0.zip}) - createSha512Checksums.echo(Not generating sha for dummy_artifact_1.3.0.dummy in tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins, doesn't match allowed types [.tar.gz, .zip, .rpm]) - createSignatureFiles.signArtifacts({sigtype=.sig, artifactPath=tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins}) - signArtifacts.echo(PGP or Windows Signature Signing) - signArtifacts.fileExists(tests/jenkins/sign.sh) - signArtifacts.git({url=https://github.com/opensearch-project/opensearch-build.git, branch=main}) - signArtifacts.sh(curl -sSL https://artifacts.opensearch.org/publickeys/opensearch.pgp | gpg --import -) - signArtifacts.usernamePassword({credentialsId=github_bot_token_name, usernameVariable=GITHUB_USER, passwordVariable=GITHUB_TOKEN}) - signArtifacts.string({credentialsId=jenkins-signer-client-role, variable=SIGNER_CLIENT_ROLE}) - signArtifacts.string({credentialsId=jenkins-signer-client-external-id, variable=SIGNER_CLIENT_EXTERNAL_ID}) - signArtifacts.string({credentialsId=jenkins-signer-client-unsigned-bucket, variable=SIGNER_CLIENT_UNSIGNED_BUCKET}) - signArtifacts.string({credentialsId=jenkins-signer-client-signed-bucket, variable=SIGNER_CLIENT_SIGNED_BUCKET}) - signArtifacts.withCredentials([[GITHUB_USER, GITHUB_TOKEN], SIGNER_CLIENT_ROLE, SIGNER_CLIENT_EXTERNAL_ID, SIGNER_CLIENT_UNSIGNED_BUCKET, SIGNER_CLIENT_SIGNED_BUCKET], groovy.lang.Closure) - signArtifacts.sh( - #!/bin/bash - set +x - export ROLE=SIGNER_CLIENT_ROLE - export EXTERNAL_ID=SIGNER_CLIENT_EXTERNAL_ID - export UNSIGNED_BUCKET=SIGNER_CLIENT_UNSIGNED_BUCKET - export SIGNED_BUCKET=SIGNER_CLIENT_SIGNED_BUCKET - - tests/jenkins/sign.sh tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins --sigtype=.sig - ) - promoteArtifacts.println(Signing Core/Bundle Artifacts) - promoteArtifacts.findFiles({glob=**/opensearch-min-1.3.0*.tar*,**/opensearch-1.3.0*.tar*}) - promoteArtifacts.getPath() - createSha512Checksums.sh({script=find tests/jenkins/tests/jenkins/file/found.zip -type f, returnStdout=true}) - createSha512Checksums.echo(Not generating sha for bbb in tests/jenkins/tests/jenkins/file/found.zip, doesn't match allowed types [.tar.gz, .zip, .rpm]) - createSha512Checksums.echo(Not generating sha for ccc in tests/jenkins/tests/jenkins/file/found.zip, doesn't match allowed types [.tar.gz, .zip, .rpm]) - promoteArtifacts.findFiles({glob=**/opensearch-min-1.3.0*.tar*,**/opensearch-1.3.0*.tar*}) - promoteArtifacts.getPath() - createSignatureFiles.signArtifacts({sigtype=.sig, artifactPath=tests/jenkins/tests/jenkins/file/found.zip}) - signArtifacts.echo(PGP or Windows Signature Signing) - signArtifacts.fileExists(tests/jenkins/sign.sh) - signArtifacts.git({url=https://github.com/opensearch-project/opensearch-build.git, branch=main}) - signArtifacts.sh(curl -sSL https://artifacts.opensearch.org/publickeys/opensearch.pgp | gpg --import -) - signArtifacts.usernamePassword({credentialsId=github_bot_token_name, usernameVariable=GITHUB_USER, passwordVariable=GITHUB_TOKEN}) - signArtifacts.string({credentialsId=jenkins-signer-client-role, variable=SIGNER_CLIENT_ROLE}) - signArtifacts.string({credentialsId=jenkins-signer-client-external-id, variable=SIGNER_CLIENT_EXTERNAL_ID}) - signArtifacts.string({credentialsId=jenkins-signer-client-unsigned-bucket, variable=SIGNER_CLIENT_UNSIGNED_BUCKET}) - signArtifacts.string({credentialsId=jenkins-signer-client-signed-bucket, variable=SIGNER_CLIENT_SIGNED_BUCKET}) - signArtifacts.withCredentials([[GITHUB_USER, GITHUB_TOKEN], SIGNER_CLIENT_ROLE, SIGNER_CLIENT_EXTERNAL_ID, SIGNER_CLIENT_UNSIGNED_BUCKET, SIGNER_CLIENT_SIGNED_BUCKET], groovy.lang.Closure) - signArtifacts.sh( - #!/bin/bash - set +x - export ROLE=SIGNER_CLIENT_ROLE - export EXTERNAL_ID=SIGNER_CLIENT_EXTERNAL_ID - export UNSIGNED_BUCKET=SIGNER_CLIENT_UNSIGNED_BUCKET - export SIGNED_BUCKET=SIGNER_CLIENT_SIGNED_BUCKET - - tests/jenkins/sign.sh tests/jenkins/tests/jenkins/file/found.zip --sigtype=.sig - ) - promoteArtifacts.withAWS({role=ARTIFACT_PROMOTION_ROLE_NAME, roleAccount=AWS_ACCOUNT_ARTIFACT, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure) - promoteArtifacts.s3Upload({bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=releases/plugins/discovery-ec2/1.3.0/, workingDir=tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins/, includePathPattern=**/discovery-ec2*}) - promoteArtifacts.s3Upload({bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=releases/plugins/transport-nio/1.3.0/, workingDir=tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins/, includePathPattern=**/transport-nio*}) - promoteArtifacts.s3Upload({bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=releases/plugins/discovery-gce/1.3.0/, workingDir=tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins/, includePathPattern=**/discovery-gce*}) - promoteArtifacts.s3Upload({bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=releases/plugins/analysis-ukrainian/1.3.0/, workingDir=tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins/, includePathPattern=**/analysis-ukrainian*}) - promoteArtifacts.s3Upload({bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=releases/plugins/discovery-azure-classic/1.3.0/, workingDir=tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins/, includePathPattern=**/discovery-azure-classic*}) - promoteArtifacts.s3Upload({bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=releases/plugins/analysis-phonetic/1.3.0/, workingDir=tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins/, includePathPattern=**/analysis-phonetic*}) - promoteArtifacts.s3Upload({bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=releases/plugins/mapper-murmur3/1.3.0/, workingDir=tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins/, includePathPattern=**/mapper-murmur3*}) - promoteArtifacts.s3Upload({bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=releases/plugins/analysis-kuromoji/1.3.0/, workingDir=tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins/, includePathPattern=**/analysis-kuromoji*}) - promoteArtifacts.s3Upload({bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=releases/plugins/analysis-stempel/1.3.0/, workingDir=tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins/, includePathPattern=**/analysis-stempel*}) - promoteArtifacts.s3Upload({bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=releases/plugins/mapper-annotated-text/1.3.0/, workingDir=tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins/, includePathPattern=**/mapper-annotated-text*}) - promoteArtifacts.s3Upload({bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=releases/plugins/repository-hdfs/1.3.0/, workingDir=tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins/, includePathPattern=**/repository-hdfs*}) - promoteArtifacts.s3Upload({bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=releases/plugins/analysis-icu/1.3.0/, workingDir=tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins/, includePathPattern=**/analysis-icu*}) - promoteArtifacts.s3Upload({bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=releases/plugins/mapper-size/1.3.0/, workingDir=tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins/, includePathPattern=**/mapper-size*}) - promoteArtifacts.s3Upload({bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=releases/plugins/ingest-attachment/1.3.0/, workingDir=tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins/, includePathPattern=**/ingest-attachment*}) - promoteArtifacts.s3Upload({bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=releases/plugins/repository-azure/1.3.0/, workingDir=tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins/, includePathPattern=**/repository-azure*}) - promoteArtifacts.s3Upload({bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=releases/plugins/repository-s3/1.3.0/, workingDir=tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins/, includePathPattern=**/repository-s3*}) - promoteArtifacts.s3Upload({bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=releases/plugins/analysis-nori/1.3.0/, workingDir=tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins/, includePathPattern=**/analysis-nori*}) - promoteArtifacts.s3Upload({bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=releases/plugins/store-smb/1.3.0/, workingDir=tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins/, includePathPattern=**/store-smb*}) - promoteArtifacts.s3Upload({bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=releases/plugins/analysis-smartcn/1.3.0/, workingDir=tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins/, includePathPattern=**/analysis-smartcn*}) - promoteArtifacts.s3Upload({bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=releases/plugins/repository-gcs/1.3.0/, workingDir=tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins/, includePathPattern=**/repository-gcs*}) - promoteArtifacts.s3Upload({bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=releases/core/opensearch/1.3.0/, workingDir=tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/dist/, includePathPattern=**/opensearch-min-1.3.0-linux-x64*}) - promoteArtifacts.s3Upload({bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=releases/bundle/opensearch/1.3.0/, workingDir=tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/dist/opensearch/, includePathPattern=**/opensearch-1.3.0-linux-x64*}) - promoteArtifacts.println(S3 download rpm artifacts before creating signatures) - promoteArtifacts.withAWS({role=opensearch-bundle, roleAccount=AWS_ACCOUNT_PUBLIC, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure) - promoteArtifacts.s3Download({bucket=ARTIFACT_BUCKET_NAME, file=tests/jenkins/artifacts/rpm, path=vars-build/1.3.0/33/linux/x64/rpm/, force=true}) - promoteArtifacts.readYaml({file=tests/jenkins/artifacts/rpm/vars-build/1.3.0/33/linux/x64/rpm/builds/opensearch/manifest.yml}) - promoteArtifacts.fileExists(tests/jenkins/artifacts/rpm/vars-build/1.3.0/33/linux/x64/rpm/builds/opensearch/core-plugins) - promoteArtifacts.println(Signing Starts) - promoteArtifacts.println(Signing Core/Bundle Artifacts) - promoteArtifacts.findFiles({glob=**/opensearch-min-1.3.0*.rpm*,**/opensearch-1.3.0*.rpm*}) - promoteArtifacts.getPath() - createSha512Checksums.sh({script=find tests/jenkins/tests/jenkins/file/found.zip -type f, returnStdout=true}) - createSha512Checksums.echo(Not generating sha for bbb in tests/jenkins/tests/jenkins/file/found.zip, doesn't match allowed types [.tar.gz, .zip, .rpm]) - createSha512Checksums.echo(Not generating sha for ccc in tests/jenkins/tests/jenkins/file/found.zip, doesn't match allowed types [.tar.gz, .zip, .rpm]) - promoteArtifacts.findFiles({glob=**/opensearch-min-1.3.0*.rpm*,**/opensearch-1.3.0*.rpm*}) - promoteArtifacts.getPath() - createSignatureFiles.signArtifacts({sigtype=.sig, artifactPath=tests/jenkins/tests/jenkins/file/found.zip}) - signArtifacts.echo(PGP or Windows Signature Signing) - signArtifacts.fileExists(tests/jenkins/sign.sh) - signArtifacts.git({url=https://github.com/opensearch-project/opensearch-build.git, branch=main}) - signArtifacts.sh(curl -sSL https://artifacts.opensearch.org/publickeys/opensearch.pgp | gpg --import -) - signArtifacts.usernamePassword({credentialsId=github_bot_token_name, usernameVariable=GITHUB_USER, passwordVariable=GITHUB_TOKEN}) - signArtifacts.string({credentialsId=jenkins-signer-client-role, variable=SIGNER_CLIENT_ROLE}) - signArtifacts.string({credentialsId=jenkins-signer-client-external-id, variable=SIGNER_CLIENT_EXTERNAL_ID}) - signArtifacts.string({credentialsId=jenkins-signer-client-unsigned-bucket, variable=SIGNER_CLIENT_UNSIGNED_BUCKET}) - signArtifacts.string({credentialsId=jenkins-signer-client-signed-bucket, variable=SIGNER_CLIENT_SIGNED_BUCKET}) - signArtifacts.withCredentials([[GITHUB_USER, GITHUB_TOKEN], SIGNER_CLIENT_ROLE, SIGNER_CLIENT_EXTERNAL_ID, SIGNER_CLIENT_UNSIGNED_BUCKET, SIGNER_CLIENT_SIGNED_BUCKET], groovy.lang.Closure) - signArtifacts.sh( - #!/bin/bash - set +x - export ROLE=SIGNER_CLIENT_ROLE - export EXTERNAL_ID=SIGNER_CLIENT_EXTERNAL_ID - export UNSIGNED_BUCKET=SIGNER_CLIENT_UNSIGNED_BUCKET - export SIGNED_BUCKET=SIGNER_CLIENT_SIGNED_BUCKET - - tests/jenkins/sign.sh tests/jenkins/tests/jenkins/file/found.zip --sigtype=.sig - ) - promoteArtifacts.withAWS({role=ARTIFACT_PROMOTION_ROLE_NAME, roleAccount=AWS_ACCOUNT_ARTIFACT, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure) - promoteArtifacts.s3Upload({bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=releases/bundle/opensearch/1.3.0/, workingDir=tests/jenkins/artifacts/rpm/vars-build/1.3.0/33/linux/x64/rpm/dist/opensearch/, includePathPattern=**/opensearch-1.3.0-linux-x64*}) diff --git a/tests/jenkins/jobs/PromoteArtifacts_actions_OpenSearch_Dashboards_Jenkinsfile b/tests/jenkins/jobs/PromoteArtifacts_actions_OpenSearch_Dashboards_Jenkinsfile deleted file mode 100644 index eb96b2b27f..0000000000 --- a/tests/jenkins/jobs/PromoteArtifacts_actions_OpenSearch_Dashboards_Jenkinsfile +++ /dev/null @@ -1,15 +0,0 @@ -pipeline { - agent none - stages { - stage('promote') { - steps { - script { - promoteArtifacts( - manifest: 'tests/jenkins/data/opensearch-dashboards-1.3.0.yml', - fileActions: [createSha512Checksums(), createSignatureFiles()] - ) - } - } - } - } -} diff --git a/tests/jenkins/jobs/PromoteArtifacts_actions_OpenSearch_Dashboards_Jenkinsfile.txt b/tests/jenkins/jobs/PromoteArtifacts_actions_OpenSearch_Dashboards_Jenkinsfile.txt deleted file mode 100644 index 8e05a891a0..0000000000 --- a/tests/jenkins/jobs/PromoteArtifacts_actions_OpenSearch_Dashboards_Jenkinsfile.txt +++ /dev/null @@ -1,95 +0,0 @@ - PromoteArtifacts_actions_OpenSearch_Dashboards_Jenkinsfile.run() - PromoteArtifacts_actions_OpenSearch_Dashboards_Jenkinsfile.pipeline(groovy.lang.Closure) - PromoteArtifacts_actions_OpenSearch_Dashboards_Jenkinsfile.echo(Executing on agent [label:none]) - PromoteArtifacts_actions_OpenSearch_Dashboards_Jenkinsfile.stage(promote, groovy.lang.Closure) - PromoteArtifacts_actions_OpenSearch_Dashboards_Jenkinsfile.script(groovy.lang.Closure) - PromoteArtifacts_actions_OpenSearch_Dashboards_Jenkinsfile.createSha512Checksums() - PromoteArtifacts_actions_OpenSearch_Dashboards_Jenkinsfile.createSignatureFiles() - createSignatureFiles.legacySCM(groovy.lang.Closure) - createSignatureFiles.library({identifier=jenkins@20211123, retriever=null}) - PromoteArtifacts_actions_OpenSearch_Dashboards_Jenkinsfile.promoteArtifacts({manifest=tests/jenkins/data/opensearch-dashboards-1.3.0.yml, fileActions=[groovy.lang.Closure, groovy.lang.Closure]}) - promoteArtifacts.legacySCM(groovy.lang.Closure) - promoteArtifacts.library({identifier=jenkins@20211123, retriever=null}) - promoteArtifacts.readYaml({file=tests/jenkins/data/opensearch-dashboards-1.3.0.yml}) - InputManifest.asBoolean() - promoteArtifacts.string({credentialsId=jenkins-aws-account-public, variable=AWS_ACCOUNT_PUBLIC}) - promoteArtifacts.string({credentialsId=jenkins-artifact-bucket-name, variable=ARTIFACT_BUCKET_NAME}) - promoteArtifacts.string({credentialsId=jenkins-artifact-promotion-role, variable=ARTIFACT_PROMOTION_ROLE_NAME}) - promoteArtifacts.string({credentialsId=jenkins-aws-production-account, variable=AWS_ACCOUNT_ARTIFACT}) - promoteArtifacts.string({credentialsId=jenkins-artifact-production-bucket-name, variable=ARTIFACT_PRODUCTION_BUCKET_NAME}) - promoteArtifacts.withCredentials([AWS_ACCOUNT_PUBLIC, ARTIFACT_BUCKET_NAME, ARTIFACT_PROMOTION_ROLE_NAME, AWS_ACCOUNT_ARTIFACT, ARTIFACT_PRODUCTION_BUCKET_NAME], groovy.lang.Closure) - promoteArtifacts.println(S3 download tar artifacts before creating signatures) - promoteArtifacts.withAWS({role=opensearch-bundle, roleAccount=AWS_ACCOUNT_PUBLIC, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure) - promoteArtifacts.s3Download({bucket=ARTIFACT_BUCKET_NAME, file=tests/jenkins/artifacts/tar, path=vars-build/1.3.0/33/linux/x64/tar/, force=true}) - promoteArtifacts.readYaml({file=tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch-dashboards/manifest.yml}) - promoteArtifacts.fileExists(tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch-dashboards/core-plugins) - promoteArtifacts.println(Signing Starts) - promoteArtifacts.println(Signing Core/Bundle Artifacts) - promoteArtifacts.findFiles({glob=**/opensearch-dashboards-min-1.3.0*.tar*,**/opensearch-dashboards-1.3.0*.tar*}) - promoteArtifacts.getPath() - createSha512Checksums.sh({script=find tests/jenkins/tests/jenkins/file/found.zip -type f, returnStdout=true}) - createSha512Checksums.echo(Not generating sha for bbb in tests/jenkins/tests/jenkins/file/found.zip, doesn't match allowed types [.tar.gz, .zip, .rpm]) - createSha512Checksums.echo(Not generating sha for ccc in tests/jenkins/tests/jenkins/file/found.zip, doesn't match allowed types [.tar.gz, .zip, .rpm]) - promoteArtifacts.findFiles({glob=**/opensearch-dashboards-min-1.3.0*.tar*,**/opensearch-dashboards-1.3.0*.tar*}) - promoteArtifacts.getPath() - createSignatureFiles.signArtifacts({sigtype=.sig, artifactPath=tests/jenkins/tests/jenkins/file/found.zip}) - signArtifacts.echo(PGP or Windows Signature Signing) - signArtifacts.fileExists(tests/jenkins/sign.sh) - signArtifacts.git({url=https://github.com/opensearch-project/opensearch-build.git, branch=main}) - signArtifacts.sh(curl -sSL https://artifacts.opensearch.org/publickeys/opensearch.pgp | gpg --import -) - signArtifacts.usernamePassword({credentialsId=github_bot_token_name, usernameVariable=GITHUB_USER, passwordVariable=GITHUB_TOKEN}) - signArtifacts.string({credentialsId=jenkins-signer-client-role, variable=SIGNER_CLIENT_ROLE}) - signArtifacts.string({credentialsId=jenkins-signer-client-external-id, variable=SIGNER_CLIENT_EXTERNAL_ID}) - signArtifacts.string({credentialsId=jenkins-signer-client-unsigned-bucket, variable=SIGNER_CLIENT_UNSIGNED_BUCKET}) - signArtifacts.string({credentialsId=jenkins-signer-client-signed-bucket, variable=SIGNER_CLIENT_SIGNED_BUCKET}) - signArtifacts.withCredentials([[GITHUB_USER, GITHUB_TOKEN], SIGNER_CLIENT_ROLE, SIGNER_CLIENT_EXTERNAL_ID, SIGNER_CLIENT_UNSIGNED_BUCKET, SIGNER_CLIENT_SIGNED_BUCKET], groovy.lang.Closure) - signArtifacts.sh( - #!/bin/bash - set +x - export ROLE=SIGNER_CLIENT_ROLE - export EXTERNAL_ID=SIGNER_CLIENT_EXTERNAL_ID - export UNSIGNED_BUCKET=SIGNER_CLIENT_UNSIGNED_BUCKET - export SIGNED_BUCKET=SIGNER_CLIENT_SIGNED_BUCKET - - tests/jenkins/sign.sh tests/jenkins/tests/jenkins/file/found.zip --sigtype=.sig - ) - promoteArtifacts.withAWS({role=ARTIFACT_PROMOTION_ROLE_NAME, roleAccount=AWS_ACCOUNT_ARTIFACT, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure) - promoteArtifacts.s3Upload({bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=releases/core/opensearch-dashboards/1.3.0/, workingDir=tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch-dashboards/dist/, includePathPattern=**/opensearch-dashboards-min-1.3.0-linux-x64*}) - promoteArtifacts.s3Upload({bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=releases/bundle/opensearch-dashboards/1.3.0/, workingDir=tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/dist/opensearch-dashboards/, includePathPattern=**/opensearch-dashboards-1.3.0-linux-x64*}) - promoteArtifacts.println(S3 download rpm artifacts before creating signatures) - promoteArtifacts.withAWS({role=opensearch-bundle, roleAccount=AWS_ACCOUNT_PUBLIC, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure) - promoteArtifacts.s3Download({bucket=ARTIFACT_BUCKET_NAME, file=tests/jenkins/artifacts/rpm, path=vars-build/1.3.0/33/linux/x64/rpm/, force=true}) - promoteArtifacts.readYaml({file=tests/jenkins/artifacts/rpm/vars-build/1.3.0/33/linux/x64/rpm/builds/opensearch-dashboards/manifest.yml}) - promoteArtifacts.fileExists(tests/jenkins/artifacts/rpm/vars-build/1.3.0/33/linux/x64/rpm/builds/opensearch-dashboards/core-plugins) - promoteArtifacts.println(Signing Starts) - promoteArtifacts.println(Signing Core/Bundle Artifacts) - promoteArtifacts.findFiles({glob=**/opensearch-dashboards-min-1.3.0*.rpm*,**/opensearch-dashboards-1.3.0*.rpm*}) - promoteArtifacts.getPath() - createSha512Checksums.sh({script=find tests/jenkins/tests/jenkins/file/found.zip -type f, returnStdout=true}) - createSha512Checksums.echo(Not generating sha for bbb in tests/jenkins/tests/jenkins/file/found.zip, doesn't match allowed types [.tar.gz, .zip, .rpm]) - createSha512Checksums.echo(Not generating sha for ccc in tests/jenkins/tests/jenkins/file/found.zip, doesn't match allowed types [.tar.gz, .zip, .rpm]) - promoteArtifacts.findFiles({glob=**/opensearch-dashboards-min-1.3.0*.rpm*,**/opensearch-dashboards-1.3.0*.rpm*}) - promoteArtifacts.getPath() - createSignatureFiles.signArtifacts({sigtype=.sig, artifactPath=tests/jenkins/tests/jenkins/file/found.zip}) - signArtifacts.echo(PGP or Windows Signature Signing) - signArtifacts.fileExists(tests/jenkins/sign.sh) - signArtifacts.git({url=https://github.com/opensearch-project/opensearch-build.git, branch=main}) - signArtifacts.sh(curl -sSL https://artifacts.opensearch.org/publickeys/opensearch.pgp | gpg --import -) - signArtifacts.usernamePassword({credentialsId=github_bot_token_name, usernameVariable=GITHUB_USER, passwordVariable=GITHUB_TOKEN}) - signArtifacts.string({credentialsId=jenkins-signer-client-role, variable=SIGNER_CLIENT_ROLE}) - signArtifacts.string({credentialsId=jenkins-signer-client-external-id, variable=SIGNER_CLIENT_EXTERNAL_ID}) - signArtifacts.string({credentialsId=jenkins-signer-client-unsigned-bucket, variable=SIGNER_CLIENT_UNSIGNED_BUCKET}) - signArtifacts.string({credentialsId=jenkins-signer-client-signed-bucket, variable=SIGNER_CLIENT_SIGNED_BUCKET}) - signArtifacts.withCredentials([[GITHUB_USER, GITHUB_TOKEN], SIGNER_CLIENT_ROLE, SIGNER_CLIENT_EXTERNAL_ID, SIGNER_CLIENT_UNSIGNED_BUCKET, SIGNER_CLIENT_SIGNED_BUCKET], groovy.lang.Closure) - signArtifacts.sh( - #!/bin/bash - set +x - export ROLE=SIGNER_CLIENT_ROLE - export EXTERNAL_ID=SIGNER_CLIENT_EXTERNAL_ID - export UNSIGNED_BUCKET=SIGNER_CLIENT_UNSIGNED_BUCKET - export SIGNED_BUCKET=SIGNER_CLIENT_SIGNED_BUCKET - - tests/jenkins/sign.sh tests/jenkins/tests/jenkins/file/found.zip --sigtype=.sig - ) - promoteArtifacts.withAWS({role=ARTIFACT_PROMOTION_ROLE_NAME, roleAccount=AWS_ACCOUNT_ARTIFACT, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure) - promoteArtifacts.s3Upload({bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=releases/bundle/opensearch-dashboards/1.3.0/, workingDir=tests/jenkins/artifacts/rpm/vars-build/1.3.0/33/linux/x64/rpm/dist/opensearch-dashboards/, includePathPattern=**/opensearch-dashboards-1.3.0-linux-x64*}) diff --git a/tests/jenkins/jobs/PromoteYumRepos_Jenkinsfile b/tests/jenkins/jobs/PromoteYumRepos_Jenkinsfile deleted file mode 100644 index 05e5de83e3..0000000000 --- a/tests/jenkins/jobs/PromoteYumRepos_Jenkinsfile +++ /dev/null @@ -1,16 +0,0 @@ -pipeline { - agent none - stages { - stage('promote') { - steps { - script { - promoteYumRepos( - buildNumber: "123", - jobName: "opensearch", - manifest: "tests/jenkins/data/opensearch-1.3.0.yml" - ) - } - } - } - } -} diff --git a/tests/jenkins/jobs/PromoteYumRepos_Jenkinsfile.txt b/tests/jenkins/jobs/PromoteYumRepos_Jenkinsfile.txt deleted file mode 100644 index f752f82494..0000000000 --- a/tests/jenkins/jobs/PromoteYumRepos_Jenkinsfile.txt +++ /dev/null @@ -1,89 +0,0 @@ - PromoteYumRepos_Jenkinsfile.run() - PromoteYumRepos_Jenkinsfile.pipeline(groovy.lang.Closure) - PromoteYumRepos_Jenkinsfile.echo(Executing on agent [label:none]) - PromoteYumRepos_Jenkinsfile.stage(promote, groovy.lang.Closure) - PromoteYumRepos_Jenkinsfile.script(groovy.lang.Closure) - PromoteYumRepos_Jenkinsfile.promoteYumRepos({buildNumber=123, jobName=opensearch, manifest=tests/jenkins/data/opensearch-1.3.0.yml}) - promoteYumRepos.legacySCM(groovy.lang.Closure) - promoteYumRepos.library({identifier=jenkins@20211123, retriever=null}) - promoteYumRepos.readYaml({file=tests/jenkins/data/opensearch-1.3.0.yml}) - InputManifest.asBoolean() - promoteYumRepos.string({credentialsId=jenkins-artifact-promotion-role, variable=ARTIFACT_PROMOTION_ROLE_NAME}) - promoteYumRepos.string({credentialsId=jenkins-aws-production-account, variable=AWS_ACCOUNT_ARTIFACT}) - promoteYumRepos.string({credentialsId=jenkins-artifact-production-bucket-name, variable=ARTIFACT_PRODUCTION_BUCKET_NAME}) - promoteYumRepos.withCredentials([ARTIFACT_PROMOTION_ROLE_NAME, AWS_ACCOUNT_ARTIFACT, ARTIFACT_PRODUCTION_BUCKET_NAME], groovy.lang.Closure) - promoteYumRepos.withAWS({role=ARTIFACT_PROMOTION_ROLE_NAME, roleAccount=AWS_ACCOUNT_ARTIFACT, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure) - promoteYumRepos.println(Pulling Prod Yumrepo) - promoteYumRepos.sh(aws s3 sync s3://ARTIFACT_PRODUCTION_BUCKET_NAME/releases/bundle/opensearch/1.x/yum/ /tmp/workspace/artifacts/releases/bundle/opensearch/1.x/yum/ --no-progress) - promoteYumRepos.sh( - set -e - set +x - set +x - - echo "Pulling 1.3.0 rpms" - cd /tmp/workspace/artifacts/releases/bundle/opensearch/1.x/yum - curl -SLO https://ci.opensearch.org/dbc/opensearch/1.3.0/123/linux/x64/rpm/dist/opensearch/opensearch-1.3.0-linux-x64.rpm - curl -SLO https://ci.opensearch.org/dbc/opensearch/1.3.0/123/linux/arm64/rpm/dist/opensearch/opensearch-1.3.0-linux-arm64.rpm - - ls -l - - rm -vf repodata/repomd.xml.asc - - echo "Update repo metadata" - createrepo --update . - - # Rename .xml to .pom for signing - # Please do not add .xml to signer filter - # As maven have many .xml and we do not want to sign them - # This is an outlier case for yum repo only - mv -v repodata/repomd.xml repodata/repomd.pom - - echo "Complete metadata update, awaiting signing repomd.xml" - - cd - - - ) - promoteYumRepos.signArtifacts({artifactPath=/tmp/workspace/artifacts/releases/bundle/opensearch/1.x/yum/repodata/repomd.pom, sigtype=.sig, platform=linux}) - signArtifacts.echo(PGP or Windows Signature Signing) - signArtifacts.fileExists(/tmp/workspace/sign.sh) - signArtifacts.git({url=https://github.com/opensearch-project/opensearch-build.git, branch=main}) - signArtifacts.sh(curl -sSL https://artifacts.opensearch.org/publickeys/opensearch.pgp | gpg --import -) - signArtifacts.usernamePassword({credentialsId=github_bot_token_name, usernameVariable=GITHUB_USER, passwordVariable=GITHUB_TOKEN}) - signArtifacts.string({credentialsId=jenkins-signer-client-role, variable=SIGNER_CLIENT_ROLE}) - signArtifacts.string({credentialsId=jenkins-signer-client-external-id, variable=SIGNER_CLIENT_EXTERNAL_ID}) - signArtifacts.string({credentialsId=jenkins-signer-client-unsigned-bucket, variable=SIGNER_CLIENT_UNSIGNED_BUCKET}) - signArtifacts.string({credentialsId=jenkins-signer-client-signed-bucket, variable=SIGNER_CLIENT_SIGNED_BUCKET}) - signArtifacts.withCredentials([[GITHUB_USER, GITHUB_TOKEN], SIGNER_CLIENT_ROLE, SIGNER_CLIENT_EXTERNAL_ID, SIGNER_CLIENT_UNSIGNED_BUCKET, SIGNER_CLIENT_SIGNED_BUCKET], groovy.lang.Closure) - signArtifacts.sh( - #!/bin/bash - set +x - export ROLE=SIGNER_CLIENT_ROLE - export EXTERNAL_ID=SIGNER_CLIENT_EXTERNAL_ID - export UNSIGNED_BUCKET=SIGNER_CLIENT_UNSIGNED_BUCKET - export SIGNED_BUCKET=SIGNER_CLIENT_SIGNED_BUCKET - - /tmp/workspace/sign.sh /tmp/workspace/artifacts/releases/bundle/opensearch/1.x/yum/repodata/repomd.pom --sigtype=.sig --platform=linux - ) - promoteYumRepos.sh( - set -e - set +x - - cd /tmp/workspace/artifacts/releases/bundle/opensearch/1.x/yum/repodata/ - - ls -l - - mv -v repomd.pom repomd.xml - mv -v repomd.pom.sig repomd.xml.sig - - # This step is required as yum only accept .asc and signing workflow only support .sig - cat repomd.xml.sig | gpg --enarmor | sed 's@ARMORED FILE@SIGNATURE@g' > repomd.xml.asc - - rm -vf repomd.xml.sig - - ls -l - - cd - - ) - promoteYumRepos.withAWS({role=ARTIFACT_PROMOTION_ROLE_NAME, roleAccount=AWS_ACCOUNT_ARTIFACT, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure) - promoteYumRepos.println(Pushing Prod Yumrepo) - promoteYumRepos.sh(aws s3 sync /tmp/workspace/artifacts/releases/bundle/opensearch/1.x/yum/ s3://ARTIFACT_PRODUCTION_BUCKET_NAME/releases/bundle/opensearch/1.x/yum/ --no-progress) diff --git a/tests/jenkins/jobs/PublishNotification_Jenkinsfile b/tests/jenkins/jobs/PublishNotification_Jenkinsfile deleted file mode 100644 index 7b70b8d269..0000000000 --- a/tests/jenkins/jobs/PublishNotification_Jenkinsfile +++ /dev/null @@ -1,22 +0,0 @@ -pipeline { - agent none - stages { - stage('notify') { - steps { - script { - try { - publishNotification( - icon: ':white_check_mark:', - message: 'Successful Build', - extra: 'extra', - manifest: '1.2.0/opensearch-1.2.0.yml', - credentialsId: 'jenkins-build-notice-webhook' - ) - }catch (Exception e) { - echo 'Exception occurred: ' + e.toString() - } - } - } - } - } -} diff --git a/tests/jenkins/jobs/PublishNotification_Jenkinsfile.txt b/tests/jenkins/jobs/PublishNotification_Jenkinsfile.txt deleted file mode 100644 index 5a7add52e0..0000000000 --- a/tests/jenkins/jobs/PublishNotification_Jenkinsfile.txt +++ /dev/null @@ -1,15 +0,0 @@ - PublishNotification_Jenkinsfile.run() - PublishNotification_Jenkinsfile.pipeline(groovy.lang.Closure) - PublishNotification_Jenkinsfile.echo(Executing on agent [label:none]) - PublishNotification_Jenkinsfile.stage(notify, groovy.lang.Closure) - PublishNotification_Jenkinsfile.script(groovy.lang.Closure) - PublishNotification_Jenkinsfile.publishNotification({icon=:white_check_mark:, message=Successful Build, extra=extra, manifest=1.2.0/opensearch-1.2.0.yml, credentialsId=jenkins-build-notice-webhook}) - publishNotification.string({credentialsId=jenkins-build-notice-webhook, variable=WEBHOOK_URL}) - publishNotification.withCredentials([WEBHOOK_URL], groovy.lang.Closure) - publishNotification.sh(curl -XPOST --header "Content-Type: application/json" --data '{"result_text":":white_check_mark: -JOB_NAME=dummy_job -BUILD_NUMBER=[123] -MESSAGE=Successful Build -BUILD_URL: htth://BUILD_URL_dummy.com -MANIFEST: 1.2.0/opensearch-1.2.0.yml -extra"}' "WEBHOOK_URL") diff --git a/tests/jenkins/jobs/RpmDashboardsDistValidation_Jenkinsfile b/tests/jenkins/jobs/RpmDashboardsDistValidation_Jenkinsfile deleted file mode 100644 index 9dbda75abe..0000000000 --- a/tests/jenkins/jobs/RpmDashboardsDistValidation_Jenkinsfile +++ /dev/null @@ -1,15 +0,0 @@ -pipeline { - agent none - stages { - stage('validate RPM meta') { - steps { - script { - rpmDashboardsDistValidation( - bundleManifest: "tests/jenkins/data/opensearch-dashboards-1.3.0-x64-rpm.yml", - rpmDistribution: "/tmp/workspace/opensearch-dashboards-1.3.0-linux-x64.rpm" - ) - } - } - } - } -} diff --git a/tests/jenkins/jobs/RpmDashboardsDistValidation_Jenkinsfile.txt b/tests/jenkins/jobs/RpmDashboardsDistValidation_Jenkinsfile.txt deleted file mode 100644 index 3301b8cfdf..0000000000 --- a/tests/jenkins/jobs/RpmDashboardsDistValidation_Jenkinsfile.txt +++ /dev/null @@ -1,50 +0,0 @@ - RpmDashboardsDistValidation_Jenkinsfile.run() - RpmDashboardsDistValidation_Jenkinsfile.pipeline(groovy.lang.Closure) - RpmDashboardsDistValidation_Jenkinsfile.echo(Executing on agent [label:none]) - RpmDashboardsDistValidation_Jenkinsfile.stage(validate RPM meta, groovy.lang.Closure) - RpmDashboardsDistValidation_Jenkinsfile.script(groovy.lang.Closure) - RpmDashboardsDistValidation_Jenkinsfile.rpmDashboardsDistValidation({bundleManifest=tests/jenkins/data/opensearch-dashboards-1.3.0-x64-rpm.yml, rpmDistribution=/tmp/workspace/opensearch-dashboards-1.3.0-linux-x64.rpm}) - rpmDashboardsDistValidation.legacySCM(groovy.lang.Closure) - rpmDashboardsDistValidation.library({identifier=jenkins@20211123, retriever=null}) - rpmDashboardsDistValidation.readYaml({file=tests/jenkins/data/opensearch-dashboards-1.3.0-x64-rpm.yml}) - BundleManifest.asBoolean() - BundleManifest.getNames() - rpmDashboardsDistValidation.rpmMetaValidation({rpmDistribution=/tmp/workspace/opensearch-dashboards-1.3.0-linux-x64.rpm, refMap={Name=opensearch-dashboards, Version=1.3.0, Architecture=x64, Group=Application/Internet, License=Apache-2.0, Relocations=(not relocatable), URL=https://opensearch.org/, Summary=Open source visualization dashboards for OpenSearch, Description=OpenSearch Dashboards is the visualization tool for data in OpenSearch -For more information, see: https://opensearch.org/}}) - rpmMetaValidation.sh({script=rpm -qip /tmp/workspace/opensearch-dashboards-1.3.0-linux-x64.rpm, returnStdout=true}) - rpmMetaValidation.println(Meta data for Name is validated) - rpmMetaValidation.println(Meta data for Version is validated) - rpmMetaValidation.println(Meta data for Architecture is validated) - rpmMetaValidation.println(Meta data for Group is validated) - rpmMetaValidation.println(Meta data for License is validated) - rpmMetaValidation.println(Meta data for Relocations is validated) - rpmMetaValidation.println(Meta data for URL is validated) - rpmMetaValidation.println(Meta data for Summary is validated) - rpmMetaValidation.println(Meta data for Description is validated) - rpmMetaValidation.sh({script=rpm -K -v /tmp/workspace/opensearch-dashboards-1.3.0-linux-x64.rpm, returnStdout=true}) - rpmDashboardsDistValidation.rpmCommands({command=install, product=opensearch-1.3.0}) - rpmCommands.sh(yum install -y opensearch-1.3.0) - rpmDashboardsDistValidation.rpmCommands({command=install, product=opensearch-dashboards-1.3.0}) - rpmCommands.sh(yum install -y opensearch-dashboards-1.3.0) - rpmDashboardsDistValidation.systemdCommands({command=start, product=opensearch}) - systemdCommands.sh(systemctl start opensearch) - rpmDashboardsDistValidation.systemdCommands({command=start, product=opensearch-dashboards}) - systemdCommands.sh(systemctl start opensearch-dashboards) - rpmDashboardsDistValidation.systemdCommands({command=status, product=opensearch-dashboards}) - systemdCommands.sh({script=systemctl status opensearch-dashboards, returnStdout=true}) - rpmDashboardsDistValidation.sh({script=curl -s "http://localhost:5601/api/status" -u admin:admin, returnStatus=true}) - rpmDashboardsDistValidation.sh({script=curl -s "http://localhost:5601/api/status" -u admin:admin, returnStdout=true}) - rpmDashboardsDistValidation.readJSON({text=['name':'dummy_desktop', 'uuid':'c4677c7a-d76f-45eb-a124-7e30d2b10e4b', 'version':['number':'1.3.0', 'build_hash':'00e06934211e9819f99aabbf139885682f33e95e', 'build_number':1, 'build_snapshot':false], 'status':['overall':['since':'2022-04-07T21:54:39.960Z', 'state':'green', 'title':'Green', 'nickname':'Looking good', 'icon':'success', 'uiColor':'secondary']]]}) - rpmDashboardsDistValidation.sh({script=/usr/share/opensearch-dashboards/bin/opensearch-dashboards-plugin list --allow-root, returnStdout=true}) - BundleManifest.getLocation(ganttChartDashboards) - BundleManifest.getLocation(anomalyDetectionDashboards) - BundleManifest.getLocation(securityDashboards) - BundleManifest.getLocation(reportsDashboards) - rpmDashboardsDistValidation.systemdCommands({command=stop, product=opensearch-dashboards}) - systemdCommands.sh(systemctl stop opensearch-dashboards) - rpmDashboardsDistValidation.rpmCommands({command=remove, product=opensearch-dashboards}) - rpmCommands.sh(yum remove -y opensearch-dashboards) - rpmDashboardsDistValidation.systemdCommands({command=stop, product=opensearch}) - systemdCommands.sh(systemctl stop opensearch) - rpmDashboardsDistValidation.rpmCommands({command=remove, product=opensearch}) - rpmCommands.sh(yum remove -y opensearch) diff --git a/tests/jenkins/jobs/RpmMetaValidation_Jenkinsfile b/tests/jenkins/jobs/RpmMetaValidation_Jenkinsfile deleted file mode 100644 index 56c927f660..0000000000 --- a/tests/jenkins/jobs/RpmMetaValidation_Jenkinsfile +++ /dev/null @@ -1,20 +0,0 @@ -pipeline { - agent none - stages { - stage('validate RPM meta') { - steps { - script { - rpmMetaValidation( - refMap: [Name:"opensearch", Version: "1.3.1", Architecture: "x64", Group: "Application/Internet", - License: "Apache-2.0", Relocations: "(not relocatable)", URL: "https://opensearch.org/", - Summary: "An open source distributed and RESTful search engine", - Description: "OpenSearch makes it easy to ingest, search, visualize, and analyze your data\n" + - "For more information, see: https://opensearch.org/" - ], - rpmDistribution: "/tmp/workspace/opensearch-1.3.1-linux-x64.rpm" - ) - } - } - } - } -} diff --git a/tests/jenkins/jobs/RpmMetaValidation_Jenkinsfile.txt b/tests/jenkins/jobs/RpmMetaValidation_Jenkinsfile.txt deleted file mode 100644 index 2d42abe5cb..0000000000 --- a/tests/jenkins/jobs/RpmMetaValidation_Jenkinsfile.txt +++ /dev/null @@ -1,18 +0,0 @@ - RpmMetaValidation_Jenkinsfile.run() - RpmMetaValidation_Jenkinsfile.pipeline(groovy.lang.Closure) - RpmMetaValidation_Jenkinsfile.echo(Executing on agent [label:none]) - RpmMetaValidation_Jenkinsfile.stage(validate RPM meta, groovy.lang.Closure) - RpmMetaValidation_Jenkinsfile.script(groovy.lang.Closure) - RpmMetaValidation_Jenkinsfile.rpmMetaValidation({refMap={Name=opensearch, Version=1.3.1, Architecture=x64, Group=Application/Internet, License=Apache-2.0, Relocations=(not relocatable), URL=https://opensearch.org/, Summary=An open source distributed and RESTful search engine, Description=OpenSearch makes it easy to ingest, search, visualize, and analyze your data -For more information, see: https://opensearch.org/}, rpmDistribution=/tmp/workspace/opensearch-1.3.1-linux-x64.rpm}) - rpmMetaValidation.sh({script=rpm -qip /tmp/workspace/opensearch-1.3.1-linux-x64.rpm, returnStdout=true}) - rpmMetaValidation.println(Meta data for Name is validated) - rpmMetaValidation.println(Meta data for Version is validated) - rpmMetaValidation.println(Meta data for Architecture is validated) - rpmMetaValidation.println(Meta data for Group is validated) - rpmMetaValidation.println(Meta data for License is validated) - rpmMetaValidation.println(Meta data for Relocations is validated) - rpmMetaValidation.println(Meta data for URL is validated) - rpmMetaValidation.println(Meta data for Summary is validated) - rpmMetaValidation.println(Meta data for Description is validated) - rpmMetaValidation.sh({script=rpm -K -v /tmp/workspace/opensearch-1.3.1-linux-x64.rpm, returnStdout=true}) diff --git a/tests/jenkins/jobs/RpmOpenSearchDistValidation_Jenkinsfile b/tests/jenkins/jobs/RpmOpenSearchDistValidation_Jenkinsfile deleted file mode 100644 index 21ae433947..0000000000 --- a/tests/jenkins/jobs/RpmOpenSearchDistValidation_Jenkinsfile +++ /dev/null @@ -1,15 +0,0 @@ -pipeline { - agent none - stages { - stage('validate RPM meta') { - steps { - script { - rpmOpenSearchDistValidation( - bundleManifest: "tests/jenkins/data/opensearch-1.3.1-x64-rpm.yml", - rpmDistribution: "/tmp/workspace/opensearch-1.3.1-linux-x64.rpm" - ) - } - } - } - } -} diff --git a/tests/jenkins/jobs/RpmOpenSearchDistValidation_Jenkinsfile.txt b/tests/jenkins/jobs/RpmOpenSearchDistValidation_Jenkinsfile.txt deleted file mode 100644 index 0a9bdb59f6..0000000000 --- a/tests/jenkins/jobs/RpmOpenSearchDistValidation_Jenkinsfile.txt +++ /dev/null @@ -1,59 +0,0 @@ - RpmOpenSearchDistValidation_Jenkinsfile.run() - RpmOpenSearchDistValidation_Jenkinsfile.pipeline(groovy.lang.Closure) - RpmOpenSearchDistValidation_Jenkinsfile.echo(Executing on agent [label:none]) - RpmOpenSearchDistValidation_Jenkinsfile.stage(validate RPM meta, groovy.lang.Closure) - RpmOpenSearchDistValidation_Jenkinsfile.script(groovy.lang.Closure) - RpmOpenSearchDistValidation_Jenkinsfile.rpmOpenSearchDistValidation({bundleManifest=tests/jenkins/data/opensearch-1.3.1-x64-rpm.yml, rpmDistribution=/tmp/workspace/opensearch-1.3.1-linux-x64.rpm}) - rpmOpenSearchDistValidation.legacySCM(groovy.lang.Closure) - rpmOpenSearchDistValidation.library({identifier=jenkins@20211123, retriever=null}) - rpmOpenSearchDistValidation.readYaml({file=tests/jenkins/data/opensearch-1.3.1-x64-rpm.yml}) - BundleManifest.asBoolean() - BundleManifest.getNames() - rpmOpenSearchDistValidation.rpmMetaValidation({rpmDistribution=/tmp/workspace/opensearch-1.3.1-linux-x64.rpm, refMap={Name=opensearch, Version=1.3.1, Architecture=x64, Group=Application/Internet, License=Apache-2.0, Relocations=(not relocatable), URL=https://opensearch.org/, Summary=An open source distributed and RESTful search engine, Description=OpenSearch makes it easy to ingest, search, visualize, and analyze your data -For more information, see: https://opensearch.org/}}) - rpmMetaValidation.sh({script=rpm -qip /tmp/workspace/opensearch-1.3.1-linux-x64.rpm, returnStdout=true}) - rpmMetaValidation.println(Meta data for Name is validated) - rpmMetaValidation.println(Meta data for Version is validated) - rpmMetaValidation.println(Meta data for Architecture is validated) - rpmMetaValidation.println(Meta data for Group is validated) - rpmMetaValidation.println(Meta data for License is validated) - rpmMetaValidation.println(Meta data for Relocations is validated) - rpmMetaValidation.println(Meta data for URL is validated) - rpmMetaValidation.println(Meta data for Summary is validated) - rpmMetaValidation.println(Meta data for Description is validated) - rpmMetaValidation.sh({script=rpm -K -v /tmp/workspace/opensearch-1.3.1-linux-x64.rpm, returnStdout=true}) - rpmOpenSearchDistValidation.rpmCommands({command=install, product=opensearch-1.3.1}) - rpmCommands.sh(yum install -y opensearch-1.3.1) - rpmOpenSearchDistValidation.sh([[ -d /etc/opensearch ]] && echo "/etc/opensearch directory exists"|| (echo "/etc/opensearch does not exist" && exit 1)) - rpmOpenSearchDistValidation.sh({script=ls /etc/opensearch, returnStdout=true}) - rpmOpenSearchDistValidation.println(esnode-key.pem is found existed) - rpmOpenSearchDistValidation.println(kirk.pem is found existed) - rpmOpenSearchDistValidation.println(esnode.pem is found existed) - rpmOpenSearchDistValidation.println(kirk-key.pem is found existed) - rpmOpenSearchDistValidation.println(root-ca.pem is found existed) - rpmOpenSearchDistValidation.sh([[ -f /var/log/opensearch/install_demo_configuration.log ]] && echo "install_demo_configuration.log exists" || (echo "install_demo_configuration.log does not exist" && exit 1)) - rpmOpenSearchDistValidation.sh({script=cat /var/log/opensearch/install_demo_configuration.log, returnStdout=true}) - rpmOpenSearchDistValidation.systemdCommands({command=start, product=opensearch}) - systemdCommands.sh(systemctl start opensearch) - rpmOpenSearchDistValidation.systemdCommands({command=status, product=opensearch}) - systemdCommands.sh({script=systemctl status opensearch, returnStdout=true}) - rpmOpenSearchDistValidation.sh({script=curl -s "https://localhost:9200" -u admin:admin --insecure, returnStdout=true}) - rpmOpenSearchDistValidation.readJSON({text=['name':'dummy_desktop', 'cluster_name':'opensearch', 'status':'green', 'cluster_uuid':'uClFQNw6T_KCO2fmdP2jTA', 'version':['distribution':'opensearch', 'number':'1.3.1', 'build_type':'rpm', 'build_hash':'40481be2be0536a34588b1fad10eb6c289713803', 'build_date':'2022-03-28T18:33:36.499005Z', 'build_snapshot':false, 'lucene_version':'8.10.1', 'minimum_wire_compatibility_version':'6.8.0', 'minimum_index_compatibility_version':'6.0.0-beta1'], 'tagline':'The OpenSearch Project: https://opensearch.org/']}) - rpmOpenSearchDistValidation.sh({script=curl -s "https://localhost:9200/_cluster/health?pretty" -u admin:admin --insecure, returnStdout=true}) - rpmOpenSearchDistValidation.readJSON({text=['cluster_name':'opensearch', 'status':'green', 'timed_out':false, 'number_of_nodes':1, 'number_of_data_nodes':1, 'discovered_master':true, 'active_primary_shards':1, 'active_shards':1, 'relocating_shards':0, 'initializing_shards':0, 'unassigned_shards':0, 'delayed_unassigned_shards':0, 'number_of_pending_tasks':0, 'number_of_in_flight_fetch':0, 'task_max_waiting_in_queue_millis':0, 'active_shards_percent_as_number':100.0]}) - rpmOpenSearchDistValidation.sh({script=curl -s "https://localhost:9200/_cat/plugins" -u admin:admin --insecure, returnStdout=true}) - BundleManifest.getLocation(job-scheduler) - BundleManifest.getLocation(ml-commons) - BundleManifest.getLocation(alerting) - rpmOpenSearchDistValidation.systemdCommands({command=start, product=opensearch-performance-analyzer}) - systemdCommands.sh(systemctl start opensearch-performance-analyzer) - rpmOpenSearchDistValidation.echo(Sleep for few seconds before checking PA) - rpmOpenSearchDistValidation.systemdCommands({command=status, product=opensearch-performance-analyzer}) - systemdCommands.sh({script=systemctl status opensearch-performance-analyzer, returnStdout=true}) - rpmOpenSearchDistValidation.sh([[ -f /tmp/PerformanceAnalyzer.log ]] && echo "PerformanceAnalyzer.log exists" || (echo "PerformanceAnalyzer.log does not exist" && exit 1)) - rpmOpenSearchDistValidation.sh([[ -f /tmp/performance_analyzer_agent_stats.log ]] && echo "performance_analyzer_agent_stats.log exists" || (echo "performance_analyzer_agent_stats.log does not exist" && exit 1)) - rpmOpenSearchDistValidation.sh({script=curl -s localhost:9600/_plugins/_performanceanalyzer/metrics?metrics=CPU_Utilization\&agg=avg, returnStdout=true}) - rpmOpenSearchDistValidation.systemdCommands({command=stop, product=opensearch}) - systemdCommands.sh(systemctl stop opensearch) - rpmOpenSearchDistValidation.rpmCommands({command=remove, product=opensearch}) - rpmCommands.sh(yum remove -y opensearch) diff --git a/tests/jenkins/jobs/RunBwcTestScript_Jenkinsfile b/tests/jenkins/jobs/RunBwcTestScript_Jenkinsfile deleted file mode 100644 index 247819aaef..0000000000 --- a/tests/jenkins/jobs/RunBwcTestScript_Jenkinsfile +++ /dev/null @@ -1,25 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -pipeline { - agent none - stages { - stage('bwc-test') { - steps { - script { - runBwcTestScript( - jobName: 'dummy_job', - buildManifest: 'tests/jenkins/data/opensearch-1.3.0-build.yml', - testManifest: 'tests/jenkins/data/opensearch-1.3.0-test.yml', - buildId: '717' - ) - } - } - } - } -} \ No newline at end of file diff --git a/tests/jenkins/jobs/RunBwcTestScript_Jenkinsfile.txt b/tests/jenkins/jobs/RunBwcTestScript_Jenkinsfile.txt deleted file mode 100644 index 3bde3dcefe..0000000000 --- a/tests/jenkins/jobs/RunBwcTestScript_Jenkinsfile.txt +++ /dev/null @@ -1,14 +0,0 @@ - RunBwcTestScript_Jenkinsfile.run() - RunBwcTestScript_Jenkinsfile.pipeline(groovy.lang.Closure) - RunBwcTestScript_Jenkinsfile.echo(Executing on agent [label:none]) - RunBwcTestScript_Jenkinsfile.stage(bwc-test, groovy.lang.Closure) - RunBwcTestScript_Jenkinsfile.script(groovy.lang.Closure) - RunBwcTestScript_Jenkinsfile.runBwcTestScript({jobName=dummy_job, buildManifest=tests/jenkins/data/opensearch-1.3.0-build.yml, testManifest=tests/jenkins/data/opensearch-1.3.0-test.yml, buildId=717}) - runBwcTestScript.legacySCM(groovy.lang.Closure) - runBwcTestScript.library({identifier=jenkins@20211123, retriever=null}) - runBwcTestScript.readYaml({file=tests/jenkins/data/opensearch-1.3.0-build.yml}) - BuildManifest.asBoolean() - BuildManifest.getArtifactRootUrl(dummy_job, 717) - runBwcTestScript.echo(Artifact root URL: https://ci.opensearch.org/ci/dbc/dummy_job/1.3.0/717/linux/x64/tar) - runBwcTestScript.echo(Paths: opensearch=https://ci.opensearch.org/ci/dbc/dummy_job/1.3.0/717/linux/x64/tar) - runBwcTestScript.sh(./test.sh bwc-test tests/jenkins/data/opensearch-1.3.0-test.yml --test-run-id null --paths opensearch=https://ci.opensearch.org/ci/dbc/dummy_job/1.3.0/717/linux/x64/tar) diff --git a/tests/jenkins/jobs/RunBwcTestScript_OpenSearch_Dashboards_Jenkinsfile b/tests/jenkins/jobs/RunBwcTestScript_OpenSearch_Dashboards_Jenkinsfile deleted file mode 100644 index 6990c3cb1d..0000000000 --- a/tests/jenkins/jobs/RunBwcTestScript_OpenSearch_Dashboards_Jenkinsfile +++ /dev/null @@ -1,25 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -pipeline { - agent none - stages { - stage('bwc-test') { - steps { - script { - runBwcTestScript( - jobName: 'dummy_job', - buildManifest: 'tests/jenkins/data/opensearch-dashboards-1.2.0-build.yml', - testManifest: 'tests/jenkins/data/opensearch-dashboards-1.2.0-test.yml', - buildId: '215' - ) - } - } - } - } -} \ No newline at end of file diff --git a/tests/jenkins/jobs/RunBwcTestScript_OpenSearch_Dashboards_Jenkinsfile.txt b/tests/jenkins/jobs/RunBwcTestScript_OpenSearch_Dashboards_Jenkinsfile.txt deleted file mode 100644 index 2a1f2a9923..0000000000 --- a/tests/jenkins/jobs/RunBwcTestScript_OpenSearch_Dashboards_Jenkinsfile.txt +++ /dev/null @@ -1,14 +0,0 @@ - RunBwcTestScript_OpenSearch_Dashboards_Jenkinsfile.run() - RunBwcTestScript_OpenSearch_Dashboards_Jenkinsfile.pipeline(groovy.lang.Closure) - RunBwcTestScript_OpenSearch_Dashboards_Jenkinsfile.echo(Executing on agent [label:none]) - RunBwcTestScript_OpenSearch_Dashboards_Jenkinsfile.stage(bwc-test, groovy.lang.Closure) - RunBwcTestScript_OpenSearch_Dashboards_Jenkinsfile.script(groovy.lang.Closure) - RunBwcTestScript_OpenSearch_Dashboards_Jenkinsfile.runBwcTestScript({jobName=dummy_job, buildManifest=tests/jenkins/data/opensearch-dashboards-1.2.0-build.yml, testManifest=tests/jenkins/data/opensearch-dashboards-1.2.0-test.yml, buildId=215}) - runBwcTestScript.legacySCM(groovy.lang.Closure) - runBwcTestScript.library({identifier=jenkins@20211123, retriever=null}) - runBwcTestScript.readYaml({file=tests/jenkins/data/opensearch-dashboards-1.2.0-build.yml}) - BuildManifest.asBoolean() - BuildManifest.getArtifactRootUrl(dummy_job, 215) - runBwcTestScript.echo(Artifact root URL: https://ci.opensearch.org/ci/dbc/dummy_job/1.2.0/215/linux/x64/tar) - runBwcTestScript.echo(Paths: opensearch-dashboards=https://ci.opensearch.org/ci/dbc/dummy_job/1.2.0/215/linux/x64/tar) - runBwcTestScript.sh(./test.sh bwc-test tests/jenkins/data/opensearch-dashboards-1.2.0-test.yml --test-run-id null --paths opensearch-dashboards=https://ci.opensearch.org/ci/dbc/dummy_job/1.2.0/215/linux/x64/tar) diff --git a/tests/jenkins/jobs/RunGradleCheck_Jenkinsfile b/tests/jenkins/jobs/RunGradleCheck_Jenkinsfile deleted file mode 100644 index de21859693..0000000000 --- a/tests/jenkins/jobs/RunGradleCheck_Jenkinsfile +++ /dev/null @@ -1,23 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -pipeline { - agent none - stages { - stage('gradle-check') { - steps { - script { - runGradleCheck( - gitRepoUrl: "https://github.com/opensearch-project/OpenSearch", - gitReference: "main" - ) - } - } - } - } -} diff --git a/tests/jenkins/jobs/RunGradleCheck_Jenkinsfile.txt b/tests/jenkins/jobs/RunGradleCheck_Jenkinsfile.txt deleted file mode 100644 index 83581db9b5..0000000000 --- a/tests/jenkins/jobs/RunGradleCheck_Jenkinsfile.txt +++ /dev/null @@ -1,65 +0,0 @@ - RunGradleCheck_Jenkinsfile.run() - RunGradleCheck_Jenkinsfile.pipeline(groovy.lang.Closure) - RunGradleCheck_Jenkinsfile.echo(Executing on agent [label:none]) - RunGradleCheck_Jenkinsfile.stage(gradle-check, groovy.lang.Closure) - RunGradleCheck_Jenkinsfile.script(groovy.lang.Closure) - RunGradleCheck_Jenkinsfile.runGradleCheck({gitRepoUrl=https://github.com/opensearch-project/OpenSearch, gitReference=main}) - runGradleCheck.legacySCM(groovy.lang.Closure) - runGradleCheck.library({identifier=jenkins@20211123, retriever=null}) - runGradleCheck.usernamePassword({credentialsId=jenkins-gradle-check-s3-aws-credentials, usernameVariable=amazon_s3_access_key, passwordVariable=amazon_s3_secret_key}) - runGradleCheck.usernamePassword({credentialsId=jenkins-gradle-check-s3-aws-resources, usernameVariable=amazon_s3_base_path, passwordVariable=amazon_s3_bucket}) - runGradleCheck.withCredentials([[amazon_s3_access_key, amazon_s3_secret_key], [amazon_s3_base_path, amazon_s3_bucket]], groovy.lang.Closure) - runGradleCheck.sh( - #!/bin/bash - - set -e - set +x - - echo "Git clone: https://github.com/opensearch-project/OpenSearch with ref: main" - rm -rf search - git clone https://github.com/opensearch-project/OpenSearch search - cd search/ - git checkout -f main - git rev-parse HEAD - - echo "Get Major Version" - OS_VERSION=`cat buildSrc/version.properties | grep opensearch | cut -d= -f2 | grep -oE '[0-9.]+'` - JDK_MAJOR_VERSION=`cat buildSrc/version.properties | grep "bundled_jdk" | cut -d= -f2 | grep -oE '[0-9]+' | head -n 1` - OS_MAJOR_VERSION=`echo $OS_VERSION | grep -oE '[0-9]+' | head -n 1` - echo "Version: $OS_VERSION, Major Version: $OS_MAJOR_VERSION" - - echo "Using JAVA $JDK_MAJOR_VERSION" - eval export JAVA_HOME='$JAVA'$JDK_MAJOR_VERSION'_HOME' - - env | grep JAVA | grep HOME - - echo "Gradle clean cache and stop existing gradledaemon" - ./gradlew --stop - rm -rf ~/.gradle - - echo "Check existing dockercontainer" - docker ps -a - docker stop `docker ps -qa` > /dev/null 2>&1 || echo - docker rm `docker ps -qa` > /dev/null 2>&1 || echo - echo "Stop existing dockercontainer" - docker ps -a - - echo "Check docker-compose version" - docker-compose version - - echo "Check existing processes" - ps -ef | grep [o]pensearch | wc -l - echo "Cleanup existing processes" - kill -9 `ps -ef | grep [o]pensearch | awk '{print $2}'` > /dev/null 2>&1 || echo - ps -ef | grep [o]pensearch | wc -l - - echo "Start gradlecheck" - GRADLE_CHECK_STATUS=0 - ./gradlew clean && ./gradlew check -Dtests.coverage=true --no-daemon --no-scan || GRADLE_CHECK_STATUS=1 - - if [ "$GRADLE_CHECK_STATUS" != 0 ]; then - echo Gradle Check Failed! - exit 1 - fi - - ) diff --git a/tests/jenkins/jobs/RunIntegTestScript_Jenkinsfile b/tests/jenkins/jobs/RunIntegTestScript_Jenkinsfile deleted file mode 100644 index 8eb35320f6..0000000000 --- a/tests/jenkins/jobs/RunIntegTestScript_Jenkinsfile +++ /dev/null @@ -1,25 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -pipeline { - agent none - stages { - stage('integ-test') { - steps { - script { - runIntegTestScript( - jobName: 'dummy_job', - componentName: 'OpenSearch', - buildManifest: 'tests/jenkins/data/opensearch-1.3.0-build.yml', - testManifest: 'tests/jenkins/data/opensearch-1.3.0-test.yml', - ) - } - } - } - } -} diff --git a/tests/jenkins/jobs/RunIntegTestScript_Jenkinsfile.txt b/tests/jenkins/jobs/RunIntegTestScript_Jenkinsfile.txt deleted file mode 100644 index 5858cf70d7..0000000000 --- a/tests/jenkins/jobs/RunIntegTestScript_Jenkinsfile.txt +++ /dev/null @@ -1,17 +0,0 @@ - RunIntegTestScript_Jenkinsfile.run() - RunIntegTestScript_Jenkinsfile.pipeline(groovy.lang.Closure) - RunIntegTestScript_Jenkinsfile.echo(Executing on agent [label:none]) - RunIntegTestScript_Jenkinsfile.stage(integ-test, groovy.lang.Closure) - RunIntegTestScript_Jenkinsfile.script(groovy.lang.Closure) - RunIntegTestScript_Jenkinsfile.runIntegTestScript({jobName=dummy_job, componentName=OpenSearch, buildManifest=tests/jenkins/data/opensearch-1.3.0-build.yml, testManifest=tests/jenkins/data/opensearch-1.3.0-test.yml}) - runIntegTestScript.legacySCM(groovy.lang.Closure) - runIntegTestScript.library({identifier=jenkins@20211123, retriever=null}) - runIntegTestScript.readYaml({file=tests/jenkins/data/opensearch-1.3.0-build.yml}) - BuildManifest.asBoolean() - runIntegTestScript.echo(Build Id: 717) - BuildManifest.getArtifactRootUrl(dummy_job, 717) - runIntegTestScript.echo(Artifact root URL: https://ci.opensearch.org/ci/dbc/dummy_job/1.3.0/717/linux/x64/tar) - runIntegTestScript.echo(No localPath found, download from url) - runIntegTestScript.echo(Paths: opensearch=https://ci.opensearch.org/ci/dbc/dummy_job/1.3.0/717/linux/x64/tar) - runIntegTestScript.echo(Component: OpenSearch) - runIntegTestScript.sh(./test.sh integ-test tests/jenkins/data/opensearch-1.3.0-test.yml --component OpenSearch --test-run-id null --paths opensearch=https://ci.opensearch.org/ci/dbc/dummy_job/1.3.0/717/linux/x64/tar) diff --git a/tests/jenkins/jobs/RunIntegTestScript_LocalPath_Jenkinsfile b/tests/jenkins/jobs/RunIntegTestScript_LocalPath_Jenkinsfile deleted file mode 100644 index 5fc16d5ba2..0000000000 --- a/tests/jenkins/jobs/RunIntegTestScript_LocalPath_Jenkinsfile +++ /dev/null @@ -1,26 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -pipeline { - agent none - stages { - stage('integ-test') { - steps { - script { - runIntegTestScript( - jobName: 'dummy_job', - componentName: 'OpenSearch', - buildManifest: 'tests/jenkins/data/opensearch-1.3.0-build.yml', - testManifest: 'tests/jenkins/data/opensearch-1.3.0-test.yml', - localPath: 'tests/jenkins/artifacts/tar', - ) - } - } - } - } -} diff --git a/tests/jenkins/jobs/RunIntegTestScript_LocalPath_Jenkinsfile.txt b/tests/jenkins/jobs/RunIntegTestScript_LocalPath_Jenkinsfile.txt deleted file mode 100644 index 267a47b866..0000000000 --- a/tests/jenkins/jobs/RunIntegTestScript_LocalPath_Jenkinsfile.txt +++ /dev/null @@ -1,17 +0,0 @@ - RunIntegTestScript_LocalPath_Jenkinsfile.run() - RunIntegTestScript_LocalPath_Jenkinsfile.pipeline(groovy.lang.Closure) - RunIntegTestScript_LocalPath_Jenkinsfile.echo(Executing on agent [label:none]) - RunIntegTestScript_LocalPath_Jenkinsfile.stage(integ-test, groovy.lang.Closure) - RunIntegTestScript_LocalPath_Jenkinsfile.script(groovy.lang.Closure) - RunIntegTestScript_LocalPath_Jenkinsfile.runIntegTestScript({jobName=dummy_job, componentName=OpenSearch, buildManifest=tests/jenkins/data/opensearch-1.3.0-build.yml, testManifest=tests/jenkins/data/opensearch-1.3.0-test.yml, localPath=tests/jenkins/artifacts/tar}) - runIntegTestScript.legacySCM(groovy.lang.Closure) - runIntegTestScript.library({identifier=jenkins@20211123, retriever=null}) - runIntegTestScript.readYaml({file=tests/jenkins/data/opensearch-1.3.0-build.yml}) - BuildManifest.asBoolean() - runIntegTestScript.echo(Build Id: 717) - BuildManifest.getArtifactRootUrl(dummy_job, 717) - runIntegTestScript.echo(Artifact root URL: https://ci.opensearch.org/ci/dbc/dummy_job/1.3.0/717/linux/x64/tar) - runIntegTestScript.echo(User provides localPath, use local artifacts: tests/jenkins/artifacts/tar) - runIntegTestScript.echo(Paths: opensearch=tests/jenkins/artifacts/tar) - runIntegTestScript.echo(Component: OpenSearch) - runIntegTestScript.sh(./test.sh integ-test tests/jenkins/data/opensearch-1.3.0-test.yml --component OpenSearch --test-run-id null --paths opensearch=tests/jenkins/artifacts/tar) diff --git a/tests/jenkins/jobs/RunIntegTestScript_OpenSearch_Dashboards_Jenkinsfile b/tests/jenkins/jobs/RunIntegTestScript_OpenSearch_Dashboards_Jenkinsfile deleted file mode 100644 index f69afe5891..0000000000 --- a/tests/jenkins/jobs/RunIntegTestScript_OpenSearch_Dashboards_Jenkinsfile +++ /dev/null @@ -1,25 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -pipeline { - agent none - stages { - stage('integ-test') { - steps { - script { - runIntegTestScript( - jobName: 'dummy_job', - componentName: 'functionalTestDashboards', - buildManifest: 'tests/jenkins/data/opensearch-dashboards-1.2.0-build.yml', - testManifest: 'tests/jenkins/data/opensearch-dashboards-1.2.0-test.yml' - ) - } - } - } - } -} diff --git a/tests/jenkins/jobs/RunIntegTestScript_OpenSearch_Dashboards_Jenkinsfile.txt b/tests/jenkins/jobs/RunIntegTestScript_OpenSearch_Dashboards_Jenkinsfile.txt deleted file mode 100644 index c7207f85de..0000000000 --- a/tests/jenkins/jobs/RunIntegTestScript_OpenSearch_Dashboards_Jenkinsfile.txt +++ /dev/null @@ -1,17 +0,0 @@ - RunIntegTestScript_OpenSearch_Dashboards_Jenkinsfile.run() - RunIntegTestScript_OpenSearch_Dashboards_Jenkinsfile.pipeline(groovy.lang.Closure) - RunIntegTestScript_OpenSearch_Dashboards_Jenkinsfile.echo(Executing on agent [label:none]) - RunIntegTestScript_OpenSearch_Dashboards_Jenkinsfile.stage(integ-test, groovy.lang.Closure) - RunIntegTestScript_OpenSearch_Dashboards_Jenkinsfile.script(groovy.lang.Closure) - RunIntegTestScript_OpenSearch_Dashboards_Jenkinsfile.runIntegTestScript({jobName=dummy_job, componentName=functionalTestDashboards, buildManifest=tests/jenkins/data/opensearch-dashboards-1.2.0-build.yml, testManifest=tests/jenkins/data/opensearch-dashboards-1.2.0-test.yml}) - runIntegTestScript.legacySCM(groovy.lang.Closure) - runIntegTestScript.library({identifier=jenkins@20211123, retriever=null}) - runIntegTestScript.readYaml({file=tests/jenkins/data/opensearch-dashboards-1.2.0-build.yml}) - BuildManifest.asBoolean() - runIntegTestScript.echo(Build Id: 215) - BuildManifest.getArtifactRootUrl(dummy_job, 215) - runIntegTestScript.echo(Artifact root URL: https://ci.opensearch.org/ci/dbc/dummy_job/1.2.0/215/linux/x64/tar) - runIntegTestScript.echo(No localPath found, download from url) - runIntegTestScript.echo(Paths: opensearch=https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/1.2.0/latest/linux/x64/tar opensearch-dashboards=https://ci.opensearch.org/ci/dbc/dummy_job/1.2.0/215/linux/x64/tar) - runIntegTestScript.echo(Component: functionalTestDashboards) - runIntegTestScript.sh(./test.sh integ-test tests/jenkins/data/opensearch-dashboards-1.2.0-test.yml --component functionalTestDashboards --test-run-id null --paths opensearch=https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/1.2.0/latest/linux/x64/tar opensearch-dashboards=https://ci.opensearch.org/ci/dbc/dummy_job/1.2.0/215/linux/x64/tar) diff --git a/tests/jenkins/jobs/ScanDockerImage_Jenkinsfile b/tests/jenkins/jobs/ScanDockerImage_Jenkinsfile deleted file mode 100644 index a3e095b772..0000000000 --- a/tests/jenkins/jobs/ScanDockerImage_Jenkinsfile +++ /dev/null @@ -1,23 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -pipeline { - agent none - stages { - stage('scan docker image') { - steps { - script { - scanDockerImage( - imageFullName: "opensearchstaging/opensearch:2.0.0", - imageResultFile: "scan_docker_image" - ) - } - } - } - } -} diff --git a/tests/jenkins/jobs/ScanDockerImage_Jenkinsfile.txt b/tests/jenkins/jobs/ScanDockerImage_Jenkinsfile.txt deleted file mode 100644 index 867b979c0b..0000000000 --- a/tests/jenkins/jobs/ScanDockerImage_Jenkinsfile.txt +++ /dev/null @@ -1,12 +0,0 @@ - ScanDockerImage_Jenkinsfile.run() - ScanDockerImage_Jenkinsfile.pipeline(groovy.lang.Closure) - ScanDockerImage_Jenkinsfile.echo(Executing on agent [label:none]) - ScanDockerImage_Jenkinsfile.stage(scan docker image, groovy.lang.Closure) - ScanDockerImage_Jenkinsfile.script(groovy.lang.Closure) - ScanDockerImage_Jenkinsfile.scanDockerImage({imageFullName=opensearchstaging/opensearch:2.0.0, imageResultFile=scan_docker_image}) - scanDockerImage.sh( - touch scan_docker_image.txt scan_docker_image.json - trivy image --clear-cache - trivy image --format table --output scan_docker_image.txt opensearchstaging/opensearch:2.0.0 - trivy image --format json --output scan_docker_image.json opensearchstaging/opensearch:2.0.0 - ) diff --git a/tests/jenkins/jobs/SignArtifacts_Jenkinsfile b/tests/jenkins/jobs/SignArtifacts_Jenkinsfile deleted file mode 100644 index d340e4269c..0000000000 --- a/tests/jenkins/jobs/SignArtifacts_Jenkinsfile +++ /dev/null @@ -1,28 +0,0 @@ -pipeline { - agent none - stages { - stage('sign') { - steps { - script { - signArtifacts( - artifactPath: "${WORKSPACE}/artifacts", - sigtype: '.sig', - platform: 'linux' - ) - - signArtifacts( - artifactPath: "${WORKSPACE}/artifacts", - sigtype: '.rpm', - platform: 'linux' - ) - - signArtifacts( - artifactPath: "${WORKSPACE}/file.yml", - platform: 'linux', - type: 'maven' - ) - } - } - } - } -} diff --git a/tests/jenkins/jobs/SignArtifacts_Jenkinsfile.txt b/tests/jenkins/jobs/SignArtifacts_Jenkinsfile.txt deleted file mode 100644 index 6ef8ada6f2..0000000000 --- a/tests/jenkins/jobs/SignArtifacts_Jenkinsfile.txt +++ /dev/null @@ -1,127 +0,0 @@ - SignArtifacts_Jenkinsfile.run() - SignArtifacts_Jenkinsfile.pipeline(groovy.lang.Closure) - SignArtifacts_Jenkinsfile.echo(Executing on agent [label:none]) - SignArtifacts_Jenkinsfile.stage(sign, groovy.lang.Closure) - SignArtifacts_Jenkinsfile.script(groovy.lang.Closure) - SignArtifacts_Jenkinsfile.signArtifacts({artifactPath=/tmp/workspace/artifacts, sigtype=.sig, platform=linux}) - signArtifacts.echo(PGP or Windows Signature Signing) - signArtifacts.fileExists(/tmp/workspace/sign.sh) - signArtifacts.git({url=https://github.com/opensearch-project/opensearch-build.git, branch=main}) - signArtifacts.sh(curl -sSL https://artifacts.opensearch.org/publickeys/opensearch.pgp | gpg --import -) - signArtifacts.usernamePassword({credentialsId=github_bot_token_name, usernameVariable=GITHUB_USER, passwordVariable=GITHUB_TOKEN}) - signArtifacts.string({credentialsId=jenkins-signer-client-role, variable=SIGNER_CLIENT_ROLE}) - signArtifacts.string({credentialsId=jenkins-signer-client-external-id, variable=SIGNER_CLIENT_EXTERNAL_ID}) - signArtifacts.string({credentialsId=jenkins-signer-client-unsigned-bucket, variable=SIGNER_CLIENT_UNSIGNED_BUCKET}) - signArtifacts.string({credentialsId=jenkins-signer-client-signed-bucket, variable=SIGNER_CLIENT_SIGNED_BUCKET}) - signArtifacts.withCredentials([[GITHUB_USER, GITHUB_TOKEN], SIGNER_CLIENT_ROLE, SIGNER_CLIENT_EXTERNAL_ID, SIGNER_CLIENT_UNSIGNED_BUCKET, SIGNER_CLIENT_SIGNED_BUCKET], groovy.lang.Closure) - signArtifacts.sh( - #!/bin/bash - set +x - export ROLE=SIGNER_CLIENT_ROLE - export EXTERNAL_ID=SIGNER_CLIENT_EXTERNAL_ID - export UNSIGNED_BUCKET=SIGNER_CLIENT_UNSIGNED_BUCKET - export SIGNED_BUCKET=SIGNER_CLIENT_SIGNED_BUCKET - - /tmp/workspace/sign.sh /tmp/workspace/artifacts --sigtype=.sig --platform=linux - ) - SignArtifacts_Jenkinsfile.signArtifacts({artifactPath=/tmp/workspace/artifacts, sigtype=.rpm, platform=linux}) - signArtifacts.string({credentialsId=jenkins-rpm-signing-account-number, variable=RPM_SIGNING_ACCOUNT_NUMBER}) - signArtifacts.string({credentialsId=jenkins-rpm-signing-passphrase-secrets-arn, variable=RPM_SIGNING_PASSPHRASE_SECRETS_ARN}) - signArtifacts.string({credentialsId=jenkins-rpm-signing-secret-key-secrets-arn, variable=RPM_SIGNING_SECRET_KEY_ID_SECRETS_ARN}) - signArtifacts.string({credentialsId=jenkins-rpm-signing-key-id, variable=RPM_SIGNING_KEY_ID}) - signArtifacts.withCredentials([RPM_SIGNING_ACCOUNT_NUMBER, RPM_SIGNING_PASSPHRASE_SECRETS_ARN, RPM_SIGNING_SECRET_KEY_ID_SECRETS_ARN, RPM_SIGNING_KEY_ID], groovy.lang.Closure) - signArtifacts.echo(RPM Add Sign) - signArtifacts.withAWS({role=jenkins-prod-rpm-signing-assume-role, roleAccount=RPM_SIGNING_ACCOUNT_NUMBER, duration=900, roleSessionName=jenkins-signing-session}, groovy.lang.Closure) - signArtifacts.sh( - set -e - set +x - - ARTIFACT_PATH="/tmp/workspace/artifacts" - - echo "------------------------------------------------------------------------" - echo "Check Utility Versions" - gpg_version_requirement="2.2.0" - rpm_version_requirement="4.13.0" # https://bugzilla.redhat.com/show_bug.cgi?id=227632 - - gpg_version_check=`gpg --version | head -n 1 | grep -oE '[0-9.]+'` - gpg_version_check_final=`echo $gpg_version_check $gpg_version_requirement | tr ' ' ' -' | sort -V | head -n 1` - rpm_version_check=`rpm --version | head -n 1 | grep -oE '[0-9.]+'` - rpm_version_check_final=`echo $rpm_version_check $rpm_version_requirement | tr ' ' ' -' | sort -V | head -n 1` - - echo -e "gpg_version_requirement gpg_version_check" - echo -e "$gpg_version_requirement $gpg_version_check" - echo -e "rpm_version_requirement rpm_version_check" - echo -e "$rpm_version_requirement $rpm_version_check" - - if [[ $gpg_version_requirement = $gpg_version_check_final ]] && [[ $rpm_version_requirement = $rpm_version_check_final ]]; then - echo "Utility version is equal or greater than set limit, continue." - else - echo "Utility version is lower than set limit, exit 1" - exit 1 - fi - - export GPG_TTY=`tty` - - echo "------------------------------------------------------------------------" - echo "Setup RPM Macros" - cp -v scripts/pkg/sign_templates/rpmmacros ~/.rpmmacros - sed -i "s/##key_name##/OpenSearch project/g;s/##passphrase_name##/passphrase/g" ~/.rpmmacros - - echo "------------------------------------------------------------------------" - echo "Import OpenSearch keys" - aws secretsmanager get-secret-value --region us-west-2 --secret-id "RPM_SIGNING_PASSPHRASE_SECRETS_ARN" | jq -r .SecretBinary | base64 --decode > passphrase - aws secretsmanager get-secret-value --region us-west-2 --secret-id "RPM_SIGNING_SECRET_KEY_ID_SECRETS_ARN" | jq -r .SecretBinary | base64 --decode | gpg --quiet --import --pinentry-mode loopback --passphrase-file passphrase - - - echo "------------------------------------------------------------------------" - echo "Start Signing Rpm" - - if file $ARTIFACT_PATH | grep -q directory; then - - echo "Sign directory" - for rpm_file in `ls $ARTIFACT_PATH`; do - if file $ARTIFACT_PATH/$rpm_file | grep -q RPM; then - rpm --addsign $ARTIFACT_PATH/$rpm_file - rpm -qip $ARTIFACT_PATH/$rpm_file | grep Signature - fi - done - - elif file $ARTIFACT_PATH | grep -q RPM; then - echo "Sign single rpm" - rpm --addsign $ARTIFACT_PATH - rpm -qip $ARTIFACT_PATH | grep Signature - - else - echo "This is neither a directory nor a RPM pkg, exit 1" - exit 1 - fi - - echo "------------------------------------------------------------------------" - echo "Clean up gpg" - gpg --batch --yes --delete-secret-keys RPM_SIGNING_KEY_ID - gpg --batch --yes --delete-keys RPM_SIGNING_KEY_ID - rm -v passphrase - - ) - SignArtifacts_Jenkinsfile.signArtifacts({artifactPath=/tmp/workspace/file.yml, platform=linux, type=maven}) - signArtifacts.echo(PGP or Windows Signature Signing) - signArtifacts.fileExists(/tmp/workspace/sign.sh) - signArtifacts.git({url=https://github.com/opensearch-project/opensearch-build.git, branch=main}) - signArtifacts.sh(curl -sSL https://artifacts.opensearch.org/publickeys/opensearch.pgp | gpg --import -) - signArtifacts.usernamePassword({credentialsId=github_bot_token_name, usernameVariable=GITHUB_USER, passwordVariable=GITHUB_TOKEN}) - signArtifacts.string({credentialsId=jenkins-signer-client-role, variable=SIGNER_CLIENT_ROLE}) - signArtifacts.string({credentialsId=jenkins-signer-client-external-id, variable=SIGNER_CLIENT_EXTERNAL_ID}) - signArtifacts.string({credentialsId=jenkins-signer-client-unsigned-bucket, variable=SIGNER_CLIENT_UNSIGNED_BUCKET}) - signArtifacts.string({credentialsId=jenkins-signer-client-signed-bucket, variable=SIGNER_CLIENT_SIGNED_BUCKET}) - signArtifacts.withCredentials([[GITHUB_USER, GITHUB_TOKEN], SIGNER_CLIENT_ROLE, SIGNER_CLIENT_EXTERNAL_ID, SIGNER_CLIENT_UNSIGNED_BUCKET, SIGNER_CLIENT_SIGNED_BUCKET], groovy.lang.Closure) - signArtifacts.sh( - #!/bin/bash - set +x - export ROLE=SIGNER_CLIENT_ROLE - export EXTERNAL_ID=SIGNER_CLIENT_EXTERNAL_ID - export UNSIGNED_BUCKET=SIGNER_CLIENT_UNSIGNED_BUCKET - export SIGNED_BUCKET=SIGNER_CLIENT_SIGNED_BUCKET - - /tmp/workspace/sign.sh /tmp/workspace/file.yml --platform=linux --type=maven - ) diff --git a/tests/jenkins/jobs/UploadIndexFile_Jenkinsfile b/tests/jenkins/jobs/UploadIndexFile_Jenkinsfile deleted file mode 100644 index 076f17ef7d..0000000000 --- a/tests/jenkins/jobs/UploadIndexFile_Jenkinsfile +++ /dev/null @@ -1,19 +0,0 @@ -lib = library(identifier: 'jenkins@1.0.0', retriever: modernSCM([ - $class: 'GitSCMSource', - remote: 'https://github.com/opensearch-project/opensearch-build-libraries.git', -])) - -pipeline { - agent none - stages { - stage('uploadIndexFile') { - steps { - script { - uploadIndexFile( - indexFilePath: 'test' - ) - } - } - } - } -} \ No newline at end of file diff --git a/tests/jenkins/jobs/UploadIndexFile_Jenkinsfile.txt b/tests/jenkins/jobs/UploadIndexFile_Jenkinsfile.txt deleted file mode 100644 index 8bb19af8d3..0000000000 --- a/tests/jenkins/jobs/UploadIndexFile_Jenkinsfile.txt +++ /dev/null @@ -1,17 +0,0 @@ - UploadIndexFile_Jenkinsfile.run() - UploadIndexFile_Jenkinsfile.modernSCM({$class=GitSCMSource, remote=https://github.com/opensearch-project/opensearch-build-libraries.git}) - UploadIndexFile_Jenkinsfile.library({identifier=jenkins@1.0.0, retriever=null}) - UploadIndexFile_Jenkinsfile.pipeline(groovy.lang.Closure) - UploadIndexFile_Jenkinsfile.echo(Executing on agent [label:none]) - UploadIndexFile_Jenkinsfile.stage(uploadIndexFile, groovy.lang.Closure) - UploadIndexFile_Jenkinsfile.script(groovy.lang.Closure) - UploadIndexFile_Jenkinsfile.uploadIndexFile({indexFilePath=test}) - uploadIndexFile.writeJSON({file=index.json, json={latest=123}}) - uploadIndexFile.string({credentialsId=jenkins-artifact-bucket-name, variable=ARTIFACT_BUCKET_NAME}) - uploadIndexFile.withCredentials([ARTIFACT_BUCKET_NAME], groovy.lang.Closure) - uploadIndexFile.echo(Uploading index.json to s3://ARTIFACT_BUCKET_NAME/test) - uploadIndexFile.uploadToS3({sourcePath=index.json, bucket=ARTIFACT_BUCKET_NAME, path=test/index.json}) - uploadToS3.string({credentialsId=jenkins-aws-account-public, variable=AWS_ACCOUNT_PUBLIC}) - uploadToS3.withCredentials([AWS_ACCOUNT_PUBLIC], groovy.lang.Closure) - uploadToS3.withAWS({role=opensearch-bundle, roleAccount=AWS_ACCOUNT_PUBLIC, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure) - uploadToS3.s3Upload({file=index.json, bucket=ARTIFACT_BUCKET_NAME, path=test/index.json}) diff --git a/tests/jenkins/jobs/UploadTestResults_Jenkinsfile b/tests/jenkins/jobs/UploadTestResults_Jenkinsfile deleted file mode 100644 index 26886baf15..0000000000 --- a/tests/jenkins/jobs/UploadTestResults_Jenkinsfile +++ /dev/null @@ -1,15 +0,0 @@ -pipeline { - agent none - stages { - stage('sign') { - steps { - script { - uploadTestResults( - buildManifestFileName: 'tests/jenkins/data/opensearch-1.3.0-build.yml', - jobName: 'dummy_job' - ) - } - } - } - } -} diff --git a/tests/jenkins/jobs/UploadTestResults_Jenkinsfile.txt b/tests/jenkins/jobs/UploadTestResults_Jenkinsfile.txt deleted file mode 100644 index c670350071..0000000000 --- a/tests/jenkins/jobs/UploadTestResults_Jenkinsfile.txt +++ /dev/null @@ -1,23 +0,0 @@ - UploadTestResults_Jenkinsfile.run() - UploadTestResults_Jenkinsfile.pipeline(groovy.lang.Closure) - UploadTestResults_Jenkinsfile.echo(Executing on agent [label:none]) - UploadTestResults_Jenkinsfile.stage(sign, groovy.lang.Closure) - UploadTestResults_Jenkinsfile.script(groovy.lang.Closure) - UploadTestResults_Jenkinsfile.uploadTestResults({buildManifestFileName=tests/jenkins/data/opensearch-1.3.0-build.yml, jobName=dummy_job}) - uploadTestResults.legacySCM(groovy.lang.Closure) - uploadTestResults.library({identifier=jenkins@20211123, retriever=null}) - uploadTestResults.readYaml({file=tests/jenkins/data/opensearch-1.3.0-build.yml}) - BuildManifest.asBoolean() - uploadTestResults.echo(Build Id: 717) - BuildManifest.getArtifactRoot(dummy_job, 717) - uploadTestResults.string({credentialsId=jenkins-artifact-bucket-name, variable=ARTIFACT_BUCKET_NAME}) - uploadTestResults.string({credentialsId=jenkins-aws-account-public, variable=AWS_ACCOUNT_PUBLIC}) - uploadTestResults.withCredentials([ARTIFACT_BUCKET_NAME, AWS_ACCOUNT_PUBLIC], groovy.lang.Closure) - uploadTestResults.echo(Uploading to s3://ARTIFACT_BUCKET_NAME/dummy_job/1.3.0/717/linux/x64/tar) - uploadTestResults.withAWS({role=opensearch-test, roleAccount=AWS_ACCOUNT_PUBLIC, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure) - uploadTestResults.s3Upload({file=test-results, bucket=ARTIFACT_BUCKET_NAME, path=dummy_job/1.3.0/717/linux/x64/tar/test-results}) - BuildManifest.getArtifactRootUrl(DUMMY_PUBLIC_ARTIFACT_URL, dummy_job) - Messages.asBoolean() - Messages.add(DUMMY_STAGE_NAME, https://ci.opensearch.org/ci/dbc/DUMMY_PUBLIC_ARTIFACT_URL/1.3.0/dummy_job/linux/x64/tar/test-results/) - uploadTestResults.writeFile({file=messages/DUMMY_STAGE_NAME.msg, text=https://ci.opensearch.org/ci/dbc/DUMMY_PUBLIC_ARTIFACT_URL/1.3.0/dummy_job/linux/x64/tar/test-results/}) - uploadTestResults.stash({includes=messages/*, name=messages-DUMMY_STAGE_NAME}) diff --git a/tests/jenkins/jobs/UploadToS3_Jenkinsfile b/tests/jenkins/jobs/UploadToS3_Jenkinsfile deleted file mode 100644 index 986dd42c94..0000000000 --- a/tests/jenkins/jobs/UploadToS3_Jenkinsfile +++ /dev/null @@ -1,16 +0,0 @@ -pipeline { - agent none - stages { - stage('sign') { - steps { - script { - uploadToS3( - sourcePath: '/tmp/src/path', - bucket: 'dummy_bucket', - path: '/upload/path' - ) - } - } - } - } -} diff --git a/tests/jenkins/jobs/UploadToS3_Jenkinsfile.txt b/tests/jenkins/jobs/UploadToS3_Jenkinsfile.txt deleted file mode 100644 index 4228c3ae04..0000000000 --- a/tests/jenkins/jobs/UploadToS3_Jenkinsfile.txt +++ /dev/null @@ -1,10 +0,0 @@ - UploadToS3_Jenkinsfile.run() - UploadToS3_Jenkinsfile.pipeline(groovy.lang.Closure) - UploadToS3_Jenkinsfile.echo(Executing on agent [label:none]) - UploadToS3_Jenkinsfile.stage(sign, groovy.lang.Closure) - UploadToS3_Jenkinsfile.script(groovy.lang.Closure) - UploadToS3_Jenkinsfile.uploadToS3({sourcePath=/tmp/src/path, bucket=dummy_bucket, path=/upload/path}) - uploadToS3.string({credentialsId=jenkins-aws-account-public, variable=AWS_ACCOUNT_PUBLIC}) - uploadToS3.withCredentials([AWS_ACCOUNT_PUBLIC], groovy.lang.Closure) - uploadToS3.withAWS({role=opensearch-bundle, roleAccount=AWS_ACCOUNT_PUBLIC, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure) - uploadToS3.s3Upload({file=/tmp/src/path, bucket=dummy_bucket, path=/upload/path}) diff --git a/tests/jenkins/jobs/data-prepper/promote-distribution-artifacts.jenkinsfile.txt b/tests/jenkins/jobs/data-prepper/promote-distribution-artifacts.jenkinsfile.txt deleted file mode 100644 index 9ab718aa30..0000000000 --- a/tests/jenkins/jobs/data-prepper/promote-distribution-artifacts.jenkinsfile.txt +++ /dev/null @@ -1,19 +0,0 @@ - promote-distribution-artifacts.run() - promote-distribution-artifacts.legacySCM(groovy.lang.Closure) - promote-distribution-artifacts.library({identifier=jenkins@20211123, retriever=null}) - promote-distribution-artifacts.pipeline(groovy.lang.Closure) - promote-distribution-artifacts.echo(Executing on agent [docker:[image:opensearchstaging/ci-runner:ci-runner-centos7-v1, reuseNode:false, stages:[:], args:, alwaysPull:true, containerPerStageRoot:false, label:Jenkins-Agent-AL2-X64-C54xlarge-Docker-Host]]) - promote-distribution-artifacts.stage(Download Staging Artifacts, groovy.lang.Closure) - promote-distribution-artifacts.script(groovy.lang.Closure) - promote-distribution-artifacts.sh(mkdir distribution) - promote-distribution-artifacts.sh(curl -SL https://ci.opensearch.org/ci/dbc/data-prepper-distribution-artifacts/0.22.1/9876543/builds/signed/opensearch-data-prepper-0.22.1-linux-x64.tar.gz -o distribution/opensearch-data-prepper-0.22.1-linux-x64.tar.gz) - promote-distribution-artifacts.sh(curl -SL https://ci.opensearch.org/ci/dbc/data-prepper-distribution-artifacts/0.22.1/9876543/builds/signed/opensearch-data-prepper-0.22.1-linux-x64.tar.gz.sig -o distribution/opensearch-data-prepper-0.22.1-linux-x64.tar.gz.sig) - promote-distribution-artifacts.sh(curl -SL https://ci.opensearch.org/ci/dbc/data-prepper-distribution-artifacts/0.22.1/9876543/builds/signed/opensearch-data-prepper-jdk-0.22.1-linux-x64.tar.gz -o distribution/opensearch-data-prepper-jdk-0.22.1-linux-x64.tar.gz) - promote-distribution-artifacts.sh(curl -SL https://ci.opensearch.org/ci/dbc/data-prepper-distribution-artifacts/0.22.1/9876543/builds/signed/opensearch-data-prepper-jdk-0.22.1-linux-x64.tar.gz.sig -o distribution/opensearch-data-prepper-jdk-0.22.1-linux-x64.tar.gz.sig) - promote-distribution-artifacts.stage(Upload Artifacts to Production Distribution Bucket, groovy.lang.Closure) - promote-distribution-artifacts.script(groovy.lang.Closure) - promote-distribution-artifacts.withAWS({role=production-role-name, roleAccount=aws-account-artifact, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure) - promote-distribution-artifacts.s3Upload({file=distribution/, bucket=production-s3-bucket-name, path=data-prepper/0.22.1/}) - promote-distribution-artifacts.script(groovy.lang.Closure) - promote-distribution-artifacts.postCleanup() - postCleanup.cleanWs({disableDeferredWipeout=true, deleteDirs=true}) diff --git a/tests/jenkins/jobs/uploadMinSnapshotsToS3_Jenkinsfile b/tests/jenkins/jobs/uploadMinSnapshotsToS3_Jenkinsfile deleted file mode 100644 index 139a0837b5..0000000000 --- a/tests/jenkins/jobs/uploadMinSnapshotsToS3_Jenkinsfile +++ /dev/null @@ -1,21 +0,0 @@ -lib = library(identifier: 'jenkins@1.0.0', retriever: modernSCM([ - $class: 'GitSCMSource', - remote: 'https://github.com/opensearch-project/opensearch-build-libraries.git', -])) - -pipeline { - agent none - stages { - stage('uploadMinSnapshotsToS3') { - steps { - script { - uploadMinSnapshotsToS3( - fileActions: [createSha512Checksums()], - manifest: 'tests/jenkins/data/opensearch-1.3.0.yml', - distribution: 'tar' - ) - } - } - } - } -} \ No newline at end of file diff --git a/tests/jenkins/jobs/uploadMinSnapshotsToS3_Jenkinsfile.txt b/tests/jenkins/jobs/uploadMinSnapshotsToS3_Jenkinsfile.txt deleted file mode 100644 index 095b75d6f2..0000000000 --- a/tests/jenkins/jobs/uploadMinSnapshotsToS3_Jenkinsfile.txt +++ /dev/null @@ -1,44 +0,0 @@ - uploadMinSnapshotsToS3_Jenkinsfile.run() - uploadMinSnapshotsToS3_Jenkinsfile.modernSCM({$class=GitSCMSource, remote=https://github.com/opensearch-project/opensearch-build-libraries.git}) - uploadMinSnapshotsToS3_Jenkinsfile.library({identifier=jenkins@1.0.0, retriever=null}) - uploadMinSnapshotsToS3_Jenkinsfile.pipeline(groovy.lang.Closure) - uploadMinSnapshotsToS3_Jenkinsfile.echo(Executing on agent [label:none]) - uploadMinSnapshotsToS3_Jenkinsfile.stage(uploadMinSnapshotsToS3, groovy.lang.Closure) - uploadMinSnapshotsToS3_Jenkinsfile.script(groovy.lang.Closure) - uploadMinSnapshotsToS3_Jenkinsfile.createSha512Checksums() - uploadMinSnapshotsToS3_Jenkinsfile.uploadMinSnapshotsToS3({fileActions=[groovy.lang.Closure], manifest=tests/jenkins/data/opensearch-1.3.0.yml, distribution=tar}) - uploadMinSnapshotsToS3.legacySCM(groovy.lang.Closure) - uploadMinSnapshotsToS3.library({identifier=jenkins@20211123, retriever=null}) - uploadMinSnapshotsToS3.readYaml({file=tests/jenkins/data/opensearch-1.3.0.yml}) - InputManifest.asBoolean() - uploadMinSnapshotsToS3.echo(Retreving build manifest from: tests/data/tar/builds/opensearch/manifest.yml) - uploadMinSnapshotsToS3.readYaml({file=tests/data/tar/builds/opensearch/manifest.yml}) - BuildManifest.asBoolean() - uploadMinSnapshotsToS3.echo(Create .sha512 for Min Snapshots Artifacts) - createSha512Checksums.sh({script=find tests/data/tar/builds/opensearch/dist -type f, returnStdout=true}) - createSha512Checksums.echo(Creating sha for opensearch-min-1.3.0-linux-x64.tar.gz) - createSha512Checksums.sh({script=sha512sum opensearch-min-1.3.0-linux-x64.tar.gz, returnStdout=true}) - createSha512Checksums.sh({script=basename ccc, returnStdout=true}) - createSha512Checksums.writeFile({file=opensearch-min-1.3.0-linux-x64.tar.gz.sha512, text=bbb -bbb -ccc -}) - createSha512Checksums.echo(Creating sha for opensearch-dashboards-min-1.3.0-linux-x64.tar.gz) - createSha512Checksums.sh({script=sha512sum opensearch-dashboards-min-1.3.0-linux-x64.tar.gz, returnStdout=true}) - createSha512Checksums.sh({script=basename ccc, returnStdout=true}) - createSha512Checksums.writeFile({file=opensearch-dashboards-min-1.3.0-linux-x64.tar.gz.sha512, text=bbb -bbb -ccc -}) - uploadMinSnapshotsToS3.sh( - cp tests/data/tar/builds/opensearch/dist/opensearch-min-1.2.2-SNAPSHOT-linux-x64.tar.gz tests/data/tar/builds/opensearch/dist/opensearch-min-1.2.2-SNAPSHOT-linux-x64-latest.tar.gz - cp tests/data/tar/builds/opensearch/dist/opensearch-min-1.2.2-SNAPSHOT-linux-x64.tar.gz.sha512 tests/data/tar/builds/opensearch/dist/opensearch-min-1.2.2-SNAPSHOT-linux-x64-latest.tar.gz.sha512 - sed -i "s/.tar.gz/-latest.tar.gz/g" tests/data/tar/builds/opensearch/dist/opensearch-min-1.2.2-SNAPSHOT-linux-x64-latest.tar.gz.sha512 - ) - uploadMinSnapshotsToS3.string({credentialsId=jenkins-artifact-promotion-role, variable=ARTIFACT_PROMOTION_ROLE_NAME}) - uploadMinSnapshotsToS3.string({credentialsId=jenkins-aws-production-account, variable=AWS_ACCOUNT_ARTIFACT}) - uploadMinSnapshotsToS3.string({credentialsId=jenkins-artifact-production-bucket-name, variable=ARTIFACT_PRODUCTION_BUCKET_NAME}) - uploadMinSnapshotsToS3.withCredentials([ARTIFACT_PROMOTION_ROLE_NAME, AWS_ACCOUNT_ARTIFACT, ARTIFACT_PRODUCTION_BUCKET_NAME], groovy.lang.Closure) - uploadMinSnapshotsToS3.withAWS({role=ARTIFACT_PROMOTION_ROLE_NAME, roleAccount=AWS_ACCOUNT_ARTIFACT, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure) - uploadMinSnapshotsToS3.s3Upload({file=tests/data/tar/builds/opensearch/dist/opensearch-min-1.2.2-SNAPSHOT-linux-x64-latest.tar.gz, bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=snapshots/core/opensearch/1.2.2-SNAPSHOT/opensearch-min-1.2.2-SNAPSHOT-linux-x64-latest.tar.gz}) - uploadMinSnapshotsToS3.s3Upload({file=tests/data/tar/builds/opensearch/dist/opensearch-min-1.2.2-SNAPSHOT-linux-x64-latest.tar.gz.sha512, bucket=ARTIFACT_PRODUCTION_BUCKET_NAME, path=snapshots/core/opensearch/1.2.2-SNAPSHOT/opensearch-min-1.2.2-SNAPSHOT-linux-x64-latest.tar.gz.sha512}) diff --git a/tests/jenkins/lib-testers/AssembleManifestLibTester.groovy b/tests/jenkins/lib-testers/AssembleManifestLibTester.groovy deleted file mode 100644 index 6dab9b0e76..0000000000 --- a/tests/jenkins/lib-testers/AssembleManifestLibTester.groovy +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -import static org.hamcrest.CoreMatchers.notNullValue -import static org.hamcrest.MatcherAssert.assertThat - -class AssembleManifestLibTester extends LibFunctionTester { - - private String buildManifest - - public AssembleManifestLibTester(buildManifest) { - this.buildManifest = buildManifest - } - - void configure(helper, binding) { - - binding.setVariable('PUBLIC_ARTIFACT_URL', 'https://ci.opensearch.org/dbc') - binding.setVariable('JOB_NAME', 'vars-build') - binding.setVariable('BUILD_NUMBER', '123') - } - - void parameterInvariantsAssertions(call) { - assertThat(call.args.buildManifest.first(), notNullValue()) - } - - boolean expectedParametersMatcher(call) { - return call.args.buildManifest.first().toString().equals(this.buildManifest) - } - - String libFunctionName() { - return 'assembleManifest' - } - -} diff --git a/tests/jenkins/lib-testers/BuildFailureMessageLibTester.groovy b/tests/jenkins/lib-testers/BuildFailureMessageLibTester.groovy deleted file mode 100644 index 02a14117f2..0000000000 --- a/tests/jenkins/lib-testers/BuildFailureMessageLibTester.groovy +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -class BuildFailureMessageLibTester extends LibFunctionTester { - - - public BuildFailureMessageLibTester() {} - - - void parameterInvariantsAssertions(call) { - //N/A - } - - boolean expectedParametersMatcher(call) { - return true - } - - - String libFunctionName() { - return 'buildFailureMessage' - } - - void configure(helper, binding){ - } -} diff --git a/tests/jenkins/lib-testers/BuildInfoYamlLibTester.groovy b/tests/jenkins/lib-testers/BuildInfoYamlLibTester.groovy deleted file mode 100644 index a8db35f40e..0000000000 --- a/tests/jenkins/lib-testers/BuildInfoYamlLibTester.groovy +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -import static org.hamcrest.CoreMatchers.notNullValue -import static org.hamcrest.MatcherAssert.assertThat - - -class BuildInfoYamlLibTester extends LibFunctionTester { - - private String componentName - private String inputManifest - private String outputFile - private String status - private String stage - - public BuildInfoYamlLibTester(componentName, inputManifest, outputFile, status, stage){ - this.componentName = componentName - this.inputManifest = inputManifest - this.outputFile = outputFile - this.status = status - this.stage = stage - } - - void configure(helper, binding) { - binding.setVariable('BUILD_NUMBER', '123') - helper.registerAllowedMethod("writeYaml", [Map.class], {c -> }) - helper.addShMock("git rev-parse HEAD") { script -> - return [stdout: "75eccfe03b4e58ede1a69eb6008196c44e7008c6", exitValue: 0] - } - } - - void parameterInvariantsAssertions(call) { - assertThat(call.args.inputManifest.first(), notNullValue()) - assertThat(call.args.outputFile.first(), notNullValue()) - assertThat(call.args.status.first(), notNullValue()) - assertThat(call.args.stage.first(), notNullValue()) - } - - boolean expectedParametersMatcher(call) { - return call.args.inputManifest.first().toString().equals(this.inputManifest) - && call.args.outputFile.first().toString().equals(this.outputFile) - && call.args.status.first().toString().equals(this.status) - && call.args.stage.first().toString().equals(this.stage) - } - - String libFunctionName() { - return 'buildInfoYaml' - } -} diff --git a/tests/jenkins/lib-testers/BuildYumRepoTester.groovy b/tests/jenkins/lib-testers/BuildYumRepoTester.groovy deleted file mode 100644 index 3afacb77c4..0000000000 --- a/tests/jenkins/lib-testers/BuildYumRepoTester.groovy +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -import static org.hamcrest.CoreMatchers.notNullValue -import static org.hamcrest.MatcherAssert.assertThat - -class BuildYumRepoTester extends LibFunctionTester { - - private String buildManifest - private String baseUrl - - public BuildYumRepoTester(buildManifest, baseUrl) { - this.buildManifest = buildManifest - this.baseUrl = baseUrl - } - - void configure(helper, binding) { - binding.setVariable('BUILD_NUMBER', '123') - - helper.registerAllowedMethod("writeFile", [Map]) - } - - void parameterInvariantsAssertions(call) { - assertThat(call.args.buildManifest.first(), notNullValue()) - assertThat(call.args.baseUrl.first(), notNullValue()) - } - - boolean expectedParametersMatcher(call) { - return call.args.buildManifest.first().toString().equals(this.buildManifest) && - call.args.baseUrl.first().toString().equals(this.baseUrl) - } - - String libFunctionName() { - return 'buildYumRepo' - } - -} diff --git a/tests/jenkins/lib-testers/CreateGithubIssueLibTester.groovy b/tests/jenkins/lib-testers/CreateGithubIssueLibTester.groovy deleted file mode 100644 index 7a109c2257..0000000000 --- a/tests/jenkins/lib-testers/CreateGithubIssueLibTester.groovy +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -import static org.hamcrest.CoreMatchers.notNullValue -import static org.hamcrest.CoreMatchers.nullValue -import static org.hamcrest.MatcherAssert.assertThat - -class CreateGithubIssueLibTester extends LibFunctionTester{ - private List message - - public CreateGithubIssueLibTester(message){ - this.message = message - } - - @Override - String libFunctionName() { - return 'createGithubIssue' - } - - @Override - void parameterInvariantsAssertions(Object call) { - assertThat(call.args.message.first(), notNullValue()) - } - - @Override - boolean expectedParametersMatcher(Object call) { - //return false - return call.args.message.first().equals(this.message) - } - - @Override - void configure(Object helper, Object binding) { - helper.registerAllowedMethod("withCredentials", [Map]) - helper.registerAllowedMethod("sleep", [Map]) - binding.setVariable('BUILD_URL', 'www.example.com/jobs/test/123/') - binding.setVariable('INPUT_MANIFEST', '2.0.0/opensearch-2.0.0.yml') - } -} diff --git a/tests/jenkins/lib-testers/CreateReleaseTagLibTester.groovy b/tests/jenkins/lib-testers/CreateReleaseTagLibTester.groovy deleted file mode 100644 index 16829fefa6..0000000000 --- a/tests/jenkins/lib-testers/CreateReleaseTagLibTester.groovy +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -import jenkins.BundleManifest -import org.yaml.snakeyaml.Yaml - -import static org.hamcrest.CoreMatchers.notNullValue -import static org.hamcrest.MatcherAssert.assertThat - - -class CreateReleaseTagLibTester extends LibFunctionTester { - - private String distManifest - private String tagVersion - private ArrayList bundleManifestComponentsList - - public CreateReleaseTagLibTester(distManifest, tagVersion){ - this.distManifest = distManifest - this.tagVersion = tagVersion - this.bundleManifestComponentsList = [] - } - - void parameterInvariantsAssertions(call){ - assertThat(call.args.distManifest.first(), notNullValue()) - assertThat(call.args.tagVersion.first(), notNullValue()) - } - - boolean expectedParametersMatcher(call) { - return call.args.distManifest.first().toString().equals(this.distManifest) - && call.args.tagVersion.first().toString().equals(this.tagVersion) - && this.bundleManifestComponentsList.size() > 1 - } - - String libFunctionName(){ - return 'createReleaseTag' - } - - void configure(helper, binding){ - binding.setVariable('GITHUB_BOT_TOKEN_NAME', 'dummy_token_name') - binding.setVariable('GITHUB_USER', 'dummy_user') - binding.setVariable('GITHUB_TOKEN', 'dummy_token') - - helper.registerAllowedMethod("checkout", [Map], {}) - helper.registerAllowedMethod("dir", [Map], {}) - InputStream inputStream = new FileInputStream(new File(this.distManifest)); - Yaml yaml = new Yaml() - Map ymlMap = yaml.load(inputStream) - BundleManifest bundleManifestObj = new BundleManifest(ymlMap) - this.bundleManifestComponentsList = bundleManifestObj.getNames() - boolean checkFirst = true - for (component in this.bundleManifestComponentsList) { - def repo = bundleManifestObj.getRepo(component) - def version = tagVersion - if (tagVersion.contains("-")) { - version = tagVersion.split("-").first() + ".0-" + tagVersion.split("-").last() - } else { - version = "$tagVersion.0" - } - if (component == "OpenSearch" || component == "OpenSearch-Dashboards" || component == "functionalTestDashboards") { - version = tagVersion - } - def out = "" - if (checkFirst) { - out = bundleManifestObj.getCommitId(component) - checkFirst = false - } - helper.addShMock("git ls-remote --tags $repo $version | awk 'NR==1{print \$1}'") { script -> - return [stdout: out, exitValue: 0] - } - } - } -} diff --git a/tests/jenkins/lib-testers/CreateTestResultsMessageLibTester.groovy b/tests/jenkins/lib-testers/CreateTestResultsMessageLibTester.groovy deleted file mode 100644 index 034aca4a85..0000000000 --- a/tests/jenkins/lib-testers/CreateTestResultsMessageLibTester.groovy +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -import static org.hamcrest.CoreMatchers.notNullValue -import static org.hamcrest.MatcherAssert.assertThat - - -class CreateTestResultsMessageLibTester extends LibFunctionTester { - - private String testType - private String status - private String absoluteUrl - - public CreateTestResultsMessageLibTester( - String testType, - String status, - String absoluteUrl - ){ - this.testType = testType - this.status = status - this.absoluteUrl = absoluteUrl - } - - void configure(helper, binding) { - binding.setVariable('STAGE_NAME', 'stage') - helper.registerAllowedMethod('findFiles', [Map.class], null) - } - - void parameterInvariantsAssertions(call) { - assertThat(call.args.testType.first(), notNullValue()) - assertThat(call.args.status.first(), notNullValue()) - assertThat(call.args.absoluteUrl.first(), notNullValue()) - } - - boolean expectedParametersMatcher(call) { - return call.args.testType.first().toString().equals(this.testType) - && call.args.status.first().toString().equals(this.status) - && call.args.absoluteUrl.first().toString().equals(this.absoluteUrl) - } - - String libFunctionName() { - return 'createTestResultsMessage' - } -} diff --git a/tests/jenkins/lib-testers/DetectTestDockerAgentLibTester.groovy b/tests/jenkins/lib-testers/DetectTestDockerAgentLibTester.groovy deleted file mode 100644 index 8af510cc1c..0000000000 --- a/tests/jenkins/lib-testers/DetectTestDockerAgentLibTester.groovy +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -import org.yaml.snakeyaml.Yaml - - -class DetectTestDockerAgentLibTester extends LibFunctionTester { - - private String testManifest - - public DetectTestDockerAgentLibTester(testManifest=null){ - this.testManifest = testManifest - } - - void configure(helper, binding) { - helper.registerAllowedMethod('readYaml', [Map.class], { args -> - return new Yaml().load((this.testManifest ?: binding.getVariable('TEST_MANIFEST') as File).text) - }) - } - - void parameterInvariantsAssertions(call) { - // NA - } - - boolean expectedParametersMatcher(call) { - return this.testManifest != null ? call.args.testManifest.first().toString().equals(this.testManifest) : true - } - - String libFunctionName() { - return 'detectTestDockerAgent' - } -} diff --git a/tests/jenkins/lib-testers/DownloadBuildManifestLibTester.groovy b/tests/jenkins/lib-testers/DownloadBuildManifestLibTester.groovy deleted file mode 100644 index 5a9fc40ece..0000000000 --- a/tests/jenkins/lib-testers/DownloadBuildManifestLibTester.groovy +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -import static org.hamcrest.CoreMatchers.notNullValue -import static org.hamcrest.MatcherAssert.assertThat -import org.yaml.snakeyaml.Yaml - - -class DownloadBuildManifestLibTester extends LibFunctionTester { - - private String url - private String path - - public DownloadBuildManifestLibTester(url, path){ - this.url = url - this.path = path - } - - void configure(helper, binding) { - helper.registerAllowedMethod('readYaml', [Map.class], { args -> - return new Yaml().load((path as File).text) - }) - } - - void parameterInvariantsAssertions(call) { - assertThat(call.args.url.first(), notNullValue()) - assertThat(call.args.path.first(), notNullValue()) - } - - boolean expectedParametersMatcher(call) { - return call.args.url.first().toString().equals(this.url) - && call.args.path.first().toString().equals(this.path) - } - - String libFunctionName() { - return 'downloadBuildManifest' - } -} diff --git a/tests/jenkins/lib-testers/DownloadFromS3LibTester.groovy b/tests/jenkins/lib-testers/DownloadFromS3LibTester.groovy deleted file mode 100644 index 0220b17e7b..0000000000 --- a/tests/jenkins/lib-testers/DownloadFromS3LibTester.groovy +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -import static org.hamcrest.CoreMatchers.notNullValue -import static org.hamcrest.MatcherAssert.assertThat -import static org.hamcrest.CoreMatchers.anyOf -import static org.hamcrest.CoreMatchers.equalTo - -class DownloadFromS3LibTester extends LibFunctionTester { - - private String destPath - private String bucket - private String path - private boolean force - - public DownloadFromS3LibTester(destPath, bucket, path, force){ - this.destPath = destPath - this.bucket = bucket - this.path = path - this.force = force - } - - void parameterInvariantsAssertions(call){ - assertThat(call.args.destPath.first(), notNullValue()) - assertThat(call.args.bucket.first(), notNullValue()) - assertThat(call.args.path.first(), notNullValue()) - assertThat(call.args.force.first(), notNullValue()) - assertThat(call.args.force.first().toString(), anyOf(equalTo('true'), equalTo('false'))) - } - - boolean expectedParametersMatcher(call) { - return call.args.destPath.first().toString().equals(this.destPath) - && call.args.bucket.first().toString().equals(this.bucket) - && call.args.path.first().toString().equals(this.path) - && call.args.force.first().toString().equals(this.force.toString()) - } - - String libFunctionName(){ - return 'downloadFromS3' - } - - void configure(helper, binding){ - binding.setVariable('ARTIFACT_DOWNLOAD_ROLE_NAME', 'Dummy_Download_Role') - binding.setVariable('AWS_ACCOUNT_PUBLIC', 'dummy_account') - helper.registerAllowedMethod("s3Download", [Map]) - helper.registerAllowedMethod("withAWS", [Map, Closure], { args, closure -> - closure.delegate = delegate - return helper.callClosure(closure) - }) - } -} diff --git a/tests/jenkins/lib-testers/PrintArtifactDownloadUrlsForStagingLibTester.groovy b/tests/jenkins/lib-testers/PrintArtifactDownloadUrlsForStagingLibTester.groovy deleted file mode 100644 index add17af2ba..0000000000 --- a/tests/jenkins/lib-testers/PrintArtifactDownloadUrlsForStagingLibTester.groovy +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -import static org.hamcrest.MatcherAssert.assertThat -import static org.hamcrest.core.IsNull.notNullValue - -class PrintArtifactDownloadUrlsForStagingLibTester extends LibFunctionTester { - - private List artifactFileNames - private String uploadPath - - public PrintArtifactDownloadUrlsForStagingLibTester(artifactFileNames, uploadPath){ - this.artifactFileNames = artifactFileNames - this.uploadPath = uploadPath - } - - void configure(helper, bindings) {} - - void parameterInvariantsAssertions(call) { - assertThat(call.args.artifactFileNames.first(), notNullValue()) - assertThat(call.args.uploadPath.first(), notNullValue()) - assert call.args.artifactFileNames.size() > 0 - } - - boolean expectedParametersMatcher(call) { - return call.args.uploadPath.first().toString().equals(this.uploadPath) - && call.args.artifactFileNames.first().sort() == this.artifactFileNames.sort() - } - - String libFunctionName() { - return 'printArtifactDownloadUrlsForStaging' - } -} diff --git a/tests/jenkins/lib-testers/PublishNotificationLibTester.groovy b/tests/jenkins/lib-testers/PublishNotificationLibTester.groovy deleted file mode 100644 index 9bc5637e86..0000000000 --- a/tests/jenkins/lib-testers/PublishNotificationLibTester.groovy +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -import static org.hamcrest.CoreMatchers.notNullValue -import static org.hamcrest.MatcherAssert.assertThat - -class PublishNotificationLibTester extends LibFunctionTester { - - private String icon - private String message - private String credentialsId - private String manifest - private String extra - - public PublishNotificationLibTester(icon, message, extra, manifest, credentialsId) { - this.icon = icon - this.message = message - this.extra = extra - this.manifest = manifest - this.credentialsId = credentialsId - } - - void parameterInvariantsAssertions(call){ - assertThat(call.args.message.first(), notNullValue()) - assertThat(call.args.credentialsId.first(), notNullValue()) - assertThat(call.args.icon.first(), notNullValue()) - assertThat(call.args.manifest.first(), notNullValue()) - assertThat(call.args.extra.first(), notNullValue()) - } - - boolean expectedParametersMatcher(call) { - return call.args.message.first().toString().equals(this.message) - && call.args.credentialsId.first().toString().equals(this.credentialsId) - && call.args.icon.first().toString().equals(this.icon) - && call.args.manifest.first().toString().equals(this.manifest) - && call.args.extra.first().toString().equals(this.extra) - } - - String libFunctionName() { - return 'publishNotification' - } - - void configure(helper, binding){ - binding.setVariable('JOB_NAME', 'dummy_job') - binding.setVariable('BUILD_NUMBER', '123') - binding.setVariable('BUILD_URL', 'htth://BUILD_URL_dummy.com') - binding.setVariable('WEBHOOK_URL', 'htth://WEBHOOK_URL_dummy.com') - helper.registerAllowedMethod("withCredentials", [Map]) - } -} diff --git a/tests/jenkins/lib-testers/RpmDashboardsDistValidationLibTester.groovy b/tests/jenkins/lib-testers/RpmDashboardsDistValidationLibTester.groovy deleted file mode 100644 index d0b59e6f17..0000000000 --- a/tests/jenkins/lib-testers/RpmDashboardsDistValidationLibTester.groovy +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -import static org.hamcrest.CoreMatchers.notNullValue -import static org.hamcrest.MatcherAssert.assertThat - - -class RpmDashboardsDistValidationLibTester extends LibFunctionTester { - - private String bundleManifest - private String rpmDistribution - - public RpmDashboardsDistValidationLibTester(rpmDistribution, bundleManifest){ - this.rpmDistribution = rpmDistribution - this.bundleManifest = bundleManifest - } - - void parameterInvariantsAssertions(call){ - assertThat(call.args.rpmDistribution.first(), notNullValue()) - assertThat(call.args.bundleManifest.first(), notNullValue()) - } - - boolean expectedParametersMatcher(call) { - return call.args.rpmDistribution.first().toString().equals(this.rpmDistribution) - && call.args.bundleManifest.first().equals(this.bundleManifest) - } - - String libFunctionName(){ - return 'rpmDashboardsDistValidation' - } - - void configure(helper, binding){ - } - -} diff --git a/tests/jenkins/lib-testers/RpmMetaValidationLibTester.groovy b/tests/jenkins/lib-testers/RpmMetaValidationLibTester.groovy deleted file mode 100644 index 5bf899a3b7..0000000000 --- a/tests/jenkins/lib-testers/RpmMetaValidationLibTester.groovy +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -import static org.hamcrest.CoreMatchers.notNullValue -import static org.hamcrest.MatcherAssert.assertThat - - -class RpmMetaValidationLibTester extends LibFunctionTester { - - private String rpmDistribution - private Map refMap - - public RpmMetaValidationLibTester(rpmDistribution, refMap){ - this.rpmDistribution = rpmDistribution - this.refMap = refMap - } - - void parameterInvariantsAssertions(call){ - assertThat(call.args.rpmDistribution.first(), notNullValue()) - assertThat(call.args.refMap.first(), notNullValue()) - } - - boolean expectedParametersMatcher(call) { - return call.args.rpmDistribution.first().toString().equals(this.rpmDistribution) - && call.args.refMap.first().equals(this.refMap) - } - - String libFunctionName(){ - return 'rpmMetaValidation' - } - - void configure(helper, binding){ - } -} - - diff --git a/tests/jenkins/lib-testers/RpmOpenSearchDistValidationLibTester.groovy b/tests/jenkins/lib-testers/RpmOpenSearchDistValidationLibTester.groovy deleted file mode 100644 index eb524cdd6e..0000000000 --- a/tests/jenkins/lib-testers/RpmOpenSearchDistValidationLibTester.groovy +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -import static org.hamcrest.CoreMatchers.notNullValue -import static org.hamcrest.MatcherAssert.assertThat - - -class RpmOpenSearchDistValidationLibTester extends LibFunctionTester { - - private String bundleManifest - private String rpmDistribution - - public RpmOpenSearchDistValidationLibTester(rpmDistribution, bundleManifest){ - this.rpmDistribution = rpmDistribution - this.bundleManifest = bundleManifest - } - - void parameterInvariantsAssertions(call){ - assertThat(call.args.rpmDistribution.first(), notNullValue()) - assertThat(call.args.bundleManifest.first(), notNullValue()) - } - - boolean expectedParametersMatcher(call) { - return call.args.rpmDistribution.first().toString().equals(this.rpmDistribution) - && call.args.bundleManifest.first().equals(this.bundleManifest) - } - - String libFunctionName(){ - return 'rpmOpenSearchDistValidation' - } - - void configure(helper, binding){ - } - -} - - - diff --git a/tests/jenkins/lib-testers/RunBwcTestScriptLibTest.groovy b/tests/jenkins/lib-testers/RunBwcTestScriptLibTest.groovy deleted file mode 100644 index a8e86ce04a..0000000000 --- a/tests/jenkins/lib-testers/RunBwcTestScriptLibTest.groovy +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -import static org.hamcrest.CoreMatchers.notNullValue -import static org.hamcrest.MatcherAssert.assertThat - - -class RunBwcTestScriptLibTester extends LibFunctionTester { - - private String jobName - private String buildManifest - private String testManifest - private String buildId - - public RunBwcTestScriptLibTester(jobName, buildManifest, testManifest, buildId){ - this.jobName = jobName - this.buildManifest = buildManifest - this.testManifest = testManifest - this.buildId = buildId - } - - void configure(helper, binding) { - binding.setVariable('env', ['BUILD_NUMBER': '487']) - } - - void parameterInvariantsAssertions(call) { - assertThat(call.args.buildManifest.first().toString(), notNullValue()) - assertThat(call.args.testManifest.first().toString(), notNullValue()) - assertThat(call.args.buildId.first().toString(), notNullValue()) - } - - boolean expectedParametersMatcher(call) { - return call.args.jobName.first().toString().equals(this.jobName) - && call.args.buildManifest.first().toString().equals(this.buildManifest) - && call.args.testManifest.first().toString().equals(this.testManifest) - && call.args.buildId.first().toString().equals(this.buildId) - } - - String libFunctionName() { - return 'runBwcTestScript' - } -} diff --git a/tests/jenkins/lib-testers/RunGradleCheckLibTester.groovy b/tests/jenkins/lib-testers/RunGradleCheckLibTester.groovy deleted file mode 100644 index 267d1cbe6c..0000000000 --- a/tests/jenkins/lib-testers/RunGradleCheckLibTester.groovy +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -import static org.hamcrest.CoreMatchers.notNullValue -import static org.hamcrest.MatcherAssert.assertThat - - -class RunGradleCheckLibTester extends LibFunctionTester { - - private String gitRepoUrl - private String gitReference - - public RunGradleCheckLibTester(gitRepoUrl, gitReference){ - this.gitRepoUrl = gitRepoUrl - this.gitReference = gitReference - } - - void configure(helper, binding) { - // N/A - } - - void parameterInvariantsAssertions(call) { - assertThat(call.args.gitRepoUrl.first(), notNullValue()) - assertThat(call.args.gitReference.first(), notNullValue()) - } - - boolean expectedParametersMatcher(call) { - return call.args.gitRepoUrl.first().toString().equals(this.gitRepoUrl) - && call.args.gitReference.first().toString().equals(this.gitReference) - } - - String libFunctionName() { - return 'runGradleCheck' - } -} diff --git a/tests/jenkins/lib-testers/RunIntegTestScriptLibTest.groovy b/tests/jenkins/lib-testers/RunIntegTestScriptLibTest.groovy deleted file mode 100644 index eddbc70d63..0000000000 --- a/tests/jenkins/lib-testers/RunIntegTestScriptLibTest.groovy +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -import static org.hamcrest.CoreMatchers.notNullValue -import static org.hamcrest.MatcherAssert.assertThat - - -class RunIntegTestScriptLibTester extends LibFunctionTester { - - private String jobName - private String componentName - private String buildManifest - private String testManifest - private String localPath - - public RunIntegTestScriptLibTester(jobName, componentName, buildManifest, testManifest, localPath){ - this.jobName = jobName - this.componentName = componentName - this.buildManifest = buildManifest - this.testManifest = testManifest - this.localPath = localPath - } - - void configure(helper, binding) { - binding.setVariable('env', ['BUILD_NUMBER': '987']) - } - - void parameterInvariantsAssertions(call) { - assertThat(call.args.componentName.first(), notNullValue()) - assertThat(call.args.buildManifest.first(), notNullValue()) - assertThat(call.args.testManifest.first(), notNullValue()) - } - - boolean expectedParametersMatcher(call) { - return call.args.jobName.first().toString().equals(this.jobName) - && call.args.componentName.first().toString().equals(this.componentName) - && call.args.buildManifest.first().toString().equals(this.buildManifest) - && call.args.testManifest.first().toString().equals(this.testManifest) - } - - String libFunctionName() { - return 'runIntegTestScript' - } -} diff --git a/tests/jenkins/lib-testers/RunPerfTestScriptLibTest.groovy b/tests/jenkins/lib-testers/RunPerfTestScriptLibTest.groovy deleted file mode 100644 index 5ec162592c..0000000000 --- a/tests/jenkins/lib-testers/RunPerfTestScriptLibTest.groovy +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -import static org.hamcrest.CoreMatchers.notNullValue -import static org.hamcrest.MatcherAssert.assertThat - -class RunPerfTestScriptLibTester extends LibFunctionTester { - - private String bundleManifest - private String buildId - private String insecure - private String workload - private String testIterations - private String warmupIterations - private boolean security - - public RunPerfTestScriptLibTester(bundleManifest, buildId, insecure, workload, - testIterations, warmupIterations, security) { - this.bundleManifest = bundleManifest - this.buildId = buildId - this.insecure = insecure - this.workload = workload - this.testIterations = testIterations - this.warmupIterations = warmupIterations - this.security = security - } - - void configure(helper, binding) { - helper.registerAllowedMethod("s3Download", [Map]) - helper.registerAllowedMethod("uploadTestResults", [Map]) - helper.registerAllowedMethod("s3Upload", [Map]) - helper.registerAllowedMethod("withAWS", [Map, Closure], { - args, - closure -> - closure.delegate = delegate - return helper.callClosure(closure) - }) - helper.registerAllowedMethod('findFiles', [Map.class], null) - helper.registerAllowedMethod("withCredentials", [Map]) - helper.registerAllowedMethod("downloadBuildManifest", [Map], { - c -> lib.jenkins.BuildManifest.new(readYaml(file: bundleManifest)) - }) - helper.registerAllowedMethod('parameterizedCron', [String], null) - binding.setVariable('AGENT_LABEL', 'Jenkins-Agent-AL2-X64-C54xlarge-Docker-Host') - binding.setVariable('AGENT_IMAGE', 'opensearchstaging/ci-runner:ci-runner-centos7-v1') - binding.setVariable('ARCHITECTURE', 'x64') - binding.setVariable('ARTIFACT_BUCKET_NAME', 'test_bucket') - binding.setVariable('ARTIFACT_DOWNLOAD_ROLE_NAME', 'Dummy_Download_Role') - binding.setVariable('AWS_ACCOUNT_PUBLIC', 'dummy_account') - binding.setVariable('BUILD_ID', buildId) - binding.setVariable('env', ['BUILD_NUMBER': '307']) - binding.setVariable('BUILD_NUMBER', '307') - binding.setVariable('BUILD_URL', 'test://artifact.url') - binding.setVariable('BUNDLE_MANIFEST', bundleManifest) - binding.setVariable('BUNDLE_MANIFEST_URL', 'test://artifact.url') - binding.setVariable('GITHUB_BOT_TOKEN_NAME', 'bot_token_name') - binding.setVariable('GITHUB_USER', 'test_user') - binding.setVariable('GITHUB_TOKEN', 'test_token') - binding.setVariable('HAS_SECURITY', security) - binding.setVariable('JOB_NAME', 'perf-test') - binding.setVariable('PERF_TEST_CONFIG_LOCATION', 'test_config') - binding.setVariable('PUBLIC_ARTIFACT_URL', 'test://artifact.url') - binding.setVariable('STAGE_NAME', 'test_stage') - binding.setVariable('TEST_ITERATIONS', testIterations) - binding.setVariable('TEST_WORKLOAD', workload) - binding.setVariable('WEBHOOK_URL', 'test://artifact.url') - binding.setVariable('WARMUP_ITERATIONS', warmupIterations) - - } - - void parameterInvariantsAssertions(call) { - assertThat(call.args.bundleManifest.first(), notNullValue()) - assertThat(call.args.buildId.first(), notNullValue()) - if (!this.insecure.isEmpty()) { - assertThat(call.args.insecure.first(), notNullValue()) - } - if (!this.workload.isEmpty()) { - assertThat(call.args.workload.first(), notNullValue()) - } - if (!this.testIterations.isEmpty()) { - assertThat(call.args.testIterations.first(), notNullValue()) - } - if (!this.warmupIterations.isEmpty()) { - assertThat(call.args.warmupIterations.first(), notNullValue()) - } - } - - boolean expectedParametersMatcher(call) { - return call.args.bundleManifest.first().toString().equals(this.bundleManifest) && - call.args.buildId.first().toString().equals(this.buildId) && - (this.workload.isEmpty() || call.args.workload.first().toString().equals(this.workload)) && - (this.testIterations.isEmpty() || call.args.testIterations.first().toInteger().equals(this.testIterations.toInteger())) && - (this.warmupIterations.isEmpty() || call.args.warmupIterations.first().toInteger().equals(this.warmupIterations.toInteger())) - } - - String libFunctionName() { - return 'runPerfTestScript' - } -} diff --git a/tests/jenkins/lib-testers/ScanDockerImageLibTester.groovy b/tests/jenkins/lib-testers/ScanDockerImageLibTester.groovy deleted file mode 100644 index b89f64210c..0000000000 --- a/tests/jenkins/lib-testers/ScanDockerImageLibTester.groovy +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -import static org.hamcrest.CoreMatchers.notNullValue -import static org.hamcrest.MatcherAssert.assertThat - - -class ScanDockerImageLibTester extends LibFunctionTester { - - private String imageFullName - private String imageResultFile - - public ScanDockerImageLibTester(imageFullName, imageResultFile){ - this.imageFullName = imageFullName - this.imageResultFile = imageResultFile - } - - void configure(helper, binding) { - // N/A - } - - void parameterInvariantsAssertions(call) { - assertThat(call.args.imageFullName.first(), notNullValue()) - assertThat(call.args.imageResultFile.first(), notNullValue()) - } - - boolean expectedParametersMatcher(call) { - return call.args.imageFullName.first().toString().equals(this.imageFullName) - && call.args.imageResultFile.first().toString().equals(this.imageResultFile) - } - - String libFunctionName() { - return 'scanDockerImage' - } -} diff --git a/tests/jenkins/lib-testers/SignArtifactsLibTester.groovy b/tests/jenkins/lib-testers/SignArtifactsLibTester.groovy deleted file mode 100644 index 6195f0c9cd..0000000000 --- a/tests/jenkins/lib-testers/SignArtifactsLibTester.groovy +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -import static org.hamcrest.CoreMatchers.notNullValue -import static org.hamcrest.MatcherAssert.assertThat - -class SignArtifactsLibTester extends LibFunctionTester { - - private String sigtype - private String platform - private String artifactPath - private String type - private String component - - public SignArtifactsLibTester(sigtype, platform, artifactPath, type, component) { - this.sigtype = sigtype - this.platform = platform - this.artifactPath = artifactPath - this.type = type - this.component = component - } - - void configure(helper, binding) { - binding.setVariable('GITHUB_BOT_TOKEN_NAME', 'github_bot_token_name') - helper.registerAllowedMethod('git', [Map]) - helper.registerAllowedMethod('withCredentials', [Map, Closure], { args, closure -> - closure.delegate = delegate - return helper.callClosure(closure) - }) - helper.registerAllowedMethod('withAWS', [Map, Closure], { args, closure -> - closure.delegate = delegate - return helper.callClosure(closure) - }) - } - - void parameterInvariantsAssertions(call) { - assertThat(call.args.artifactPath.first(), notNullValue()) - assertThat(call.args.platform.first(), notNullValue()) - if (call.args.artifactPath.first().toString().endsWith('.yml')) { - assertThat(call.args.type.first(), notNullValue()) - } else if (call.args.type.first() != 'maven') { - assertThat(call.args.sigtype.first(), notNullValue()) - } - } - - boolean expectedParametersMatcher(call) { - if (call.args.artifactPath.first().toString().endsWith('.yml')) { - return call.args.platform.first().toString().equals(this.platform) - && call.args.artifactPath.first().toString().equals(this.artifactPath) - && call.args.type.first().toString().equals(this.type) - && (call.args.component.first() == null || call.args.component.first().toString().equals(this.component)) - } else { - return call.args.sigtype.first().toString().equals(this.sigtype) - && call.args.platform.first().toString().equals(this.platform) - && call.args.artifactPath.first().toString().equals(this.artifactPath) - } - } - - String libFunctionName() { - return 'signArtifacts' - } - -} diff --git a/tests/jenkins/lib-testers/UploadIndexFileLibTester.groovy b/tests/jenkins/lib-testers/UploadIndexFileLibTester.groovy deleted file mode 100644 index 5d00325a40..0000000000 --- a/tests/jenkins/lib-testers/UploadIndexFileLibTester.groovy +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -import static org.hamcrest.CoreMatchers.notNullValue -import static org.hamcrest.MatcherAssert.assertThat - -class UploadIndexFileLibTester extends LibFunctionTester { - - private String indexFilePath - - public UploadIndexFileLibTester(indexFilePath) { - this.indexFilePath = indexFilePath - } - - void configure(helper, binding) { - binding.setVariable('BUILD_NUMBER', '123') - binding.setVariable('ARTIFACT_BUCKET_NAME', 'dummy_bucket_name') - - helper.registerAllowedMethod("withCredentials", [Map, Closure], { args, closure -> - closure.delegate = delegate - return helper.callClosure(closure) - }) - - helper.registerAllowedMethod("writeJSON", [Map]) - } - - void parameterInvariantsAssertions(call) { - assertThat(call.args.indexFilePath.first(), notNullValue()) - } - - boolean expectedParametersMatcher(call) { - return call.args.indexFilePath.first().toString().equals(this.indexFilePath) - } - - String libFunctionName() { - return 'uploadIndexFile' - } - -} diff --git a/tests/jenkins/lib-testers/UploadMinSnapshotsToS3LibTester.groovy b/tests/jenkins/lib-testers/UploadMinSnapshotsToS3LibTester.groovy deleted file mode 100644 index 75f0897f70..0000000000 --- a/tests/jenkins/lib-testers/UploadMinSnapshotsToS3LibTester.groovy +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -import static org.hamcrest.CoreMatchers.notNullValue -import static org.hamcrest.MatcherAssert.assertThat - -class UploadMinSnapshotsToS3LibTester extends LibFunctionTester { - - private List fileActions - private String manifest - - public UploadMinSnapshotsToS3LibTester(fileActions, manifest){ - this.fileActions = fileActions - this.manifest = manifest - } - - void parameterInvariantsAssertions(call){ - assertThat(call.args.fileActions.first(), notNullValue()) - assertThat(call.args.manifest.first(), notNullValue()) - } - - boolean expectedParametersMatcher(call) { - boolean actionMatch = call.args.fileActions.size() == 0 - for (actionCall in call.args.fileActions) { - actionMatch = this.fileActions.any( actionThis -> actionCall.toString().contains(actionThis.toString()) ) - } - return actionMatch && call.args.manifest.first().toString().equals(this.manifest) - } - - String libFunctionName(){ - return 'uploadMinSnapshotsToS3' - } - - void configure(helper, binding){ - binding.setVariable('WORKSPACE', 'tests/data') - binding.setVariable('productName', 'opensearch') - binding.setVariable('ARTIFACT_PROMOTION_ROLE_NAME', 'dummy_role') - binding.setVariable('AWS_ACCOUNT_ARTIFACT', '1234') - binding.setVariable('ARTIFACT_PRODUCTION_BUCKET_NAME', 'dummy_bucket') - helper.registerAllowedMethod("s3Upload", [Map]) - helper.addShMock('find tests/data/tar/builds/opensearch/dist -type f') { script -> - return [stdout: "opensearch-min-1.3.0-linux-x64.tar.gz opensearch-dashboards-min-1.3.0-linux-x64.tar.gz", exitValue: 0] - } - helper.registerAllowedMethod("withCredentials", [Map, Closure], { args, closure -> - closure.delegate = delegate - return helper.callClosure(closure) - }) - helper.registerAllowedMethod("withAWS", [Map, Closure], { args, closure -> - closure.delegate = delegate - return helper.callClosure(closure) - }) - } -} diff --git a/tests/jenkins/lib-testers/UploadTestResultsLibTester.groovy b/tests/jenkins/lib-testers/UploadTestResultsLibTester.groovy deleted file mode 100644 index 58d85f050b..0000000000 --- a/tests/jenkins/lib-testers/UploadTestResultsLibTester.groovy +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -import static org.hamcrest.CoreMatchers.notNullValue -import static org.hamcrest.MatcherAssert.assertThat - -class UploadTestResultsLibTester extends LibFunctionTester { - - private String buildManifestFileName - private String jobName - private Integer buildNumber - - public UploadTestResultsLibTester(buildManifestFileName, jobName) { - this.buildManifestFileName = buildManifestFileName - this.jobName = jobName - } - - void parameterInvariantsAssertions(call){ - assertThat(call.args.buildManifestFileName.first(), notNullValue()) - assertThat(call.args.jobName.first(), notNullValue()) - } - - boolean expectedParametersMatcher(call) { - return call.args.buildManifestFileName.first().toString().equals(this.buildManifestFileName) - && call.args.jobName.first().toString().equals(this.jobName) - } - - String libFunctionName() { - return 'uploadTestResults' - } - - void configure(helper, binding){ - binding.setVariable('ARTIFACT_BUCKET_NAME', 'DUMMY_BUCKET_NAME') - binding.setVariable('AWS_ACCOUNT_PUBLIC', 'DUMMY_AWS_ACCOUNT_PUBLIC') - binding.setVariable('ARTIFACT_BUCKET_NAME', 'DUMMY_ARTIFACT_BUCKET_NAME') - binding.setVariable('PUBLIC_ARTIFACT_URL', 'DUMMY_PUBLIC_ARTIFACT_URL') - binding.setVariable('env', ['BUILD_NUMBER': '487']) - binding.setVariable('STAGE_NAME', 'DUMMY_STAGE_NAME') - helper.registerAllowedMethod("withCredentials", [Map, Closure], { args, closure -> - closure.delegate = delegate - return helper.callClosure(closure) - }) - helper.registerAllowedMethod("withAWS", [Map, Closure], { args, closure -> - closure.delegate = delegate - return helper.callClosure(closure) - }) - helper.registerAllowedMethod("s3Upload", [Map]) - } -} diff --git a/tests/jenkins/lib-testers/UploadToS3LibTester.groovy b/tests/jenkins/lib-testers/UploadToS3LibTester.groovy deleted file mode 100644 index cd266ec1ae..0000000000 --- a/tests/jenkins/lib-testers/UploadToS3LibTester.groovy +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -import static org.hamcrest.CoreMatchers.notNullValue -import static org.hamcrest.MatcherAssert.assertThat - -class UploadToS3LibTester extends LibFunctionTester { - - private String sourcePath - private String bucket - private String path - - public UploadToS3LibTester(sourcePath, bucket, path){ - this.sourcePath = sourcePath - this.bucket = bucket - this.path = path - } - - void parameterInvariantsAssertions(call){ - assertThat(call.args.sourcePath.first(), notNullValue()) - assertThat(call.args.bucket.first(), notNullValue()) - assertThat(call.args.path.first(), notNullValue()) - } - - boolean expectedParametersMatcher(call) { - return call.args.sourcePath.first().toString().equals(this.sourcePath) - && call.args.bucket.first().toString().equals(this.bucket) - && call.args.path.first().toString().equals(this.path) - } - - String libFunctionName(){ - return 'uploadToS3' - } - - void configure(helper, binding){ - binding.setVariable('AWS_ACCOUNT_PUBLIC', 'dummy_account') - binding.setVariable('ARTIFACT_BUCKET_NAME', 'dummy_bucket_name') - helper.registerAllowedMethod("s3Upload", [Map]) - helper.registerAllowedMethod("withCredentials", [Map, Closure], { args, closure -> - closure.delegate = delegate - return helper.callClosure(closure) - }) - helper.registerAllowedMethod("withAWS", [Map, Closure], { args, closure -> - closure.delegate = delegate - return helper.callClosure(closure) - }) - } -} diff --git a/vars/archiveAssembleUpload.groovy b/vars/archiveAssembleUpload.groovy deleted file mode 100644 index ef6e9aa39a..0000000000 --- a/vars/archiveAssembleUpload.groovy +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -def call(Map args = [:]) { - lib = library(identifier: 'jenkins@20211123', retriever: legacySCM(scm)) - def inputManifestObj = lib.jenkins.InputManifest.new(readYaml(file: args.inputManifest)) - - String stashName = "${args.stashName}" - echo "Unstashing ${stashName} before starting the assemble process" - unstash "${stashName}" - - echo "Assembling ${args.inputManifest}" - - String buildManifest = "${args.distribution}/builds/${inputManifestObj.build.getFilename()}/manifest.yml" - def buildManifestObj = lib.jenkins.BuildManifest.new(readYaml(file: buildManifest)) - - assembleUpload( - args + [ - buildManifest: buildManifest, - ] - ) - - return buildManifestObj -} diff --git a/vars/assembleManifest.groovy b/vars/assembleManifest.groovy deleted file mode 100644 index b6f3f44e5a..0000000000 --- a/vars/assembleManifest.groovy +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -void call(Map args = [:]) { - lib = library(identifier: 'jenkins@20211123', retriever: legacySCM(scm)) - def buildManifest = lib.jenkins.BuildManifest.new(readYaml(file: args.buildManifest)) - def filename = buildManifest.build.getFilename() - def baseUrl = buildManifest.getArtifactRootUrlWithoutDistribution("${PUBLIC_ARTIFACT_URL}", "${JOB_NAME}", "${BUILD_NUMBER}") - sh([ - './assemble.sh', - "\"${args.buildManifest}\"", - "--base-url ${baseUrl}" - ].join(' ')) - - if (buildManifest.build.distribution == 'rpm') { - - signArtifacts( - artifactPath: "rpm/dist/${filename}", - sigtype: '.rpm', - platform: 'linux' - ) - - buildYumRepo( - baseUrl: baseUrl, - buildManifest: args.buildManifest - ) - } -} diff --git a/vars/assembleUpload.groovy b/vars/assembleUpload.groovy deleted file mode 100644 index 979c502110..0000000000 --- a/vars/assembleUpload.groovy +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -void call(Map args = [:]) { - - lib = library(identifier: 'jenkins@20211123', retriever: legacySCM(scm)) - - assembleManifest(args) - uploadArtifacts(args) -} diff --git a/vars/buildArchive.groovy b/vars/buildArchive.groovy deleted file mode 100644 index 1879474536..0000000000 --- a/vars/buildArchive.groovy +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -void call(Map args = [:]) { - def lib = library(identifier: 'jenkins@20211123', retriever: legacySCM(scm)) - buildManifest(args) - - String stashName = "${args.stashName}" - echo "Stashing builds to assemble later with name: ${stashName}" - stash includes: "${args.distribution}/builds/**", name: "${stashName}" - - lib.jenkins.Messages.new(this).add("${STAGE_NAME}", "Built ${STAGE_NAME}.") - -} diff --git a/vars/buildAssembleUpload.groovy b/vars/buildAssembleUpload.groovy deleted file mode 100644 index a44d9e7197..0000000000 --- a/vars/buildAssembleUpload.groovy +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -def call(Map args = [:]) { - def lib = library(identifier: 'jenkins@20211123', retriever: legacySCM(scm)) - def inputManifestObj = lib.jenkins.InputManifest.new(readYaml(file: args.inputManifest)) - - buildManifest(args) - - String buildManifest = "${args.distribution}/builds/${inputManifestObj.build.getFilename()}/manifest.yml" - def buildManifestObj = lib.jenkins.BuildManifest.new(readYaml(file: buildManifest)) - - assembleUpload( - args + [ - buildManifest: buildManifest, - ] - ) - - return buildManifestObj -} diff --git a/vars/buildDockerImage.groovy b/vars/buildDockerImage.groovy deleted file mode 100644 index 6f092d5a65..0000000000 --- a/vars/buildDockerImage.groovy +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -void call(Map args = [:]) { - def lib = library(identifier: 'jenkins@20211123', retriever: legacySCM(scm)) - def inputManifest = lib.jenkins.InputManifest.new(readYaml(file: args.inputManifest)) - def build_qualifier = inputManifest.build.qualifier - def build_number = args.buildNumber ?: "${BUILD_NUMBER}" - - if (build_qualifier != null && build_qualifier != 'null') { - build_qualifier = "-" + build_qualifier - } - else { - build_qualifier = '' - } - String filename = inputManifest.build.getFilename() - - if (args.artifactUrlX64 == null || args.artifactUrlArm64 == null) { - echo 'Skipping docker build, one of x64 or arm64 artifacts was not built.' - } else { - echo 'Trigger docker-build' - dockerBuild: { - build job: 'docker-build', - parameters: [ - string(name: 'DOCKER_BUILD_GIT_REPOSITORY', value: 'https://github.com/opensearch-project/opensearch-build'), - string(name: 'DOCKER_BUILD_GIT_REPOSITORY_REFERENCE', value: 'main'), - string(name: 'DOCKER_BUILD_SCRIPT_WITH_COMMANDS', value: [ - 'id', - 'pwd', - 'cd docker/release', - "curl -sSL ${args.artifactUrlX64} -o ${filename}-x64.tgz", - "curl -sSL ${args.artifactUrlArm64} -o ${filename}-arm64.tgz", - [ - 'bash', - 'build-image-multi-arch.sh', - "-v ${inputManifest.build.version}${build_qualifier}", - "-f ./dockerfiles/${filename}.al2.dockerfile", - "-p ${filename}", - "-a 'x64,arm64'", - "-r opensearchstaging/${filename}", - "-t '${filename}-x64.tgz,${filename}-arm64.tgz'", - "-n ${build_number}" - ].join(' ') - ].join(' && ')), - ] - } - - echo 'Trigger docker create tag with build number' - if (args.buildOption == "build_docker_with_build_number_tag") { - dockerCopy: { - build job: 'docker-copy', - parameters: [ - string(name: 'SOURCE_IMAGE_REGISTRY', value: 'opensearchstaging'), - string(name: 'SOURCE_IMAGE', value: "${filename}:${inputManifest.build.version}${build_qualifier}"), - string(name: 'DESTINATION_IMAGE_REGISTRY', value: 'opensearchstaging'), - string(name: 'DESTINATION_IMAGE', value: "${filename}:${inputManifest.build.version}${build_qualifier}.${build_number}") - ] - } - } - - echo "Trigger docker-scan for ${filename} version ${inputManifest.build.version}" - dockerScan: { - build job: 'docker-scan', - parameters: [ - string(name: 'IMAGE_FULL_NAME', value: "opensearchstaging/${filename}:${inputManifest.build.version}") - ] - } - - } -} diff --git a/vars/buildFailureMessage.groovy b/vars/buildFailureMessage.groovy deleted file mode 100644 index 2887f86975..0000000000 --- a/vars/buildFailureMessage.groovy +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -import com.cloudbees.groovy.cps.NonCPS -import org.apache.commons.io.IOUtils -@NonCPS -def call(){ - String ERROR_STRING = "Error building" - List message = [] - Reader performance_log = currentBuild.getRawBuild().getLogReader() - String logContent = IOUtils.toString(performance_log) - performance_log.close() - performance_log = null - logContent.eachLine() { line -> - line=line.replace("\"", "") - //Gets the exact match for Error building - def java.util.regex.Matcher match = (line =~ /$ERROR_STRING.*/) - if (match.find()) { - line=match[0] - message.add(line) - } - } - //if no match returns as Build failed - if(message.isEmpty()){ - message=["Build failed"] - } - return message -} diff --git a/vars/buildInfoYaml.groovy b/vars/buildInfoYaml.groovy deleted file mode 100644 index fc7ced7aa1..0000000000 --- a/vars/buildInfoYaml.groovy +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -def call(Map args = [:]) { - - try { - unstash "buildInfo_yml" - } catch(Exception ex) { - echo("No buildInfo.yml exists in stashed. Starting initialize the buildInfo yaml file.") - } - - def inputManifest = args.inputManifest ?: "buildInfo.yml" - def sourceyml = readYaml(file: inputManifest) - def outputyml = args.outputyml ?: "buildInfo.yml" - def components = args.componentName - def componentsList = [] - def status = args.status - echo("The status is $status") - echo("Components is $components") - if (!components.isEmpty()) { - echo ("Components parameter is not null") - for (component in components.split(" ")) { - componentsList.add(component.trim()) - } - } else { - echo ("Components parameter is null") - sourceyml.components.each { component -> - componentsList.add(component.name) - } - } - echo (componentsList.toString()) - - if (args.stage == "INITIALIZE_STAGE") { - echo("Initiate the build info yaml file.") - sourceyml.build.status = "IN_PROGRESS" - sourceyml.build.number = "${BUILD_NUMBER}" - sourceyml.results = [:] - sourceyml.results.startTimestamp = currentBuild.startTimeInMillis - } else if (args.stage == "FINALIZE_STAGE") { - sourceyml.components.each { component -> - if (componentsList.contains(component.name)) { - // Convert ref from branch to commit - dir(component.name) { - checkout([$class: 'GitSCM', branches: [[name: component.ref]], - userRemoteConfigs: [[url: component.repository]]]) - def commitID = sh( - script: "git rev-parse HEAD", - returnStdout: true - ).trim() - component.ref = commitID - } - } - } - sourceyml.build.status = status - sourceyml.results.duration = currentBuild.duration - } else { - stageField = args.stage - echo("stage is $stageField") - echo("status is $status") - sourceyml.results.("$stageField".toString()) = status - } - writeYaml(file: outputyml, data: sourceyml, overwrite: true) - sh ("cat $outputyml") - stash includes: "buildInfo.yml", name: "buildInfo_yml" -} diff --git a/vars/buildManifest.groovy b/vars/buildManifest.groovy deleted file mode 100644 index 17f19f7fc8..0000000000 --- a/vars/buildManifest.groovy +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -void call(Map args = [:]) { - sh(([ - './build.sh', - args.inputManifest ?: "manifests/${INPUT_MANIFEST}", - args.distribution ? "-d ${args.distribution}" : null, - args.componentName ? "--component ${args.componentName}" : null, - args.platform ? "-p ${args.platform}" : null, - args.architecture ? "-a ${args.architecture}" : null, - args.snapshot ? '--snapshot' : null, - args.lock ? '--lock' : null - ] - null).join(' ')) -} diff --git a/vars/buildUploadManifestSHA.groovy b/vars/buildUploadManifestSHA.groovy deleted file mode 100644 index 9aae65a155..0000000000 --- a/vars/buildUploadManifestSHA.groovy +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -void call(Map args = [:]) { - lib = library(identifier: 'jenkins@20211123', retriever: legacySCM(scm)) - - def sha = getManifestSHA(args) - - withCredentials([ - string(credentialsId: 'jenkins-artifact-bucket-name', variable: 'ARTIFACT_BUCKET_NAME'), - string(credentialsId: 'jenkins-aws-account-public', variable: 'AWS_ACCOUNT_PUBLIC')]) { - withAWS(role: 'opensearch-bundle', roleAccount: "${AWS_ACCOUNT_PUBLIC}", duration: 900, roleSessionName: 'jenkins-session') { - s3Upload(bucket: "${ARTIFACT_BUCKET_NAME}", file: sha.lock, path: sha.path) - } - } - -} diff --git a/vars/buildYumRepo.groovy b/vars/buildYumRepo.groovy deleted file mode 100644 index 58fcb8fe58..0000000000 --- a/vars/buildYumRepo.groovy +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -void call(Map args = [:]) { - lib = library(identifier: 'jenkins@20211123', retriever: legacySCM(scm)) - - def buildManifest = lib.jenkins.BuildManifest.new(readYaml(file: args.buildManifest)) - echo "Create yum repo metadata and repo file ${args.buildManifest}" - - def filename = buildManifest.build.getFilename() - def name = buildManifest.build.name - def version = buildManifest.build.version - def repoFilePath = "rpm/dist/${filename}" - - sh([ - 'createrepo', - "\"${repoFilePath}\"", - ].join(' ')) - - def repoFileContent = [ - "[${filename}-${version}-${BUILD_NUMBER}-staging]", - "name=${name} ${version} ${BUILD_NUMBER} Staging", - "baseurl=${args.baseUrl}/${repoFilePath}/", - "enabled=1", - "gpgcheck=0", - "autorefresh=1", - "type=rpm-md" - ].join('\n') - - writeFile file: "${repoFilePath}/${filename}-${version}.staging.repo", text: repoFileContent -} diff --git a/vars/copyContainer.groovy b/vars/copyContainer.groovy deleted file mode 100644 index b3c34ccaad..0000000000 --- a/vars/copyContainer.groovy +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -/**@ - * Copies a container from one docker registry to another - * - * @param args A map of the following parameters - * @param args.sourceImage The Source Image name and tag : Eg: opensearch:1.3.2 - * @param args.sourceRegistry The source docker registry, currently supports 'DockerHub' or 'ECR' - * @param args.destinationImage The Destination Image name and tag : Eg: opensearch:1.3.2 - * @param args.destinationRegistry The destination docker registry, currently supports 'DockerHub' or 'ECR' - */ -void call(Map args = [:]) { - - - if (args.destinationRegistry == 'opensearchstaging' || args.destinationRegistry == 'opensearchproject') { - def dockerJenkinsCredential = args.destinationRegistry == 'opensearchproject' ? "jenkins-production-dockerhub-credential" : "jenkins-staging-dockerhub-credential" - withCredentials([usernamePassword(credentialsId: dockerJenkinsCredential, usernameVariable: 'DOCKER_USERNAME', passwordVariable: 'DOCKER_PASSWORD')]) { - def dockerLogin = sh(returnStdout: true, script: "echo $DOCKER_PASSWORD | docker login --username $DOCKER_USERNAME --password-stdin").trim() - sh """ - gcrane cp ${args.sourceRegistry}/${args.sourceImage} ${args.destinationRegistry}/${args.destinationImage} - docker logout - """ - } - } - if (args.destinationRegistry == 'public.ecr.aws/opensearchproject') { - withCredentials([ - string(credentialsId: 'jenkins-artifact-promotion-role', variable: 'ARTIFACT_PROMOTION_ROLE_NAME'), - string(credentialsId: 'jenkins-aws-production-account', variable: 'AWS_ACCOUNT_ARTIFACT')]) - { - withAWS(role: "${ARTIFACT_PROMOTION_ROLE_NAME}", roleAccount: "${AWS_ACCOUNT_ARTIFACT}", duration: 900, roleSessionName: 'jenkins-session') { - def ecrLogin = sh(returnStdout: true, script: "aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin ${args.destinationRegistry}").trim() - sh """ - gcrane cp ${args.sourceRegistry}/${args.sourceImage} ${args.destinationRegistry}/${args.destinationImage} - docker logout ${args.destinationRegistry} - """ - } - } - } - if(args.destinationRegistry == 'public.ecr.aws/opensearchstaging') { - def ecrLogin = sh(returnStdout: true, script: "aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin ${args.destinationRegistry}").trim() - sh """ - gcrane cp ${args.sourceRegistry}/${args.sourceImage} ${args.destinationRegistry}/${args.destinationImage} - docker logout ${args.destinationRegistry} - """ - } -} diff --git a/vars/createGithubIssue.groovy b/vars/createGithubIssue.groovy deleted file mode 100644 index b0df064925..0000000000 --- a/vars/createGithubIssue.groovy +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -def call(Map args = [:]){ - def failureMessages = args.message - List failedComponents = [] - - if (failureMessages.size() == 1 && failureMessages[0] == "Build failed") { - println("No component failed, skip creating github issue.") - } - else { - for(message in failureMessages.unique()){ - java.util.regex.Matcher match = (message =~ /(?<=\bcomponent\s).*/) - String matched = match[0] - println(matched.split(" ")[0].trim()) - failedComponents.add(matched.split(" ")[0].trim()) - } - - def yamlFile = readYaml(file: "manifests/${INPUT_MANIFEST}") - def currentVersion = yamlFile.build.version - - for(component in yamlFile.components){ - if (failedComponents.contains(component.name)) { - println("Component ${component.name} failed, creating github issue") - compIndex = failedComponents.indexOf(component.name) - create_issue(component.name, component.repository, currentVersion, failureMessages[compIndex]) - sleep(time:3,unit:"SECONDS") - } - } - } -} - -def create_issue(component, url, currentVersion, failedMessage){ - def versionLabel = "v${currentVersion}" - def label = "autocut" - - def message = """***Received Error***: **${failedMessage}**. - The distribution build for ${component} has failed. - Please see build log at ${BUILD_URL}consoleFull""".stripIndent() - - - try { - withCredentials([usernamePassword(credentialsId: 'jenkins-github-bot-token', passwordVariable: 'GITHUB_TOKEN', usernameVariable: 'GITHUB_USER')]) { - def issues = sh ( - script: "gh issue list --repo ${url} -S \"[AUTOCUT] OS Distribution Build Failed for ${component}-${currentVersion} in:title\" --label ${label}", - returnStdout: true - ) - - def hasLabel = sh ( - script: "gh label list --repo ${url} -S ${versionLabel}", - returnStdout: true - ) - - if (hasLabel){ - label = "\"autocut,${versionLabel}\"" - } - - if (issues){ - println("Issue already exists in the repository, skipping.") - } else { - sh ( - script: "gh issue create --title \"[AUTOCUT] OS Distribution Build Failed for ${component}-${currentVersion}\" --body \"${message}\" --label ${label} --repo ${url}", - returnStdout: true - ) - } - } - } catch (Exception ex) { - println(ex.getMessage()) - } -} diff --git a/vars/createReleaseTag.groovy b/vars/createReleaseTag.groovy deleted file mode 100644 index ec346a3982..0000000000 --- a/vars/createReleaseTag.groovy +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -def call(Map args = [:]) { - - def lib = library(identifier: 'jenkins@20211123', retriever: legacySCM(scm)) - def bundleManifestObj = lib.jenkins.BundleManifest.new(readYaml(file: args.distManifest)) - - def componentsName = bundleManifestObj.getNames() - def componetsNumber = componentsName.size() - def version = args.tagVersion - def untaggedRepoList = [] - echo "Creating $version release tag for $componetsNumber components in the manifest" - - withCredentials([usernamePassword(credentialsId: "${GITHUB_BOT_TOKEN_NAME}", usernameVariable: 'GITHUB_USER', passwordVariable: 'GITHUB_TOKEN')]) { - for (component in componentsName) { - def commitID = bundleManifestObj.getCommitId(component) - def repo = bundleManifestObj.getRepo(component) - def push_url = "https://$GITHUB_TOKEN@" + repo.minus('https://') - echo "Tagging $component at $commitID ..." - - dir (component) { - checkout([$class: 'GitSCM', branches: [[name: commitID]], - userRemoteConfigs: [[url: repo]]]) - def tagVersion = version - if (version.contains("-")) { - tagVersion = version.split("-").first() + ".0-" + version.split("-").last() - } else { - tagVersion = "$version.0" - } - if (component == "OpenSearch" || component == "OpenSearch-Dashboards" || component == "functionalTestDashboards") { - tagVersion = version - } - def tag_id = sh ( - script: "git ls-remote --tags $repo $tagVersion | awk 'NR==1{print \$1}'", - returnStdout: true - ).trim() - if (tag_id == "") { - echo "Creating $tagVersion tag for $component" - sh "git tag $tagVersion" - def push_exit_id = sh ( - script: "git push $push_url $tagVersion", - returnStatus: true - ) - if (push_exit_id == 0) { - sh "git push $push_url $tagVersion" - } else { - untaggedRepoList.add(component) - } - } else if (tag_id == commitID) { - echo "Tag $tagVersion has been created with identical commit ID. Skipping creating new tag for $component." - } else { - error "Tag $tagVersion already existed in $component with a different commit ID. Please check this." - } - } - } - if (untaggedRepoList.size() != 0) { - error("Having issues creating tag in some repos. Please resolve it manually.\n " + - "List of untagged repos:\n $untaggedRepoList") - } - } -} diff --git a/vars/createSha512Checksums.groovy b/vars/createSha512Checksums.groovy deleted file mode 100644 index 2370e715c3..0000000000 --- a/vars/createSha512Checksums.groovy +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -Closure call() { - allowedFileTypes = [".tar.gz", ".zip", ".rpm"] - - return { argsMap -> body: { - - final foundFiles = sh(script: "find ${argsMap.artifactPath} -type f", returnStdout: true).split() - - for (file in foundFiles) { - acceptTypeFound = false - for (fileType in allowedFileTypes) { - if (file.endsWith(fileType)) { - echo("Creating sha for ${file}") - final sha512 = sh(script: "sha512sum ${file}", returnStdout: true).split() - //sha512 is an array [shasum, filename] - final basename = sh(script: "basename ${sha512[1]}", returnStdout: true) - // writing to file accroding to opensearch requirement - "512shaHashbasename" - writeFile file: "${file}.sha512", text: "${sha512[0]} ${basename}" - acceptTypeFound = true - break - } - } - if (!acceptTypeFound) { - if(foundFiles.length == 1){ - echo("Not generating sha for ${file} with artifact Path ${argsMap.artifactPath}, doesn't match allowed types ${allowedFileTypes}") - } else { - echo("Not generating sha for ${file} in ${argsMap.artifactPath}, doesn't match allowed types ${allowedFileTypes}") - } - } - } - - }} -} diff --git a/vars/createSignatureFiles.groovy b/vars/createSignatureFiles.groovy deleted file mode 100644 index 499121ff19..0000000000 --- a/vars/createSignatureFiles.groovy +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -Closure call() { - - lib = library(identifier: 'jenkins@20211123', retriever: legacySCM(scm)) - - return { args -> signArtifacts(args) } - -} diff --git a/vars/createTestResultsMessage.groovy b/vars/createTestResultsMessage.groovy deleted file mode 100644 index 28ffa5dde7..0000000000 --- a/vars/createTestResultsMessage.groovy +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -def call(Map args = [:]) { - String testType = args.testType - String status = args.status - String absoluteUrl = args.absoluteUrl - String icon = status == 'SUCCESS' ? ':white_check_mark:' : ':warning:' - - return "\n${testType}: ${icon} ${status} ${absoluteUrl}" -} diff --git a/vars/detectDockerAgent.groovy b/vars/detectDockerAgent.groovy deleted file mode 100644 index ea80340652..0000000000 --- a/vars/detectDockerAgent.groovy +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -Map call(Map args = [:]) { - def lib = library(identifier: "jenkins@20211123", retriever: legacySCM(scm)) - String manifest = args.manifest ?: "manifests/${INPUT_MANIFEST}" - def inputManifest = lib.jenkins.InputManifest.new(readYaml(file: manifest)) - dockerImage = inputManifest.ci?.image?.name ?: 'opensearchstaging/ci-runner:ci-runner-centos7-v1' - dockerArgs = inputManifest.ci?.image?.args - // Using default javaVersion as openjdk-17 - String javaVersion = 'openjdk-17' - java.util.regex.Matcher jdkMatch = (dockerArgs =~ /openjdk-\d+/) - if (jdkMatch.find()) { - def jdkMatchLine = jdkMatch[0] - javaVersion = jdkMatchLine - } - echo "Using Docker image ${dockerImage} (${dockerArgs})" - echo "Using java version ${javaVersion}" - return [ - image: dockerImage, - args: dockerArgs, - javaVersion: javaVersion - ] -} diff --git a/vars/detectTestDockerAgent.groovy b/vars/detectTestDockerAgent.groovy deleted file mode 100644 index 26237bbd43..0000000000 --- a/vars/detectTestDockerAgent.groovy +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -Map call(Map args = [:]) { - def lib = library(identifier: "jenkins@20211123", retriever: legacySCM(scm)) - String manifest = args.testManifest ?: "manifests/${TEST_MANIFEST}" - def testManifest = lib.jenkins.TestManifest.new(readYaml(file: manifest)) - dockerImage = testManifest.ci?.image?.name ?: 'opensearchstaging/ci-runner:ci-runner-centos7-v1' - dockerArgs = testManifest.ci?.image?.args - echo "Using Docker image ${dockerImage} (${dockerArgs})" - return [ - image: dockerImage, - args: dockerArgs - ] -} diff --git a/vars/downloadBuildManifest.groovy b/vars/downloadBuildManifest.groovy deleted file mode 100644 index 28c5b7b60c..0000000000 --- a/vars/downloadBuildManifest.groovy +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -def call(Map args = [:]) { - def lib = library(identifier: "jenkins@20211123", retriever: legacySCM(scm)) - - sh "curl -sSL ${args.url} --output ${args.path}" - def buildManifestObj = lib.jenkins.BuildManifest.new(readYaml(file: args.path)) - return buildManifestObj -} diff --git a/vars/downloadFromS3.groovy b/vars/downloadFromS3.groovy deleted file mode 100644 index 0257205cff..0000000000 --- a/vars/downloadFromS3.groovy +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -void call(Map args = [:]) { - withCredentials([string(credentialsId: 'jenkins-aws-account-public', variable: 'AWS_ACCOUNT_PUBLIC')]) { - withAWS(role: 'opensearch-bundle', roleAccount: "${AWS_ACCOUNT_PUBLIC}", duration: 900, roleSessionName: 'jenkins-session') { - s3Download(file: args.destPath, bucket: args.bucket, path: args.path, force: args.force) - } - } -} diff --git a/vars/getManifestSHA.groovy b/vars/getManifestSHA.groovy deleted file mode 100644 index 85786ffdbc..0000000000 --- a/vars/getManifestSHA.groovy +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -Map call(Map args = [:]) { - String inputManifest = args.inputManifest ?: "manifests/${INPUT_MANIFEST}" - String jobName = args.jobName ?: "${JOB_NAME}" - - buildManifest( - args + [ - inputManifest: inputManifest, - lock: true - ] - ) - - String manifestLock = "${inputManifest}.lock" - String manifestSHA = sha1(manifestLock) - echo "Manifest SHA: ${manifestSHA}" - - def lib = library(identifier: 'jenkins@20211123', retriever: legacySCM(scm)) - def inputManifestObj = lib.jenkins.InputManifest.new(readYaml(file: manifestLock)) - String shasRoot = inputManifestObj.getSHAsRoot(jobName) - String manifestSHAPath = "${shasRoot}/${manifestSHA}.yml" - echo "Manifest lock: ${manifestLock}" - echo "Manifest SHA path: ${manifestSHAPath}" - - Boolean manifestSHAExists = false - withCredentials([string(credentialsId: 'jenkins-aws-account-public', variable: 'AWS_ACCOUNT_PUBLIC'), - string(credentialsId: 'jenkins-artifact-bucket-name', variable: 'ARTIFACT_BUCKET_NAME')]) { - withAWS(role: 'opensearch-bundle', roleAccount: "${AWS_ACCOUNT_PUBLIC}", duration: 900, roleSessionName: 'jenkins-session') { - if (s3DoesObjectExist(bucket: "${ARTIFACT_BUCKET_NAME}", path: manifestSHAPath)) { - manifestSHAExists = true - } - } - } - - echo "Manifest SHA exists: ${manifestSHAExists}" - - return [ - sha: manifestSHA, - lock: manifestLock, - path: manifestSHAPath, - exists: manifestSHAExists - ] -} diff --git a/vars/postCleanup.groovy b/vars/postCleanup.groovy deleted file mode 100644 index 7db576ca8e..0000000000 --- a/vars/postCleanup.groovy +++ /dev/null @@ -1,11 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -void call(Map args = [:]) { - cleanWs(disableDeferredWipeout: true, deleteDirs: true) -} diff --git a/vars/printArtifactDownloadUrlsForStaging.groovy b/vars/printArtifactDownloadUrlsForStaging.groovy deleted file mode 100644 index 47143da00a..0000000000 --- a/vars/printArtifactDownloadUrlsForStaging.groovy +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -void call(Map args = [:]){ - - for(filename in args.artifactFileNames){ - url = "https://ci.opensearch.org/ci/dbc/${args.uploadPath}/${filename}" - echo "File ${filename} can be accessed using the url - ${url}" - } - -} diff --git a/vars/promoteArtifacts.groovy b/vars/promoteArtifacts.groovy deleted file mode 100644 index 61ca1d56e0..0000000000 --- a/vars/promoteArtifacts.groovy +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -void call(Map args = [:]) { - def lib = library(identifier: 'jenkins@20211123', retriever: legacySCM(scm)) - - // fileActions are a closure that accepts a String, filepath with return type void - List fileActions = args.fileActions ?: [] - - String manifest = args.manifest ?: "manifests/${INPUT_MANIFEST}" - def inputManifest = lib.jenkins.InputManifest.new(readYaml(file: manifest)) - String filename = inputManifest.build.getFilename() - String version = inputManifest.build.version - String qualifier = inputManifest.build.qualifier ? '-' + inputManifest.build.qualifier : '' - String revision = version + qualifier - println("Revision: ${revision}") - - List distributionList = ['tar', 'rpm'] - - withCredentials([string(credentialsId: 'jenkins-aws-account-public', variable: 'AWS_ACCOUNT_PUBLIC'), - string(credentialsId: 'jenkins-artifact-bucket-name', variable: 'ARTIFACT_BUCKET_NAME'), - string(credentialsId: 'jenkins-artifact-promotion-role', variable: 'ARTIFACT_PROMOTION_ROLE_NAME'), - string(credentialsId: 'jenkins-aws-production-account', variable: 'AWS_ACCOUNT_ARTIFACT'), - string(credentialsId: 'jenkins-artifact-production-bucket-name', variable: 'ARTIFACT_PRODUCTION_BUCKET_NAME')]) { - for (distribution in distributionList) { - // Must use local variable due to groovy for loop and closure scope - // Or the stage will fixed to the last item in return when trigger new stages - // https://web.archive.org/web/20181121065904/http://blog.freeside.co/2013/03/29/groovy-gotcha-for-loops-and-closure-scope/ - def distribution_local = distribution - def artifactPath = "${DISTRIBUTION_JOB_NAME}/${revision}/${DISTRIBUTION_BUILD_NUMBER}/${DISTRIBUTION_PLATFORM}/${DISTRIBUTION_ARCHITECTURE}/${distribution_local}" - def prefixPath = "${WORKSPACE}/artifacts/${distribution_local}" - println("S3 download ${distribution_local} artifacts before creating signatures") - - withAWS(role: 'opensearch-bundle', roleAccount: "${AWS_ACCOUNT_PUBLIC}", duration: 900, roleSessionName: 'jenkins-session') { - s3Download(bucket: "${ARTIFACT_BUCKET_NAME}", file: "${prefixPath}", path: "${artifactPath}/", force: true) - } - - String build_manifest = "$prefixPath/$artifactPath/builds/$filename/manifest.yml" - def buildManifest = readYaml(file: build_manifest) - - argsMap = [:] - argsMap['sigtype'] = '.sig' - - String corePluginDir = "$prefixPath/$artifactPath/builds/$filename/core-plugins" - boolean corePluginDirExists = fileExists(corePluginDir) - - //////////// Signing Artifacts - println('Signing Starts') - - if (corePluginDirExists && distribution_local.equals('tar')) { - println('Signing Core Plugins') - argsMap['artifactPath'] = corePluginDir - for (Closure action : fileActions) { - action(argsMap) - } - } - - println('Signing Core/Bundle Artifacts') - String coreFullPath = ['core', filename, revision].join('/') - String bundleFullPath = ['bundle', filename, revision].join('/') - for (Closure action : fileActions) { - for (file in findFiles(glob: "**/${filename}-min-${revision}*.${distribution_local}*,**/${filename}-${revision}*.${distribution_local}*")) { - argsMap['artifactPath'] = "$WORKSPACE" + '/' + file.getPath() - action(argsMap) - } - } - - //////////// Uploading Artifacts - withAWS(role: "${ARTIFACT_PROMOTION_ROLE_NAME}", roleAccount: "${AWS_ACCOUNT_ARTIFACT}", duration: 900, roleSessionName: 'jenkins-session') { - // Core Plugins only needs to be published once through Tar, ignore other distributions - if (corePluginDirExists && distribution_local.equals('tar')) { - List corePluginList = buildManifest.components.artifacts.'core-plugins'[0] - for (String pluginSubPath : corePluginList) { - String pluginSubFolder = pluginSubPath.split('/')[0] - String pluginNameWithExt = pluginSubPath.split('/')[1] - String pluginName = pluginNameWithExt.replace('-' + revision + '.zip', '') - String pluginNameNoExt = pluginNameWithExt.replace('-' + revision, '') - String pluginFullPath = ['plugins', pluginName, revision].join('/') - s3Upload( - bucket: "${ARTIFACT_PRODUCTION_BUCKET_NAME}", - path: "releases/$pluginFullPath/", - workingDir: "$prefixPath/$artifactPath/builds/$filename/core-plugins/", - includePathPattern: "**/${pluginName}*" - ) - } - } - - // We will only publish min artifacts for Tar, ignore other distributions - if (distribution_local.equals('tar')) { - s3Upload( - bucket: "${ARTIFACT_PRODUCTION_BUCKET_NAME}", - path: "releases/$coreFullPath/", - workingDir: "$prefixPath/$artifactPath/builds/$filename/dist/", - includePathPattern: "**/${filename}-min-${revision}-${DISTRIBUTION_PLATFORM}-${DISTRIBUTION_ARCHITECTURE}*") - } - - // We will publish bundle artifacts for all distributions - s3Upload( - bucket: "${ARTIFACT_PRODUCTION_BUCKET_NAME}", - path: "releases/$bundleFullPath/", - workingDir: "$prefixPath/$artifactPath/dist/$filename/", - includePathPattern: "**/${filename}-${revision}-${DISTRIBUTION_PLATFORM}-${DISTRIBUTION_ARCHITECTURE}*") - } - } - } -} diff --git a/vars/promoteContainer.groovy b/vars/promoteContainer.groovy deleted file mode 100644 index d6d9b35ae8..0000000000 --- a/vars/promoteContainer.groovy +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -/**@ - * Promote image from staging docker to production docker hub or ECR repository. - * - * @param args A map of the following parameters - * @param args.imageRepository The repository of staging image. E.g.: opensearch:2.0.1.3910, opensearch-dashboards:2.0.1, data-prepper:2.0.1-1234 - * @param args.version The official version for release. E.g.: 2.0.1 - * @param args.dockerPromote The boolean argument if promote containers from staging to production docker repo. - * @param args.ecrPromote The boolean argument if promote containers from staging to production ECR repo. - * @param args.latestTag The boolean argument if promote containers from staging to production with latest tag. - * @param args.majorVersionTag The boolean argument if promote containers from staging to production with its major version tag. - */ -void call(Map args = [:]) { - - def imageRepo = args.imageRepository - def version = args.version - def imageProduct = imageRepo.split(':').first() - def sourceTag = imageRepo.split(':').last() - def dockerPromote = args.dockerPromote - def ecrPromote = args.ecrPromote - def latestBoolean = args.latestTag - def majorVersionBoolean = args.majorVersionTag - def majorVersion = version.split("\\.").first() - - def sourceReg = (imageProduct == 'data-prepper') ? "${DATA_PREPPER_STAGING_CONTAINER_REPOSITORY}" : "opensearchstaging" - def dockerProduction = "opensearchproject" - def ecrProduction = "public.ecr.aws/opensearchproject" - - //Promoting docker images - if (dockerPromote.toBoolean()) { - println("Promoting $imageProduct to production docker hub with with $version tag.") - dockerCopy: { - build job: 'docker-copy', - parameters: [ - string(name: 'SOURCE_IMAGE_REGISTRY', value: sourceReg), - string(name: 'SOURCE_IMAGE', value: "${imageProduct}:${sourceTag}"), - string(name: 'DESTINATION_IMAGE_REGISTRY', value: dockerProduction), - string(name: 'DESTINATION_IMAGE', value: "${imageProduct}:${version}") - ] - } - if (majorVersionBoolean.toBoolean()) { - println("Promoting to production docker hub with with $majorVersion tag.") - dockerCopy: { - build job: 'docker-copy', - parameters: [ - string(name: 'SOURCE_IMAGE_REGISTRY', value: sourceReg), - string(name: 'SOURCE_IMAGE', value: "${imageProduct}:${sourceTag}"), - string(name: 'DESTINATION_IMAGE_REGISTRY', value: dockerProduction), - string(name: 'DESTINATION_IMAGE', value: "${imageProduct}:${majorVersion}") - ] - } - } - if (latestBoolean.toBoolean()) { - println("Promoting to production docker hub with with latest tag.") - dockerCopy: { - build job: 'docker-copy', - parameters: [ - string(name: 'SOURCE_IMAGE_REGISTRY', value: sourceReg), - string(name: 'SOURCE_IMAGE', value: "${imageProduct}:${sourceTag}"), - string(name: 'DESTINATION_IMAGE_REGISTRY', value: dockerProduction), - string(name: 'DESTINATION_IMAGE', value: "${imageProduct}:latest") - ] - } - } - } - //Promoting image to ECR - if (ecrPromote.toBoolean()) { - println("Promoting to production ECR with with $version tag.") - dockerCopy: { - build job: 'docker-copy', - parameters: [ - string(name: 'SOURCE_IMAGE_REGISTRY', value: sourceReg), - string(name: 'SOURCE_IMAGE', value: "${imageProduct}:${sourceTag}"), - string(name: 'DESTINATION_IMAGE_REGISTRY', value: ecrProduction), - string(name: 'DESTINATION_IMAGE', value: "${imageProduct}:${version}") - ] - } - if (majorVersionBoolean.toBoolean()) { - println("Promoting to production ECR with with $majorVersion tag.") - dockerCopy: { - build job: 'docker-copy', - parameters: [ - string(name: 'SOURCE_IMAGE_REGISTRY', value: sourceReg), - string(name: 'SOURCE_IMAGE', value: "${imageProduct}:${sourceTag}"), - string(name: 'DESTINATION_IMAGE_REGISTRY', value: ecrProduction), - string(name: 'DESTINATION_IMAGE', value: "${imageProduct}:${majorVersion}") - ] - } - } - if (latestBoolean.toBoolean()) { - println("Promoting to production ECR with with latest tag.") - dockerCopy: { - build job: 'docker-copy', - parameters: [ - string(name: 'SOURCE_IMAGE_REGISTRY', value: sourceReg), - string(name: 'SOURCE_IMAGE', value: "${imageProduct}:${sourceTag}"), - string(name: 'DESTINATION_IMAGE_REGISTRY', value: ecrProduction), - string(name: 'DESTINATION_IMAGE', value: "${imageProduct}:latest") - ] - } - } - } -} diff --git a/vars/promoteYumRepos.groovy b/vars/promoteYumRepos.groovy deleted file mode 100644 index ab305a91df..0000000000 --- a/vars/promoteYumRepos.groovy +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -void call(Map args = [:]) { - def lib = library(identifier: 'jenkins@20211123', retriever: legacySCM(scm)) - - String manifest = args.manifest ?: "manifests/${INPUT_MANIFEST}" - def inputManifest = lib.jenkins.InputManifest.new(readYaml(file: manifest)) - - String filename = inputManifest.build.getFilename() - String jobname = args.jobName - - String buildnumber = args.buildNumber ?: 'none' - if (buildnumber == 'none') { - println('User did not enter build number in jenkins parameter, exit 1') - System.exit(1) - } - - String version = inputManifest.build.version - String majorVersion = version.tokenize('.')[0] - String yumRepoVersion = majorVersion + '.x' - String qualifier = inputManifest.build.qualifier ? '-' + inputManifest.build.qualifier : '' - String revision = version + qualifier - println("Product: ${filename}") - println("Build Number: ${buildnumber}") - println("Input Manifest: ${manifest}") - println("Revision: ${revision}") - println("Major Version: ${majorVersion}") - println("Yum Repo Version: ${yumRepoVersion}") - - String stagingYumPathX64 = "${PUBLIC_ARTIFACT_URL}/${jobname}/${revision}/${buildnumber}/linux/x64/rpm/dist/${filename}/${filename}-${revision}-linux-x64.rpm" - String stagingYumPathARM64 = "${PUBLIC_ARTIFACT_URL}/${jobname}/${revision}/${buildnumber}/linux/arm64/rpm/dist/${filename}/${filename}-${revision}-linux-arm64.rpm" - - String localPath = "${WORKSPACE}/artifacts" - String yumRepoProdPath = "releases/bundle/${filename}/${yumRepoVersion}/yum" - String artifactPath = "${localPath}/${yumRepoProdPath}" - - withCredentials([string(credentialsId: 'jenkins-artifact-promotion-role', variable: 'ARTIFACT_PROMOTION_ROLE_NAME'), - string(credentialsId: 'jenkins-aws-production-account', variable: 'AWS_ACCOUNT_ARTIFACT'), - string(credentialsId: 'jenkins-artifact-production-bucket-name', variable: 'ARTIFACT_PRODUCTION_BUCKET_NAME')]) { - withAWS(role: "${ARTIFACT_PROMOTION_ROLE_NAME}", roleAccount: "${AWS_ACCOUNT_ARTIFACT}", duration: 900, roleSessionName: 'jenkins-session') { - println('Pulling Prod Yumrepo') - sh("aws s3 sync s3://${ARTIFACT_PRODUCTION_BUCKET_NAME}/${yumRepoProdPath}/ ${artifactPath}/ --no-progress") - } - - sh """ - set -e - set +x - set +x - - echo "Pulling ${revision} rpms" - cd ${artifactPath} - curl -SLO ${stagingYumPathX64} - curl -SLO ${stagingYumPathARM64} - - ls -l - - rm -vf repodata/repomd.xml.asc - - echo "Update repo metadata" - createrepo --update . - - # Rename .xml to .pom for signing - # Please do not add .xml to signer filter - # As maven have many .xml and we do not want to sign them - # This is an outlier case for yum repo only - mv -v repodata/repomd.xml repodata/repomd.pom - - echo "Complete metadata update, awaiting signing repomd.xml" - - cd - - - """ - - signArtifacts( - artifactPath: "${artifactPath}/repodata/repomd.pom", - sigtype: '.sig', - platform: 'linux' - ) - - sh """ - set -e - set +x - - cd ${artifactPath}/repodata/ - - ls -l - - mv -v repomd.pom repomd.xml - mv -v repomd.pom.sig repomd.xml.sig - - # This step is required as yum only accept .asc and signing workflow only support .sig - cat repomd.xml.sig | gpg --enarmor | sed 's@ARMORED FILE@SIGNATURE@g' > repomd.xml.asc - - rm -vf repomd.xml.sig - - ls -l - - cd - - """ - - withAWS(role: "${ARTIFACT_PROMOTION_ROLE_NAME}", roleAccount: "${AWS_ACCOUNT_ARTIFACT}", duration: 900, roleSessionName: 'jenkins-session') { - println('Pushing Prod Yumrepo') - sh("aws s3 sync ${artifactPath}/ s3://${ARTIFACT_PRODUCTION_BUCKET_NAME}/${yumRepoProdPath}/ --no-progress") - } - } -} diff --git a/vars/publishNotification.groovy b/vars/publishNotification.groovy deleted file mode 100644 index b87818dd80..0000000000 --- a/vars/publishNotification.groovy +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -void call(Map args = [:]) { - text = ([ - "${args.icon}", - "JOB_NAME=${JOB_NAME}", - "BUILD_NUMBER=[${BUILD_NUMBER}]", - "MESSAGE=${args.message}", - "BUILD_URL: ${BUILD_URL}", - "MANIFEST: ${args.manifest}", - args.extra - ] - null).join("\n") - withCredentials([string(credentialsId: args.credentialsId, variable: 'WEBHOOK_URL')]) { - sh ([ - 'curl', - '-XPOST', - '--header "Content-Type: application/json"', - "--data '{\"result_text\":\"${text}\"}'", - "\"${WEBHOOK_URL}\"" - ].join(' ')) - } -} diff --git a/vars/rpmCommands.groovy b/vars/rpmCommands.groovy deleted file mode 100644 index 42ff56e744..0000000000 --- a/vars/rpmCommands.groovy +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -/** - * This is a helper method for package manager yum call. - * @param Map args = [:] - * args.command: The command that we want to run with SystemD. - * args.product: The name of the product we are testing for running status. - */ -def call(Map args = [:]) { - - def command = args.command - def product = args.product - def repoFileURL = args.repoFileURL - def subPubKeyURL = "https://artifacts.opensearch.org/publickeys/opensearch.pgp" - switch (command) { - case ("setup"): - sh ("cd /etc/yum.repos.d/ && curl -sSLO $repoFileURL && cd -") - sh ("curl -sSLO $subPubKeyURL && rpm --import opensearch.pgp") - break - case ("clean"): - sh ("yum clean all") - break - case ("download"): - sh ("yum install -y yum-utils && yumdownloader $product --destdir=$WORKSPACE/yum-download/") - break - case ("install"): - sh ("yum install -y $product") - break - case ("update"): - sh ("yum update -y $product") - break - case ("remove"): - sh ("yum remove -y $product") - } - -} diff --git a/vars/rpmDashboardsDistValidation.groovy b/vars/rpmDashboardsDistValidation.groovy deleted file mode 100644 index 3add49fc51..0000000000 --- a/vars/rpmDashboardsDistValidation.groovy +++ /dev/null @@ -1,149 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -/** - * This is a general function for RPM distribution validation. - * @param Map args = [:] - * args.bundleManifest: The location of the distribution manifest. - * args.rpmDistribution: The location of the RPM distribution file. - */ -def call(Map args = [:]) { - - def lib = library(identifier: 'jenkins@20211123', retriever: legacySCM(scm)) - def BundleManifestObj = lib.jenkins.BundleManifest.new(readYaml(file: args.bundleManifest)) - def distFile = args.rpmDistribution - def name = BundleManifestObj.build.getFilename() //opensearch-dashboards - def version = BundleManifestObj.build.version //2.0.0-rc1 - def rpmVersion = version.replace("-", ".") //2.0.0.rc1 - def architecture = BundleManifestObj.build.architecture - def plugin_names = BundleManifestObj.getNames(); - - // This is a reference meta data which the distribution should be consistent with. - def refMap = [:] - refMap['Name'] = name - refMap['Version'] = rpmVersion - refMap['Architecture'] = architecture - refMap['Group'] = "Application/Internet" - refMap['License'] = "Apache-2.0" - refMap['Relocations'] = "(not relocatable)" - refMap['URL'] = "https://opensearch.org/" - // The context of meta data should be for OSD - refMap['Summary'] = "Open source visualization dashboards for OpenSearch" - refMap['Description'] = "OpenSearch Dashboards is the visualization tool for data in OpenSearch\n" + - "For more information, see: https://opensearch.org/" - - //Validation for the Meta Data of distribution - rpmMetaValidation( - rpmDistribution: distFile, - refMap: refMap - ) - - //Validation for the installation - //Install the rpm distribution via yum - rpmCommands( - command: "install", - product: "opensearch-$rpmVersion" - ) - println("RPM distribution for OpenSearch $version is also installed with yum.") - rpmCommands( - command: "install", - product: "$name-$rpmVersion" - ) - println("RPM distribution for $name $version is installed with yum.") - - //Start the installed OpenSearch-Dashboards distribution - systemdCommands( - command: "start", - product: "opensearch" - ) - systemdCommands( - command: "start", - product: name - ) - - //Validate if the running status is succeed - def running_status = systemdCommands( - command: "status", - product: name - ) - def active_status_message = "Active: active (running)" - if (running_status.contains(active_status_message)) { - println("After checking the status, the installed $name is actively running!") - } else { - error("Something went run! Installed $name is not actively running.") - } - - // Get the OpenSearch-Dashboards api status after start. - def osd_status_json = -1 - for (int i = 0; i < 10; i++) { - if (osd_status_json != 0) { - sleep 10 - osd_status_json = sh ( - script: "curl -s \"http://localhost:5601/api/status\" -u admin:admin", - returnStatus: true - ) - } else { - osd_status_json = sh ( - script: "curl -s \"http://localhost:5601/api/status\" -u admin:admin", - returnStdout: true - ).trim() - break - } - } - println("Dashboards status are: \n" + osd_status_json) - def osd_status = readJSON(text: osd_status_json) - assert osd_status["version"]["number"] == version - println("Dashboards host version has been validated.") - assert osd_status["status"]["overall"]["state"] == "green" - println("OpenSearch Dashboards overall state is running green.") - - //Plugin existence validation; - def osd_plugins = sh ( - script: "/usr/share/opensearch-dashboards/bin/opensearch-dashboards-plugin list --allow-root", - returnStdout: true - ).trim() - println("osd_plugins are: \n" + osd_plugins) - def components_list = [] - for (component in plugin_names) { - if (component == "OpenSearch-Dashboards" || component == "functionalTestDashboards") { - continue - } - def location = BundleManifestObj.getLocation(component) - def component_name_with_version = location.split('/').last().minus('.zip') //e.g. anomalyDetectionDashboards-2.0.0-rc1 - components_list.add(component_name_with_version) - } - for (component in components_list) { - def component_name = component.split("-").first() - def component_version = component.minus(component_name + "-") - if (component_version.contains("-")) { //It has qualifier - component_version = component_version.split("-").first() + ".0-" + component_version.split("-").last() - } else { - component_version = component_version + ".0" - } - def component_with_version = [component_name, component_version].join("@") //e.g. anomalyDetectionDashboards@2.0.0.0-rc1 - assert osd_plugins.contains(component_with_version) - println("Component $component is present with correct version $version." ) - } - - systemdCommands( - command: "stop", - product: name - ) - rpmCommands( - command: "remove", - product: "opensearch-dashboards" - ) - systemdCommands( - command: "stop", - product: "opensearch" - ) - rpmCommands( - command: "remove", - product: "opensearch" - ) -} diff --git a/vars/rpmDistValidation.groovy b/vars/rpmDistValidation.groovy deleted file mode 100644 index 79ef200b99..0000000000 --- a/vars/rpmDistValidation.groovy +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -/** - * This is a general function for RPM distribution validation. - * @param Map args = [:] - * args.bundleManifestURL: The CI URL of the distribution manifest. - */ -def call(Map args = [:]) { - - def lib = library(identifier: 'jenkins@20211123', retriever: legacySCM(scm)) - def bundleManifestURL = args.bundleManifestURL - sh ("curl -sL $bundleManifestURL -o $WORKSPACE/manifest.yml") - def bundleManifest = "$WORKSPACE/manifest.yml" - - def BundleManifestObj = lib.jenkins.BundleManifest.new(readYaml(file: "$bundleManifest")) - def name = BundleManifestObj.build.getFilename() //opensearch; opensearch-dashboards - def version = BundleManifestObj.build.version //2.0.0-rc1 - def rpmVersion = version.replace("-", ".") //2.0.0.rc1 - def architecture = BundleManifestObj.build.architecture - - def repoFileURLBackend = "https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/$version/latest/linux/$architecture/rpm/dist/opensearch/opensearch-${version}.staging.repo" - def repoFileURLProduct = bundleManifestURL.replace("manifest.yml", "${name}-${version}.staging.repo") - - rpmCommands( - command: "setup", - repoFileURL: "$repoFileURLBackend" - ) - rpmCommands( - command: "setup", - repoFileURL: "$repoFileURLProduct" - ) - rpmCommands( - command: "clean" - ) - rpmCommands( - command: "download", - product: "$name-$rpmVersion" - ) - def distFileName = sh( - script: "ls $WORKSPACE/yum-download/", - returnStdout: true - ).trim() - def distFile = "$WORKSPACE/yum-download/$distFileName" - - if (BundleManifestObj.build.distribution != 'rpm') { - error("Invalid distribution manifest. Please input the correct one.") - } - - //Validation for the Name convention - println("Name convention for distribution file starts:") - println("The file name is : $distFileName") //e.g. opensearch-2.0.0.rc1-linux-x64.rpm - if (!distFileName.endsWith(".rpm")) { - error("This isn't a valid rpm distribution.") - } - def refFileName = BundleManifestObj.build.getBuildLocation().split('/').last() - println("Name from the manifest is $refFileName") - assert distFileName == refFileName - println("File name for the RPM distribution has been validated.") - - if (name == "opensearch") { - rpmOpenSearchDistValidation( - bundleManifest: bundleManifest, - rpmDistribution: distFile - ) - } else { - rpmDashboardsDistValidation( - bundleManifest: bundleManifest, - rpmDistribution: distFile - ) - } -} diff --git a/vars/rpmMetaValidation.groovy b/vars/rpmMetaValidation.groovy deleted file mode 100644 index a642fa8663..0000000000 --- a/vars/rpmMetaValidation.groovy +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -/** - * This is a general function for RPM distribution validation. - * @param Map args = [:] - * args.refMap: The Map contains the expected meta data from the Manifest. - * args.rpmDistribution: The location of the RPM distribution file. - */ -def call(Map args = [:]) { - - def distFile = args.rpmDistribution - def refMap = args.refMap - - //Validation for the Meta Data of distribution - println("Meta data validations start:") - def metadata = sh ( - script: "rpm -qip $distFile", - returnStdout: true - ).trim() - println("Meta data for the RPM distribution is: \n" + metadata) - // Extract the meta data from the distribution to Map - def metaMap = [:] - for (line in metadata.split('\n')) { - def key = line.split(':')[0].trim() - if (key != 'Description') { - metaMap[key] = line.split(':', 2)[1].trim() - } else { - metaMap[key] = metadata.split(line)[1].trim() - break - } - } - // Start validating - refMap.each{ key, value -> - if (key == "Architecture") { - if (value == 'x64') { - assert metaMap[key] == 'x86_64' - } else if (value == 'arm64') { - assert metaMap[key] == 'aarch64' - } - } else { - assert metaMap[key] == value - } - println("Meta data for $key is validated") - } - println("Validation for meta data of RPM distribution completed.") - - // Validate the distribution signature - def checksig = sh ( - script: "rpm -K -v $distFile", - returnStdout: true - ).trim() - println("Signature check of the rpm distribution file is: \n" + checksig) - def keyList = ["Header V4 RSA/SHA512 Signature, key ID 9310d3fc", "Header SHA256 digest", - "Header SHA1 digest", "Payload SHA256 digest", - "V4 RSA/SHA512 Signature, key ID 9310d3fc", "MD5 digest"] - def presentKey = [] - for (line in checksig.split('\n')) { - def key = line.split(':')[0].trim() - if (key == distFile) { - continue - } else { - assert line.split(':', 2)[1].trim().contains("OK") - println(key + " is validated as: " + line) - presentKey.add(key) - } - } - println("Validation all key digests starts: ") - for (digest in keyList) { - assert presentKey.contains(digest) - println("Key digest \"$digest\" is validated to be present.") - } - println("Validation for signature of RPM distribution completed.") -} diff --git a/vars/rpmOpenSearchDistValidation.groovy b/vars/rpmOpenSearchDistValidation.groovy deleted file mode 100644 index 8cad00fdae..0000000000 --- a/vars/rpmOpenSearchDistValidation.groovy +++ /dev/null @@ -1,199 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -/** - * This is a general function for RPM distribution validation. - * @param Map args = [:] - * args.bundleManifest: The location of the distribution manifest. - * args.rpmDistribution: The location of the RPM distribution file. - */ -def call(Map args = [:]) { - - def lib = library(identifier: 'jenkins@20211123', retriever: legacySCM(scm)) - def BundleManifestObj = lib.jenkins.BundleManifest.new(readYaml(file: args.bundleManifest)) - def distFile = args.rpmDistribution - def name = BundleManifestObj.build.getFilename() //opensearch - def version = BundleManifestObj.build.version //2.0.0-rc1 - def rpmVersion = version.replace("-", ".") //2.0.0.rc1 - def architecture = BundleManifestObj.build.architecture - def plugin_names = BundleManifestObj.getNames(); - - // This is a reference meta data which the distribution should be consistent with. - def refMap = [:] - refMap['Name'] = name - refMap['Version'] = rpmVersion - refMap['Architecture'] = architecture - refMap['Group'] = "Application/Internet" - refMap['License'] = "Apache-2.0" - refMap['Relocations'] = "(not relocatable)" - refMap['URL'] = "https://opensearch.org/" - // The context the meta data should be for OpenSearch - refMap['Summary'] = "An open source distributed and RESTful search engine" - refMap['Description'] = "OpenSearch makes it easy to ingest, search, visualize, and analyze your data\n" + - "For more information, see: https://opensearch.org/" - - rpmMetaValidation( - rpmDistribution: distFile, - refMap: refMap - ) - - //Validation for the installation - //Install OpenSearch with designated version via yum - println("Start installation with yum.") - rpmCommands( - command: "install", - product: "$name-$rpmVersion" - ) - println("RPM distribution for $name is installed with yum.") - - //Check certs in /etc/opensearch/ - //The location of these certs are up to change based on the progress from Security. - println("Check if the certs are existed.") - sh ('[[ -d /etc/opensearch ]] && echo "/etc/opensearch directory exists"' + - '|| (echo "/etc/opensearch does not exist" && exit 1)') - def certs = sh ( - script: "ls /etc/opensearch", - returnStdout: true - ).trim() - def requiredCerts = ["esnode-key.pem", "kirk.pem", "esnode.pem", "kirk-key.pem", "root-ca.pem"] - requiredCerts.each { - if (certs.contains(it)){ - println("$it is found existed") - } else { - error("Error fail to find $it certificate.") - } - } - - //Check the install_demo_configuration.log - println("Start validating the install_demo_configuration.log.") - sh ('[[ -f /var/log/opensearch/install_demo_configuration.log ]] && echo "install_demo_configuration.log exists" ' + - '|| (echo "install_demo_configuration.log does not exist" && exit 1)') - def install_demo_configuration_log = sh ( - script: "cat /var/log/opensearch/install_demo_configuration.log", - returnStdout: true - ).trim() - if (install_demo_configuration_log.contains("Success")) { - println("install_demo_configuration.log validation succeed.") - } else { - println("install_demo_configuration.log failed.") - } - - //Start the installed OpenSearch distribution - systemdCommands( - command: "start", - product: name - ) - - //Validate if the running status is succeed - def running_status = systemdCommands( - command: "status", - product: name - ) - def active_status_message = "Active: active (running)" - if (running_status.contains(active_status_message)) { - println("After checking the status, the installed $name is actively running!") - } else { - error("Something went wrong! Installed $name is not actively running.") - } - - //Check the starting cluster - def cluster_info_json = sh ( - script: "curl -s \"https://localhost:9200\" -u admin:admin --insecure", - returnStdout: true - ).trim() - println("Cluster info is: \n" + cluster_info_json) - def cluster_info = readJSON(text: cluster_info_json) - assert cluster_info["cluster_name"] == name - println("Cluster name is validated.") - assert cluster_info["version"]["number"] == version - println("Cluster version is validated.") - assert cluster_info["version"]["build_type"] == 'rpm' - println("Cluster type is validated as rpm.") - println("Cluster information is validated.") - - //Cluster status validation - def cluster_status_json = sh ( - script: "curl -s \"https://localhost:9200/_cluster/health?pretty\" -u admin:admin --insecure", - returnStdout: true - ).trim() - println("Cluster status is: \n" + cluster_status_json) - def cluster_status = readJSON(text: cluster_status_json) - assert cluster_status["cluster_name"] == name - println("Cluster name is validated.") - assert cluster_status["status"] == "green" - println("Cluster status is green!") - - //Check the cluster plugins - def cluster_plugins = sh ( - script: "curl -s \"https://localhost:9200/_cat/plugins\" -u admin:admin --insecure", - returnStdout: true - ).trim().replaceAll("\"", "").replaceAll(",", "") - println("Cluster plugins are: \n" + cluster_plugins) - def components_list = [] - for (component in plugin_names) { - if (component == "OpenSearch" || component == "common-utils") { - continue - } - def location = BundleManifestObj.getLocation(component) - def component_name_with_version = location.split('/').last().minus('.zip') //e.g. opensearch-job-scheduler-2.0.0.0-rc1 - components_list.add(component_name_with_version) - } - for (line in cluster_plugins.split("\n")) { - def component_name = line.split("\\s+")[1].trim() - def component_version = line.split("\\s+")[2].trim() - assert components_list.contains([component_name,component_version].join('-')) - println("Component $component_name is present with correct version $component_version." ) - } - - //Check the status of Performance analyzer - //Check systemctl status - systemdCommands( - command: "start", - product: "opensearch-performance-analyzer" - ) - - echo "Sleep for few seconds before checking PA" - sleep(5) - - def running_status_PA = systemdCommands( - command: "status", - product: "opensearch-performance-analyzer" - ) - - if (running_status_PA.contains(active_status_message)) { - println("After checking the status, the Performance-analyzer plugin is actively running!") - } else { - error("Something went wrong! Performance-analyzer is not actively running.") - } - //Check logs exist in the /tmp/ - sh ('[[ -f /tmp/PerformanceAnalyzer.log ]] && echo "PerformanceAnalyzer.log exists" ' + - '|| (echo "PerformanceAnalyzer.log does not exist" && exit 1)') - sh ('[[ -f /tmp/performance_analyzer_agent_stats.log ]] && echo "performance_analyzer_agent_stats.log exists" ' + - '|| (echo "performance_analyzer_agent_stats.log does not exist" && exit 1)') - //Validate the metrics name is CPU_Utilization - def pa_metrics = sh ( - script: "curl -s localhost:9600/_plugins/_performanceanalyzer/metrics?metrics=CPU_Utilization\\&agg=avg", - returnStdout: true - ).trim() - println("PA metrics is: \n" + pa_metrics) - assert pa_metrics.contains("\"timestamp\"") - assert pa_metrics.contains("\"data\"") - println("Performance Analyzer is validated.") - - println("Installation and running for opensearch has been validated.") - - systemdCommands( - command: "stop", - product: name - ) - rpmCommands( - command: "remove", - product: "opensearch" - ) - -} diff --git a/vars/runBwcTestScript.groovy b/vars/runBwcTestScript.groovy deleted file mode 100644 index 4fcd6e6e8d..0000000000 --- a/vars/runBwcTestScript.groovy +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -void call(Map args = [:]) { - String jobName = args.jobName ?: 'distribution-build-opensearch' - lib = library(identifier: 'jenkins@20211123', retriever: legacySCM(scm)) - def buildManifest = lib.jenkins.BuildManifest.new(readYaml(file: args.buildManifest)) - String artifactRootUrl = buildManifest.getArtifactRootUrl(jobName, args.buildId) - echo "Artifact root URL: ${artifactRootUrl}" - - String paths = generatePaths(buildManifest, artifactRootUrl) - echo "Paths: ${paths}" - - sh([ - './test.sh', - 'bwc-test', - "${args.testManifest}", - "--test-run-id ${env.BUILD_NUMBER}", - "--paths ${paths}", - ].join(' ')) -} - -String generatePaths(buildManifest, artifactRootUrl) { - String name = buildManifest.build.name - return name == 'OpenSearch' ? - "opensearch=${artifactRootUrl}" : - "opensearch-dashboards=${artifactRootUrl}" -} diff --git a/vars/runGradleCheck.groovy b/vars/runGradleCheck.groovy deleted file mode 100644 index bd7f1dee14..0000000000 --- a/vars/runGradleCheck.groovy +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -void call(Map args = [:]) { - def lib = library(identifier: 'jenkins@20211123', retriever: legacySCM(scm)) - def git_repo_url = args.gitRepoUrl ?: 'null' - def git_reference = args.gitReference ?: 'null' - - println("Git Repo: ${git_repo_url}") - println("Git Reference: ${git_reference}") - - if (git_repo_url.equals('null') || git_reference.equals('null')) { - println("No git repo url or git reference to checkout the commit, exit 1") - System.exit(1) - } - else { - withCredentials([ - usernamePassword(credentialsId: "jenkins-gradle-check-s3-aws-credentials", usernameVariable: 'amazon_s3_access_key', passwordVariable: 'amazon_s3_secret_key'), - usernamePassword(credentialsId: "jenkins-gradle-check-s3-aws-resources", usernameVariable: 'amazon_s3_base_path', passwordVariable: 'amazon_s3_bucket')]) { - - sh """ - #!/bin/bash - - set -e - set +x - - echo "Git clone: ${git_repo_url} with ref: ${git_reference}" - rm -rf search - git clone ${git_repo_url} search - cd search/ - git checkout -f ${git_reference} - git rev-parse HEAD - - echo "Get Major Version" - OS_VERSION=`cat buildSrc/version.properties | grep opensearch | cut -d= -f2 | grep -oE '[0-9.]+'` - JDK_MAJOR_VERSION=`cat buildSrc/version.properties | grep "bundled_jdk" | cut -d= -f2 | grep -oE '[0-9]+' | head -n 1` - OS_MAJOR_VERSION=`echo \$OS_VERSION | grep -oE '[0-9]+' | head -n 1` - echo "Version: \$OS_VERSION, Major Version: \$OS_MAJOR_VERSION" - - echo "Using JAVA \$JDK_MAJOR_VERSION" - eval export JAVA_HOME='\$JAVA'\$JDK_MAJOR_VERSION'_HOME' - - env | grep JAVA | grep HOME - - echo "Gradle clean cache and stop existing gradledaemon" - ./gradlew --stop - rm -rf ~/.gradle - - echo "Check existing dockercontainer" - docker ps -a - docker stop `docker ps -qa` > /dev/null 2>&1 || echo - docker rm `docker ps -qa` > /dev/null 2>&1 || echo - echo "Stop existing dockercontainer" - docker ps -a - - echo "Check docker-compose version" - docker-compose version - - echo "Check existing processes" - ps -ef | grep [o]pensearch | wc -l - echo "Cleanup existing processes" - kill -9 `ps -ef | grep [o]pensearch | awk '{print \$2}'` > /dev/null 2>&1 || echo - ps -ef | grep [o]pensearch | wc -l - - echo "Start gradlecheck" - GRADLE_CHECK_STATUS=0 - ./gradlew clean && ./gradlew check -Dtests.coverage=true --no-daemon --no-scan || GRADLE_CHECK_STATUS=1 - - if [ "\$GRADLE_CHECK_STATUS" != 0 ]; then - echo Gradle Check Failed! - exit 1 - fi - - """ - } - - } - - -} diff --git a/vars/runIntegTestScript.groovy b/vars/runIntegTestScript.groovy deleted file mode 100644 index c90c2865cb..0000000000 --- a/vars/runIntegTestScript.groovy +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -void call(Map args = [:]) { - lib = library(identifier: 'jenkins@20211123', retriever: legacySCM(scm)) - - String jobName = args.jobName ?: 'distribution-build-opensearch' - def buildManifest = lib.jenkins.BuildManifest.new(readYaml(file: args.buildManifest)) - - String buildId = buildManifest.build.id - echo "Build Id: ${buildId}" - - String artifactRootUrl = buildManifest.getArtifactRootUrl(jobName, buildId) - echo "Artifact root URL: ${artifactRootUrl}" - - String localPath = args.localPath ?: 'None' - String paths = generatePaths(buildManifest, artifactRootUrl, localPath) - echo "Paths: ${paths}" - - String component = args.componentName - echo "Component: ${component}" - - sh([ - './test.sh', - 'integ-test', - "${args.testManifest}", - "--component ${component}", - "--test-run-id ${env.BUILD_NUMBER}", - "--paths ${paths}", - ].join(' ')) -} - -String generatePaths(buildManifest, artifactRootUrl, localPath) { - String name = buildManifest.build.name - String version = buildManifest.build.version - String platform = buildManifest.build.platform - String architecture = buildManifest.build.architecture - String distribution = buildManifest.build.distribution - - String latestOpenSearchArtifactRootUrl = "https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/${version}/latest/${platform}/${architecture}/${distribution}" - if (localPath.equals('None')) { - echo "No localPath found, download from url" - return name == 'OpenSearch' ? - "opensearch=${artifactRootUrl}" : - "opensearch=${latestOpenSearchArtifactRootUrl} opensearch-dashboards=${artifactRootUrl}" - } - else { - echo "User provides localPath, use local artifacts: ${localPath}" - return name == 'OpenSearch' ? - "opensearch=${localPath}" : - "opensearch=${localPath} opensearch-dashboards=${localPath}" - } -} diff --git a/vars/runPerfTestScript.groovy b/vars/runPerfTestScript.groovy deleted file mode 100644 index 7ebf4d85af..0000000000 --- a/vars/runPerfTestScript.groovy +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -void call(Map args = [:]) { - lib = library(identifier: 'jenkins@20211123', retriever: legacySCM(scm)) - def buildManifest = lib.jenkins.BuildManifest.new(readYaml(file: args.bundleManifest)) - - install_opensearch_infra_dependencies() - config_name = isNullOrEmpty(args.config) ? "config.yml" : args.config - withCredentials([string(credentialsId: 'jenkins-aws-account-public', variable: 'AWS_ACCOUNT_PUBLIC'), - string(credentialsId: 'jenkins-artifact-bucket-name', variable: 'ARTIFACT_BUCKET_NAME')]) { - withAWS(role: 'opensearch-test', roleAccount: "${AWS_ACCOUNT_PUBLIC}", duration: 900, roleSessionName: 'jenkins-session') { - s3Download(file: "config.yml", bucket: "${ARTIFACT_BUCKET_NAME}", path: "${PERF_TEST_CONFIG_LOCATION}/${config_name}", force: true) - } - } - - String stackNameSuffix = isNullOrEmpty(args.stackNameSuffix) ? 'perf-test' : args.stackNameSuffix - - withCredentials([usernamePassword(credentialsId: "${GITHUB_BOT_TOKEN_NAME}", usernameVariable: 'GITHUB_USER', passwordVariable: 'GITHUB_TOKEN')]) { - sh([ - './test.sh', - 'perf-test', - args.insecure ? "--stack test-single-${args.buildId}-${args.architecture}-${stackNameSuffix}" : - "--stack test-single-security-${args.buildId}-${args.architecture}-${stackNameSuffix}", - "--bundle-manifest ${args.bundleManifest}", - "--config config.yml", - args.insecure ? "--without-security" : "", - isNullOrEmpty(args.workload) ? "" : "--workload ${args.workload}", - isNullOrEmpty(args.testIterations) ? "" : "--test-iters ${args.testIterations}", - isNullOrEmpty(args.warmupIterations) ? "" : "--warmup-iters ${args.warmupIterations}", - isNullOrEmpty(args.component) ? "" : "--component ${args.component}" - ].join(' ')) - } -} - -boolean isNullOrEmpty(String str) { return (str == null || str.allWhitespace) } - -void install_opensearch_infra_dependencies() { - sh''' - pipenv install "dataclasses_json~=0.5" "aws_requests_auth~=0.4" "json2html~=1.3.0" - pipenv install "aws-cdk.core~=1.143.0" "aws_cdk.aws_ec2~=1.143.0" "aws_cdk.aws_iam~=1.143.0" - pipenv install "boto3~=1.18" "setuptools~=57.4" "retry~=0.9" - ''' -} diff --git a/vars/scanDockerImage.groovy b/vars/scanDockerImage.groovy deleted file mode 100644 index 24fa052766..0000000000 --- a/vars/scanDockerImage.groovy +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -void call(Map args = [:]) { - - sh """ - touch ${args.imageResultFile}.txt ${args.imageResultFile}.json - trivy image --clear-cache - trivy image --format table --output ${args.imageResultFile}.txt ${args.imageFullName} - trivy image --format json --output ${args.imageResultFile}.json ${args.imageFullName} - """ - -} diff --git a/vars/signArtifacts.groovy b/vars/signArtifacts.groovy deleted file mode 100644 index 60e0f4a048..0000000000 --- a/vars/signArtifacts.groovy +++ /dev/null @@ -1,168 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -/** -SignArtifacts signs the given artifacts and saves the signature in the same directory -@param Map[artifactPath] - Path to yml or artifact file. -@param Map[component] - Path to yml or artifact file. -@param Map[type] - Artifact type in the manifest, [type] is required for signing yml. -@param Map[sigtype] - The signature type of signing artifacts. e.g. '.sig'. Required for non-yml artifacts signing. -@param Map[platform] - The distribution platform for signing. -*/ -void call(Map args = [:]) { - if (args.sigtype.equals('.rpm')) { - withCredentials([ - string(credentialsId: 'jenkins-rpm-signing-account-number', variable: 'RPM_SIGNING_ACCOUNT_NUMBER'), - string(credentialsId: 'jenkins-rpm-signing-passphrase-secrets-arn', variable: 'RPM_SIGNING_PASSPHRASE_SECRETS_ARN'), - string(credentialsId: 'jenkins-rpm-signing-secret-key-secrets-arn', variable: 'RPM_SIGNING_SECRET_KEY_ID_SECRETS_ARN'), - string(credentialsId: 'jenkins-rpm-signing-key-id', variable: 'RPM_SIGNING_KEY_ID')]) { - echo 'RPM Add Sign' - - withAWS(role: 'jenkins-prod-rpm-signing-assume-role', roleAccount: "${RPM_SIGNING_ACCOUNT_NUMBER}", duration: 900, roleSessionName: 'jenkins-signing-session') { - sh """ - set -e - set +x - - ARTIFACT_PATH="${args.artifactPath}" - - echo "------------------------------------------------------------------------" - echo "Check Utility Versions" - gpg_version_requirement="2.2.0" - rpm_version_requirement="4.13.0" # https://bugzilla.redhat.com/show_bug.cgi?id=227632 - - gpg_version_check=`gpg --version | head -n 1 | grep -oE '[0-9.]+'` - gpg_version_check_final=`echo \$gpg_version_check \$gpg_version_requirement | tr ' ' '\n' | sort -V | head -n 1` - rpm_version_check=`rpm --version | head -n 1 | grep -oE '[0-9.]+'` - rpm_version_check_final=`echo \$rpm_version_check \$rpm_version_requirement | tr ' ' '\n' | sort -V | head -n 1` - - echo -e "gpg_version_requirement gpg_version_check" - echo -e "\$gpg_version_requirement \$gpg_version_check" - echo -e "rpm_version_requirement rpm_version_check" - echo -e "\$rpm_version_requirement \$rpm_version_check" - - if [[ \$gpg_version_requirement = \$gpg_version_check_final ]] && [[ \$rpm_version_requirement = \$rpm_version_check_final ]]; then - echo "Utility version is equal or greater than set limit, continue." - else - echo "Utility version is lower than set limit, exit 1" - exit 1 - fi - - export GPG_TTY=`tty` - - echo "------------------------------------------------------------------------" - echo "Setup RPM Macros" - cp -v scripts/pkg/sign_templates/rpmmacros ~/.rpmmacros - sed -i "s/##key_name##/OpenSearch project/g;s/##passphrase_name##/passphrase/g" ~/.rpmmacros - - echo "------------------------------------------------------------------------" - echo "Import OpenSearch keys" - aws secretsmanager get-secret-value --region us-west-2 --secret-id "${RPM_SIGNING_PASSPHRASE_SECRETS_ARN}" | jq -r .SecretBinary | base64 --decode > passphrase - aws secretsmanager get-secret-value --region us-west-2 --secret-id "${RPM_SIGNING_SECRET_KEY_ID_SECRETS_ARN}" | jq -r .SecretBinary | base64 --decode | gpg --quiet --import --pinentry-mode loopback --passphrase-file passphrase - - - echo "------------------------------------------------------------------------" - echo "Start Signing Rpm" - - if file \$ARTIFACT_PATH | grep -q directory; then - - echo "Sign directory" - for rpm_file in `ls \$ARTIFACT_PATH`; do - if file \$ARTIFACT_PATH/\$rpm_file | grep -q RPM; then - rpm --addsign \$ARTIFACT_PATH/\$rpm_file - rpm -qip \$ARTIFACT_PATH/\$rpm_file | grep Signature - fi - done - - elif file \$ARTIFACT_PATH | grep -q RPM; then - echo "Sign single rpm" - rpm --addsign \$ARTIFACT_PATH - rpm -qip \$ARTIFACT_PATH | grep Signature - - else - echo "This is neither a directory nor a RPM pkg, exit 1" - exit 1 - fi - - echo "------------------------------------------------------------------------" - echo "Clean up gpg" - gpg --batch --yes --delete-secret-keys ${RPM_SIGNING_KEY_ID} - gpg --batch --yes --delete-keys ${RPM_SIGNING_KEY_ID} - rm -v passphrase - - """ - } - } - } - else { - echo 'PGP or Windows Signature Signing' - - if (!fileExists("$WORKSPACE/sign.sh")) { - git url: 'https://github.com/opensearch-project/opensearch-build.git', branch: 'main' - } - - importPGPKey() - - String arguments = generateArguments(args) - - // Sign artifacts - // def configSecret = args.platform == "windows" ? "jenkins-signer-windows-config" : "jenkins-signer-client-creds" - if (args.platform == 'windows') { - withCredentials([usernamePassword(credentialsId: "${GITHUB_BOT_TOKEN_NAME}", usernameVariable: 'GITHUB_USER', passwordVariable: 'GITHUB_TOKEN'), - string(credentialsId: 'jenkins-signer-windows-role', variable: 'SIGNER_WINDOWS_ROLE'), - string(credentialsId: 'jenkins-signer-windows-external-id', variable: 'SIGNER_WINDOWS_EXTERNAL_ID'), - string(credentialsId: 'jenkins-signer-windows-unsigned-bucket', variable: 'SIGNER_WINDOWS_UNSIGNED_BUCKET'), - string(credentialsId: 'jenkins-signer-windows-signed-bucket', variable: 'SIGNER_WINDOWS_SIGNED_BUCKET'), - string(credentialsId: 'jenkins-signer-windows-profile-identifier', variable: 'SIGNER_WINDOWS_PROFILE_IDENTIFIER'), - string(credentialsId: 'jenkins-signer-windows-platform-identifier', variable: 'SIGNER_WINDOWS_PLATFORM_IDENTIFIER')]) { - sh """ - #!/bin/bash - set +x - export ROLE=$SIGNER_WINDOWS_ROLE - export EXTERNAL_ID=$SIGNER_WINDOWS_EXTERNAL_ID - export UNSIGNED_BUCKET=$SIGNER_WINDOWS_UNSIGNED_BUCKET - export SIGNED_BUCKET=$SIGNER_WINDOWS_SIGNED_BUCKET - export PROFILE_IDENTIFIER=$SIGNER_WINDOWS_PROFILE_IDENTIFIER - export PLATFORM_IDENTIFIER=$SIGNER_WINDOWS_PLATFORM_IDENTIFIER - - $WORKSPACE/sign.sh ${arguments} - """ - } - } - else { - withCredentials([usernamePassword(credentialsId: "${GITHUB_BOT_TOKEN_NAME}", usernameVariable: 'GITHUB_USER', passwordVariable: 'GITHUB_TOKEN'), - string(credentialsId: 'jenkins-signer-client-role', variable: 'SIGNER_CLIENT_ROLE'), - string(credentialsId: 'jenkins-signer-client-external-id', variable: 'SIGNER_CLIENT_EXTERNAL_ID'), - string(credentialsId: 'jenkins-signer-client-unsigned-bucket', variable: 'SIGNER_CLIENT_UNSIGNED_BUCKET'), - string(credentialsId: 'jenkins-signer-client-signed-bucket', variable: 'SIGNER_CLIENT_SIGNED_BUCKET')]) { - sh """ - #!/bin/bash - set +x - export ROLE=$SIGNER_CLIENT_ROLE - export EXTERNAL_ID=$SIGNER_CLIENT_EXTERNAL_ID - export UNSIGNED_BUCKET=$SIGNER_CLIENT_UNSIGNED_BUCKET - export SIGNED_BUCKET=$SIGNER_CLIENT_SIGNED_BUCKET - - $WORKSPACE/sign.sh ${arguments} - """ - } - } - } -} - -String generateArguments(args) { - String artifactPath = args.remove('artifactPath') - // artifactPath is mandatory and the first argument - String arguments = artifactPath - // generation command line arguments - args.each { key, value -> arguments += " --${key }=${value }" } - return arguments -} - -void importPGPKey() { - sh 'curl -sSL https://artifacts.opensearch.org/publickeys/opensearch.pgp | gpg --import -' -} diff --git a/vars/systemdCommands.groovy b/vars/systemdCommands.groovy deleted file mode 100644 index f09703556a..0000000000 --- a/vars/systemdCommands.groovy +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -/** - * This is a helper method for process manager systemD call. - * @param Map args = [:] - * args.command: The command that we want to run with SystemD. - * args.product: The name of the product we are testing for running status. - */ -def call(Map args = [:]) { - - def command = args.command - def product = args.product - switch (command) { - case ("status"): - //Validate if the running status is succeed - def running_status = sh ( - script: "systemctl status $product", - returnStdout: true - ).trim() - return running_status - break - case ("start"): - sh ("systemctl start $product") - break - case ("restart"): - sh ("systemctl restart $product") - break - case ("stop"): - sh ("systemctl stop $product") - } -} diff --git a/vars/uploadArtifacts.groovy b/vars/uploadArtifacts.groovy deleted file mode 100644 index a35230af13..0000000000 --- a/vars/uploadArtifacts.groovy +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -void call(Map args = [:]) { - def lib = library(identifier: 'jenkins@20211123', retriever: legacySCM(scm)) - - def buildManifest = lib.jenkins.BuildManifest.new(readYaml(file: args.buildManifest)) - def minArtifactPath = buildManifest.getMinArtifact() - def productFilename = buildManifest.build.getFilename() - def packageName = buildManifest.build.getPackageName() - def distribution = buildManifest.build.distribution - - def artifactPath = buildManifest.getArtifactRoot("${JOB_NAME}", "${BUILD_NUMBER}") - - withCredentials([ - string(credentialsId: 'jenkins-artifact-bucket-name', variable: 'ARTIFACT_BUCKET_NAME'), - string(credentialsId: 'jenkins-artifact-production-bucket-name', variable: 'ARTIFACT_PRODUCTION_BUCKET_NAME'), - string(credentialsId: 'jenkins-aws-production-account', variable: 'AWS_ACCOUNT_ARTIFACT'), - string(credentialsId: 'jenkins-artifact-promotion-role', variable: 'ARTIFACT_PROMOTION_ROLE_NAME')]) { - echo "Uploading to s3://${ARTIFACT_BUCKET_NAME}/${artifactPath}" - - uploadToS3( - sourcePath: "${distribution}/builds", - bucket: "${ARTIFACT_BUCKET_NAME}", - path: "${artifactPath}/builds" - ) - - uploadToS3( - sourcePath: "${distribution}/dist", - bucket: "${ARTIFACT_BUCKET_NAME}", - path: "${artifactPath}/dist" - ) - - echo "Uploading to s3://${ARTIFACT_PRODUCTION_BUCKET_NAME}/${artifactPath}" - - withAWS(role: "${ARTIFACT_PROMOTION_ROLE_NAME}", roleAccount: "${AWS_ACCOUNT_ARTIFACT}", duration: 900, roleSessionName: 'jenkins-session') { - s3Upload(file: "${distribution}/builds/${productFilename}/${minArtifactPath}", bucket: "${ARTIFACT_PRODUCTION_BUCKET_NAME}", path: "release-candidates/core/${productFilename}/${buildManifest.build.version}/") - s3Upload(file: "${distribution}/dist/${productFilename}/${packageName}", bucket: "${ARTIFACT_PRODUCTION_BUCKET_NAME}", path: "release-candidates/bundle/${productFilename}/${buildManifest.build.version}/") - } - } - - def baseUrl = buildManifest.getArtifactRootUrl("${PUBLIC_ARTIFACT_URL}", "${JOB_NAME}", "${BUILD_NUMBER}") - lib.jenkins.Messages.new(this).add("${STAGE_NAME}", [ - "${baseUrl}/builds/${productFilename}/manifest.yml", - "${baseUrl}/dist/${productFilename}/manifest.yml" - ].join('\n') - ) -} diff --git a/vars/uploadIndexFile.groovy b/vars/uploadIndexFile.groovy deleted file mode 100644 index 9c856ba633..0000000000 --- a/vars/uploadIndexFile.groovy +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -void call(Map args = [:]) { - def latestBuildData = ['latest': "${BUILD_NUMBER}"] - writeJSON file: 'index.json', json: latestBuildData - - withCredentials([string(credentialsId: 'jenkins-artifact-bucket-name', variable: 'ARTIFACT_BUCKET_NAME')]) { - echo "Uploading index.json to s3://${ARTIFACT_BUCKET_NAME}/${args.indexFilePath}" - - uploadToS3( - sourcePath: 'index.json', - bucket: "${ARTIFACT_BUCKET_NAME}", - path: "${args.indexFilePath}/index.json" - ) - } -} diff --git a/vars/uploadMinSnapshotsToS3.groovy b/vars/uploadMinSnapshotsToS3.groovy deleted file mode 100644 index 13a0747610..0000000000 --- a/vars/uploadMinSnapshotsToS3.groovy +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -void call(Map args = [:]) { - def lib = library(identifier: 'jenkins@20211123', retriever: legacySCM(scm)) - List fileActions = args.fileActions ?: [] - String manifest = args.manifest ?: "manifests/${INPUT_MANIFEST}" - - def inputManifest = lib.jenkins.InputManifest.new(readYaml(file: manifest)) - echo("Retreving build manifest from: $WORKSPACE/${args.distribution}/builds/${inputManifest.build.getFilename()}/manifest.yml") - - productName = inputManifest.build.getFilename() - def buildManifest = lib.jenkins.BuildManifest.new(readYaml(file: "$WORKSPACE/${args.distribution}/builds/${productName}/manifest.yml")) - version = buildManifest.build.version - architecture = buildManifest.build.architecture - platform = buildManifest.build.platform - id = buildManifest.build.id - extension = buildManifest.build.getExtension() - - // Setup src & dst variables for artifacts - // Replace backslash with forward slash ('\' to '/') in path - // Compatible with both Windows as well as any nix* env - // Else the map in groovy will treat '\' as escape char on Windows - String srcDir = "${WORKSPACE}/${args.distribution}/builds/${productName}/dist".replace("\\", "/") - String dstDir = "snapshots/core/${productName}/${version}" - String baseName = "${productName}-min-${version}-${platform}-${architecture}" - - // Create checksums - echo('Create .sha512 for Min Snapshots Artifacts') - argsMap = [:] - argsMap['artifactPath'] = srcDir - for (Closure action : fileActions) { // running createSha512Checksums() - action(argsMap) - } - - echo('Start copying files') - - sh """ - cp -v ${srcDir}/${baseName}.${extension} ${srcDir}/${baseName}-latest.${extension} - cp -v ${srcDir}/${baseName}.${extension}.sha512 ${srcDir}/${baseName}-latest.${extension}.sha512 - sed -i "s/.${extension}/-latest.${extension}/g" ${srcDir}/${baseName}-latest.${extension}.sha512 - """ - withCredentials([ - string(credentialsId: 'jenkins-artifact-promotion-role', variable: 'ARTIFACT_PROMOTION_ROLE_NAME'), - string(credentialsId: 'jenkins-aws-production-account', variable: 'AWS_ACCOUNT_ARTIFACT'), - string(credentialsId: 'jenkins-artifact-production-bucket-name', variable: 'ARTIFACT_PRODUCTION_BUCKET_NAME')]) { - withAWS(role: "${ARTIFACT_PROMOTION_ROLE_NAME}", roleAccount: "${AWS_ACCOUNT_ARTIFACT}", duration: 900, roleSessionName: 'jenkins-session') { - s3Upload(file: "${srcDir}/${baseName}-latest.${extension}", bucket: "${ARTIFACT_PRODUCTION_BUCKET_NAME}", path: "${dstDir}/${baseName}-latest.${extension}") - s3Upload(file: "${srcDir}/${baseName}-latest.${extension}.sha512", bucket: "${ARTIFACT_PRODUCTION_BUCKET_NAME}", path: "${dstDir}/${baseName}-latest.${extension}.sha512") - } - } -} diff --git a/vars/uploadTestResults.groovy b/vars/uploadTestResults.groovy deleted file mode 100644 index ee236e31d6..0000000000 --- a/vars/uploadTestResults.groovy +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -void call(Map args = [:]) { - def lib = library(identifier: 'jenkins@20211123', retriever: legacySCM(scm)) - - def buildManifest = lib.jenkins.BuildManifest.new(readYaml(file: args.buildManifestFileName)) - - String buildId = buildManifest.build.id - echo "Build Id: ${buildId}" - - def artifactPath = buildManifest.getArtifactRoot(args.jobName, buildId) - def uploadPath = "${artifactPath}/test-results" - if (args.buildNumber){ - uploadPath = "${artifactPath}/test-results/${args.buildNumber}" - } - withCredentials([ - string(credentialsId: 'jenkins-artifact-bucket-name', variable: 'ARTIFACT_BUCKET_NAME'), - string(credentialsId: 'jenkins-aws-account-public', variable: 'AWS_ACCOUNT_PUBLIC')]) { - echo "Uploading to s3://${ARTIFACT_BUCKET_NAME}/${artifactPath}" - - withAWS(role: 'opensearch-test', roleAccount: "${AWS_ACCOUNT_PUBLIC}", duration: 900, roleSessionName: 'jenkins-session') { - s3Upload(file: 'test-results', bucket: "${ARTIFACT_BUCKET_NAME}", path: uploadPath) - } - } - - def baseUrl = buildManifest.getArtifactRootUrl("${PUBLIC_ARTIFACT_URL}", args.jobName) - lib.jenkins.Messages.new(this).add("${STAGE_NAME}", "${baseUrl}/test-results/") -} diff --git a/vars/uploadToS3.groovy b/vars/uploadToS3.groovy deleted file mode 100644 index 4158efc53d..0000000000 --- a/vars/uploadToS3.groovy +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ -void call(Map args = [:]) { - withCredentials([string(credentialsId: 'jenkins-aws-account-public', variable: 'AWS_ACCOUNT_PUBLIC')]) { - withAWS(role: 'opensearch-bundle', roleAccount: "${AWS_ACCOUNT_PUBLIC}", duration: 900, roleSessionName: 'jenkins-session') { - s3Upload(file: args.sourcePath, bucket: args.bucket, path: args.path) - } - } -}