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 and push Docker vitess/base and component images to DockerHub from GitHub Actions #14271

Merged
merged 21 commits into from
Oct 18, 2023

Conversation

frouioui
Copy link
Member

@frouioui frouioui commented Oct 12, 2023

Description

This is a follow-up of #14243.

Goal

This PR adds a new workflow: Docker Build Base that runs on both main and new tags. The goal of this workflow is:

  • Build the vitess/build image
  • Then build the vitess/k8s image, using both supported debian version
  • Finally, build component image i.e. vitess/vtgate, using both supported debian version

Built/pushed images

For each execution of this new workflow a total of 40 images are built and pushed. A full list can be found below. Note that if we are building and pushing due to a new git tag, the Docker Tag latest is replaced by the git tag name and all other Docker Tag are prefixed by the git tag name.

  • 4 images for vitess/base (latest, mysql57, percona57, and percona80)
  • 3 images for vitess/k8s (latest, bookworm, and bullseye)
  • 33 images for vitess components, 11 components with each three tags (latest, bookworm, and bullseye)

Example

On main

Here is a sample run on my own fork after a push to main: https://github.com/frouioui/vitess/actions/runs/6554596808. The frouioui/base image can be found on DockerHub. Same thing for the frouioui/k8s image here. All other components are also visible in my list of repositories on DockerHub.

On a new tag

An example run on my own fork is available on https://github.com/frouioui/vitess/actions/runs/6554972519.

Related Issue(s)

Checklist

  • "Backport to:" labels have been added if this change should be back-ported
  • Tests were added or are not required
  • Did the new or modified tests pass consistently locally and on the CI
  • Documentation was added or is not required

Deployment Notes

@vitess-bot
Copy link
Contributor

vitess-bot bot commented Oct 12, 2023

Review Checklist

Hello reviewers! 👋 Please follow this checklist when reviewing this Pull Request.

General

  • Ensure that the Pull Request has a descriptive title.
  • Ensure there is a link to an issue (except for internal cleanup and flaky test fixes), new features should have an RFC that documents use cases and test cases.

Tests

  • Bug fixes should have at least one unit or end-to-end test, enhancement and new features should have a sufficient number of tests.

Documentation

  • Apply the release notes (needs details) label if users need to know about this change.
  • New features should be documented.
  • There should be some code comments as to why things are implemented the way they are.
  • There should be a comment at the top of each new or modified test to explain what the test does.

New flags

  • Is this flag really necessary?
  • Flag names must be clear and intuitive, use dashes (-), and have a clear help text.

If a workflow is added or modified:

  • Each item in Jobs should be named in order to mark it as required.
  • If the workflow needs to be marked as required, the maintainer team must be notified.

Backward compatibility

  • Protobuf changes should be wire-compatible.
  • Changes to _vt tables and RPCs need to be backward compatible.
  • RPC changes should be compatible with vitess-operator
  • If a flag is removed, then it should also be removed from vitess-operator and arewefastyet, if used there.
  • vtctl command output order should be stable and awk-able.

@vitess-bot vitess-bot bot added NeedsDescriptionUpdate The description is not clear or comprehensive enough, and needs work NeedsIssue A linked issue is missing for this Pull Request NeedsWebsiteDocsUpdate What it says labels Oct 12, 2023
@github-actions github-actions bot added this to the v19.0.0 milestone Oct 12, 2023
Signed-off-by: Florent Poinsard <[email protected]>
Signed-off-by: Florent Poinsard <[email protected]>
Signed-off-by: Florent Poinsard <[email protected]>
Signed-off-by: Florent Poinsard <[email protected]>
@frouioui frouioui force-pushed the docker-build-base-in-ci branch from 4f0a0ef to 857286d Compare October 17, 2023 22:55
Signed-off-by: Florent Poinsard <[email protected]>
Signed-off-by: Florent Poinsard <[email protected]>
Signed-off-by: Florent Poinsard <[email protected]>
Signed-off-by: Florent Poinsard <[email protected]>
Comment on lines +61 to +62
- name: Set Docker tag name
if: startsWith(github.ref, 'refs/tags/') && matrix.branch == 'latest'
Copy link
Member Author

Choose a reason for hiding this comment

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

For vitess/base on a new tag, we only build vitess/base:vX.X.X, using the default Dockerfile, we ignore all other flavor of MySQL/Percona

@frouioui frouioui removed NeedsDescriptionUpdate The description is not clear or comprehensive enough, and needs work NeedsWebsiteDocsUpdate What it says NeedsIssue A linked issue is missing for this Pull Request labels Oct 18, 2023
@frouioui frouioui added Type: Enhancement Logical improvement (somewhere between a bug and feature) Component: Docker labels Oct 18, 2023
@frouioui frouioui marked this pull request as ready for review October 18, 2023 01:14
Copy link
Member

@GuptaManan100 GuptaManan100 left a comment

Choose a reason for hiding this comment

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

LGTM

@frouioui frouioui merged commit 33245e5 into vitessio:main Oct 18, 2023
115 checks passed
@frouioui frouioui deleted the docker-build-base-in-ci branch October 18, 2023 15:30
frouioui added a commit that referenced this pull request Nov 13, 2023
… from GitHub Actions (#14271)

Signed-off-by: Florent Poinsard <[email protected]>
frouioui added a commit to planetscale/vitess that referenced this pull request Nov 13, 2023
frouioui added a commit to planetscale/vitess that referenced this pull request Nov 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Docker Type: Enhancement Logical improvement (somewhere between a bug and feature)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants