-
Notifications
You must be signed in to change notification settings - Fork 25
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
MDBF-832 & MDBF-828 - Prepare BBM deployment for Production #654
MDBF-832 & MDBF-828 - Prepare BBM deployment for Production #654
Conversation
For now, pushes in DEV will trigger the creation of a dev_ tag. The workflow is not covering the replacement of the production tag because this should be a manual operation a few weeks/months after migration. To be more precise, we should automate this flow after we bump buildbot version.
When master container is under development we must ensure that configuration changes are valid on both buildbot master versions, PROD/DEV. Let's say one will bring a new feature to Production independently of a master upgrade.
- no automation for now, only copy the configuration files, prepare docker-compose and Autogen/ masters - will work only on manual dispatch from the Main branch - renamed secrets for better env classification
Good! I'll review more in details, but don't you think that you could avoid code duplication in the CI file by automatically defining the env |
Any example? In bbm_deploy.yml? |
@fauust This condition doesn't allow me to de-duplicate the code. If you know a better way... |
I don't see how this could not be an env variable defined in a previous job... See: https://github.com/MariaDB/buildbot/blob/dev/.github/workflows/bbw_build_container_template.yml#L64-L77 |
@vladbogo
In Home.jade
|
@RazvanLiviuVarzaru probably it needs a proper fix to work for both dev and prod. On prod, it should be removed if I remember correctly. @fauust do you remember something else? |
From e51ca6a, I guess that it's needed. |
validate_master_cfg.sh
Outdated
@@ -10,6 +10,43 @@ err() { | |||
exit 1 | |||
} | |||
|
|||
usage() { | |||
echo "Usage: $0 -e <DEV|PROD>" | |||
exit 1 |
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.
This is technically not an error so exit code should be 0.
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.
Solved in, 9e553ca
Thanks!
Use environment variables to distinguish between PROD and DEV environments. Use format syntax to substitute the secret variable names for DEV and PROD. The Set up environment variables step will mark the run as deployable if: The repository is MariaDB/buildbot. DEV-specific variables will be assigned if the branch is dev. The deployment will go to PROD if the event is workflow_dispatch, with PROD-specific variables assigned when the branch is main. The Start/Stop stack will only run for the Development environment. The Home.jade replacement has been removed, as it should already be handled.
@fauust Please see my latest commit (and commit message) for code de-duplication: 9e553ca
If tested this on a much simpler/dummy version of it, on my fork:
|
That already handles the case between dev and prod so I guess it should be fine and needed but probably open to improvement. I guess that if you decide to use sed than aim for consistency and use sed for this type of check as well otherwise change the other to be consistent with this |
I mean, Is replacing the values above. But this is already handled by |
@vladbogo Look now on "Packages built by buildbot can be downloaded from" I restored Home.jade as if the |
Main Feature: MDBF-791 - Run Production BuildBot services in docker containers
In this pull request:
dev_
tagsLocal validation with validate_master_cfg.sh
e DEV or -e PROD
to choose between container images.Pre-reqs: