database migration using argocd PreSync hook #3287
Unanswered
NissesSenap
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi
I'm currently thinking of is it possible to use Kargo with DB migrations.
Current way of working
When our applications need to perform a DB migration, we use a ArgoCD preSync hook that triggers a job.
The application and the DB migration solution are located in two separate containers.
We only trigger a build of the DB migration image when we update the schema.
So we only want the DB migration image to update when there is a new version, else it should keep the old one.
But when we need to run a DB migration, we want the container images to be updated in the same PR/workflow.
Question
I assume this isn't possible. But is there any way for me to trigger a stage that got two separate warehouses and update the image at the same time in two locations? But only when both of them has been updated. Else, I only want to update the application image.
I guess you can have 2 stages.
But it will get a bit painful to maintain.
Anyone else have so good ideas how this can be solved?
Or do you think I should just solve this in argocd workflow in some nice way?
Beta Was this translation helpful? Give feedback.
All reactions