Commit ba98b27f authored by Marius Kriegerowski's avatar Marius Kriegerowski
Browse files

Added dockerized database and deploy stage

parent 86bde927
Pipeline #27189 failed with stage
in 31 seconds
image: python:3-buster
image: debian:buster-slim
stages:
- test
- deploy
test:
before_script:
......@@ -14,9 +18,28 @@ test:
interruptible: true
script:
- |
for file in `ls migrations/*`
do
echo "importing $file"
psql -v ON_ERROR_STOP=1 -h postgres -U postgres -f $file
done
- run-migrations.sh -u postgres -h postgres
# - |
# for file in `ls migrations/*`
# do
# echo "importing $file"
# psql -v ON_ERROR_STOP=1 -h postgres -U postgres -f $file
# done
deploy:
image: docker:19.03.12
services:
- docker:19.03.12-dind
variables:
IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
tags:
- dind
script:
- docker build --pull -t $IMAGE_TAG .
- docker push $IMAGE_TAG
# only:
# refs:
# - master
FROM $CI_REGISTRY/dynamicexposure/server-components/containers/docker-obm-database:master
COPY . .
RUN run-migrations.sh -u postgres -h postgres
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment