Skip to content

Commit

Permalink
Add more tests
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Zhu <[email protected]>
  • Loading branch information
peterzhuamazon committed Sep 2, 2022
1 parent fdf4f7e commit 0523d82
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
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.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*})
Expand Down Expand Up @@ -65,7 +65,7 @@
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.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*})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
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.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*})
Expand Down Expand Up @@ -65,7 +65,7 @@
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.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*})
Expand Down
17 changes: 12 additions & 5 deletions tests/jenkins/jobs/PromoteArtifacts_actions_Jenkinsfile.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,16 @@
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(Not generating sha for bbb 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])
createSha512Checksums.echo(Not generating sha for ccc 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])
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)
Expand All @@ -52,7 +59,7 @@
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.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*})
Expand Down Expand Up @@ -110,7 +117,7 @@
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.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*})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
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.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*})
Expand Down Expand Up @@ -65,7 +65,7 @@
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.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*})
Expand Down
18 changes: 15 additions & 3 deletions tests/jenkins/jobs/uploadMinSnapshotsToS3_Jenkinsfile.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,21 @@
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(Not generating sha for bbb in tests/data/tar/builds/opensearch/dist, doesn't match allowed types [.tar.gz, .zip, .rpm])
createSha512Checksums.echo(Not generating sha for ccc in tests/data/tar/builds/opensearch/dist, doesn't match allowed types [.tar.gz, .zip, .rpm])
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.echo(Start copying files)
uploadMinSnapshotsToS3.sh(
cp -v 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
Expand Down
2 changes: 1 addition & 1 deletion vars/createSha512Checksums.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Closure call() {

return { argsMap -> body: {

final foundFiles = sh(script: "find ${argsMap.artifactPath}/ -type f", returnStdout: true).split()
final foundFiles = sh(script: "find ${argsMap.artifactPath} -type f", returnStdout: true).split()

for (file in foundFiles) {
acceptTypeFound = false
Expand Down

0 comments on commit 0523d82

Please sign in to comment.