Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support snapshot uploading to s3 for every build #1472

Merged
merged 21 commits into from
Jan 14, 2022

Conversation

gaiksaya
Copy link
Member

@gaiksaya gaiksaya commented Jan 13, 2022

Description

The current jenkins workflow only updates the release candidates after merging #1378
This PR supports uploading snapshots to below location for every build too:

snapshots/core/opensearch/1.2.3-SNAPSHOT/opensearch-min-1.2.3-SNAPSHOT-linux-x64-latest.tar.gz
snapshots/core/opensearch/1.2.3-SNAPSHOT/opensearch-min-1.2.3-SNAPSHOT-linux-arm64-latest.tar.gz

Issues Resolved

#1442

Check List

  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com>
Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com>
Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com>
Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com>
Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com>
Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com>
Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com>
Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com>
Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com>
Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com>
Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com>
Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com>
@gaiksaya gaiksaya requested a review from a team as a code owner January 13, 2022 23:06
Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com>
@codecov-commenter
Copy link

codecov-commenter commented Jan 13, 2022

Codecov Report

Merging #1472 (fb4187d) into main (fa1f6f2) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##               main    #1472   +/-   ##
=========================================
  Coverage     94.45%   94.45%           
  Complexity       12       12           
=========================================
  Files           141      142    +1     
  Lines          3084     3085    +1     
  Branches          8        8           
=========================================
+ Hits           2913     2914    +1     
  Misses          164      164           
  Partials          7        7           
Impacted Files Coverage Δ
tests/jenkins/jobs/uploadSnapshotsToS3_Jenkinsfile 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fa1f6f2...fb4187d. Read the comment docs.

Copy link
Member

@peternied peternied left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comments, thanks for working on this

jenkins/opensearch/distribution-build.jenkinsfile Outdated Show resolved Hide resolved
vars/uploadMinSnapshotsToS3.groovy Show resolved Hide resolved
vars/uploadMinSnapshotsToS3.groovy Outdated Show resolved Hide resolved
@gaiksaya gaiksaya marked this pull request as draft January 13, 2022 23:17
jenkins/opensearch/distribution-build.jenkinsfile Outdated Show resolved Hide resolved
Path source = Path.of("tests/data/opensearch-build-1.1.0.yml");
target = Path.of("workspace/builds/opensearch/manifest.yml");
Files.createDirectories(target.getParent());
Files.copy(source, target, StandardCopyOption.REPLACE_EXISTING);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we have this setup pre-built since this is a test inside tests/data ahead of time? In which case cleanup isn't required either.

Copy link
Member Author

@gaiksaya gaiksaya Jan 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what you mean by pre-build. Can you elaborate? It is already a part of setUp()

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll try to explain better. This code creates a folder and copies a file when setUp is run. I would just copy the file and commit it and remove this code.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it. Removed this code. And edited the workplace variable so that it fetched from write manifest.
Thanks!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dblock Can you review it once before I merge?
Thanks!

vars/uploadMinSnapshotsToS3.groovy Show resolved Hide resolved
vars/uploadMinSnapshotsToS3.groovy Outdated Show resolved Hide resolved
Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com>
Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com>
@gaiksaya gaiksaya marked this pull request as ready for review January 14, 2022 00:25
Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com>
Copy link
Contributor

@abhinavGupta16 abhinavGupta16 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a test for jenkins/opensearch/distribution-build.jenkinsfile

Thanks!

@gaiksaya
Copy link
Member Author

Can we add a test for jenkins/opensearch/distribution-build.jenkinsfile

Thanks!

Out of the scope of this issue. We can create new issue and follow up on that.

@abhinavGupta16 abhinavGupta16 dismissed their stale review January 14, 2022 01:26

Dismissing this review since this is an existing job and we'll be adding test cases for this job as a part of a separate issue.

Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com>
@gaiksaya gaiksaya requested a review from dblock January 14, 2022 02:38
Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com>
Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com>
Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com>
Copy link
Member

@dblock dblock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@gaiksaya gaiksaya merged commit 42140d1 into opensearch-project:main Jan 14, 2022
@gaiksaya gaiksaya deleted the snapshots branch January 14, 2022 19:09
peterzhuamazon pushed a commit to peterzhuamazon/opensearch-build that referenced this pull request Feb 16, 2022
…1472)

* Support snapshot builds

Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants