Support db migration and initialization for Auto DevOps
What does this MR do?
$DB_INITIALIZE is present, deploy an initial release
$DB_INITIALIZE is run in a special job (and deployments are
not rendered/loaded). This is then followed by second release with
deployments as usual.
$DB_MIGRATE, set this value which will trigger a pre-upgrade helm
Due to helm not supporting hook logs, this MR does not show the logs from the intialization and migration logs.
What are the relevant issue numbers?
- Document :
For an example Rails project :
We can set
cd /app && RAILS_ENV=production bin/setupand
cd app && RAILS_ENV=production bin/update
/appis from herokuish buildpacks. Can use
Also, there is only one chance to run
$DB_INITIALIZE. If the first deploy successfully completes,
$DB_INITIALIZEwill never be run again. If
$DB_INITIALIZEis present during the first deploy though and it errors or fails, that doesn't cound as a successfully first deploy
Does this MR meet the acceptance criteria?
- Changelog entry added, if necessary
- Documentation created/updated
- Tests added for this feature/bug
- Conforms to the code review guidelines
- Conforms to the merge request performance guidelines
- Conforms to the style guides
- Conforms to the database guides
Closes #48004 (closed)