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

build(docker): add docker hub push capabilities #377

Merged
merged 2 commits into from
Apr 2, 2024

Conversation

d33bs
Copy link
Member

@d33bs d33bs commented Mar 20, 2024

Description

This PR continues the efforts surrounding #214 to push Docker images to Docker Hub using various triggers from GitHub Actions. I tried to abide the spec mentioned by @bethac07 (thanks Beth!) with slight adjustment to add the dynamic version to each tag along with the commit hash (which includes a commit hash for non-release-based versions). Please don't hesitate to let me know if I should change the tagging or other aspects to meet the goals here.

Open question I had while creating this: when would be best to create a scheduled push for Docker images? I chose Wednesdays as a time where challenges (if there were any) would be quite visible and could be resolved before week-end. I can also see how Mondays, Fridays, or sometime over the weekend would be good too.

Once this is merged, I believe we should see a new push triggered, and will likely be able to reach back out to Docker for more support surrounding their DSOS program.

Thank you in advance for any thoughts and suggestions you may have on this!

What is the nature of your change?

  • Bug fix (fixes an issue).
  • Enhancement (adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to not work as expected).
  • This change requires a documentation update.

Checklist

Please ensure that all boxes are checked before indicating that a pull request is ready for review.

  • I have read the CONTRIBUTING.md guidelines.
  • My code follows the style guidelines of this project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • New and existing unit tests pass locally with my changes.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have deleted all non-relevant text in this pull request template.

Copy link
Member

@kenibrewer kenibrewer left a comment

Choose a reason for hiding this comment

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

Things are looking very clean, but there's a use of download_artifact I think will break and I have an additional suggestion around merging the docker "build-test" action and the "build-push" action into a unified "build-test-push" action.

.github/workflows/docker-hub-push.yml Outdated Show resolved Hide resolved
.github/workflows/docker-hub-push.yml Outdated Show resolved Hide resolved
.github/workflows/docker-hub-push.yml Outdated Show resolved Hide resolved
.github/workflows/docker-hub-push.yml Outdated Show resolved Hide resolved
CONTRIBUTING.md Show resolved Hide resolved
@d33bs d33bs force-pushed the push-docker-images branch from aa55867 to 9b61af8 Compare March 23, 2024 12:11
@codecov-commenter
Copy link

codecov-commenter commented Mar 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.96%. Comparing base (9dd98ac) to head (7412759).
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #377   +/-   ##
=======================================
  Coverage   94.96%   94.96%           
=======================================
  Files          56       56           
  Lines        3136     3137    +1     
=======================================
+ Hits         2978     2979    +1     
  Misses        158      158           
Flag Coverage Δ
unittests 94.96% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@d33bs d33bs force-pushed the push-docker-images branch from 9b61af8 to f45adca Compare March 25, 2024 13:46
@d33bs d33bs requested review from gwaybio and kenibrewer March 25, 2024 15:56
@d33bs
Copy link
Member Author

d33bs commented Mar 25, 2024

Thanks @gwaybio and @kenibrewer for your reviews! I've worked towards addressing these and believe things are now ready for a re-review when there's a moment.

.github/workflows/integration-test.yml Outdated Show resolved Hide resolved
.github/workflows/integration-test.yml Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
@d33bs d33bs force-pushed the push-docker-images branch 2 times, most recently from d072b6b to 2e875a6 Compare March 28, 2024 21:52
Co-Authored-By: Ken Brewer <kenibrewer@users.noreply.github.com>
@d33bs d33bs force-pushed the push-docker-images branch from 2e875a6 to 7412759 Compare March 28, 2024 21:53
@d33bs d33bs requested review from bethac07 and kenibrewer April 1, 2024 17:22
@d33bs
Copy link
Member Author

d33bs commented Apr 1, 2024

Hi @bethac07 and @kenibrewer , I've added some changes based on your comments and have re-requested your review. Please don't hesitate to let me know if I should make any further changes to help ready this for pycytominer.

@kenibrewer kenibrewer linked an issue Apr 2, 2024 that may be closed by this pull request
Copy link
Member

@kenibrewer kenibrewer left a comment

Choose a reason for hiding this comment

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

A few suggestions to make certain if checks a bit more restrictive. But otherwise this looks good to me and seems like implement's @bethac07 's tagging suggestions well.

Excited to see this merged so we can hotfix whatever github actions corner case we inevitably missed despite triple checking every line!

.github/workflows/integration-test.yml Outdated Show resolved Hide resolved
.github/workflows/integration-test.yml Outdated Show resolved Hide resolved
.github/workflows/integration-test.yml Outdated Show resolved Hide resolved
Copy link
Member

@bethac07 bethac07 left a comment

Choose a reason for hiding this comment

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

I agree with Ken, I'm sure some hotfixing will be required just due to the laws of coding/the universe, but awesome job!

Co-authored-by: Ken Brewer <kenibrewer@users.noreply.github.com>
@d33bs
Copy link
Member Author

d33bs commented Apr 2, 2024

Thank you so much @kenibrewer, @bethac07, and @gwaybio for your reviews and great suggestions throughout! Going to squash and merge this in.

@d33bs d33bs merged commit 6cb9928 into cytomining:main Apr 2, 2024
11 checks passed
@d33bs d33bs deleted the push-docker-images branch April 2, 2024 20:33
@d33bs d33bs mentioned this pull request Apr 2, 2024
13 tasks
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.

Docker container
5 participants