-
Notifications
You must be signed in to change notification settings - Fork 36
Change CD workflow to use new staging bucket for artifacts #248
Change CD workflow to use new staging bucket for artifacts #248
Conversation
Codecov Report
@@ Coverage Diff @@
## master #248 +/- ##
============================================
+ Coverage 71.60% 72.69% +1.08%
- Complexity 1352 1420 +68
============================================
Files 153 160 +7
Lines 6406 6680 +274
Branches 490 508 +18
============================================
+ Hits 4587 4856 +269
+ Misses 1587 1575 -12
- Partials 232 249 +17
Flags with carried forward coverage won't be shown. Click here to find out more.
|
rpm_outfile=`basename ${rpm%.rpm}-build-${GITHUB_RUN_NUMBER}.rpm` | ||
deb_outfile=`basename ${deb%.deb}-build-${GITHUB_RUN_NUMBER}.deb` | ||
|
||
s3_prefix="s3://staging.artifacts.opendistroforelasticsearch.amazon.com/snapshot/elasticsearch-plugins/anomaly-detection/" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So all plugins are uploading artifact to staging only in CD workflow ? Don't see production location in this file. Where will the production location be used ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The infrastructure team will promote artifacts to production as part of the ODFE release process. For out-of-cycle releases, you can promote the artifacts to production using your own workflows, or the infrastructure team can help.
deb=`ls build/distributions/*.deb` | ||
|
||
# Inject the build number before the suffix | ||
zip_outfile=`basename ${zip%.zip}-build-${GITHUB_RUN_NUMBER}.zip` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GITHUB_RUN_NUMBER is unique number for each run, so the artifact name will be unique for each run, while the original artifact name keep the same for same version. Is this change compatible with current CD workflow?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are making corresponding changes to how we generate ODFE distributions to handle the change to the naming convention. If you need to do an out-of-cycle release then there may be manual work required; the infrastructure team can help with that.
More changes were required but unable to access the specified branch. Hence closing this PR and raising a new one #358 |
PLEASE DO NOT MERGE THIS REQUEST UNTIL ASKED. We need to coordinate the merge with updating Github secrets.
Description of changes:
The infrastructure team is separating the production and staging locations into different AWS accounts. Plugins need to modify their workflows to publish to the new locations.
This PR changes the CD workflow to add a build number and write the zip, deb, and rpm plugin artifacts to staging.artifacts.opendistroforelasticsearch.amazon.com. The write to S3 currently fails because the secrets have not been updated; the secrets will be updated at the same time this PR is merged.
The workflow currently fails due to an unrelated JaCoCo issue: https://github.com/camerski/anomaly-detection/actions/runs/305267309
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.