How do I import data to the postgresql server during the Review stage (for a review app) during the Gitlab CI/CD process?
I am currently using Gitlab CI/CD to deploy to AWS. Postgresql is used throughout the build stages.
During the build stages, information is successfully imported to postgresql from another application. The data is then dumped as a SQL file to an artifact (in two locations).
artifacts:
paths:
- postgres_backup.sql
- scripts/postgres/postgres_backup.sql
expire_in: 1 day
The build artifacts are created. However, they are not available in the review - autodeploy - stage. The review stage is basically:
review:
extends: .auto-deploy
stage: review
before_script:
- echo "Supposedly, this helps to carry over artifacts."
The artifacts are not there. Ideally, I would want to push the SQL backup to the database but 1) the artifact is not available and 2) the psql command is not available (nor apt).