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

Added dockerized database and deploy stage

parent 86bde927
Pipeline #27187 failed with stage
in 40 seconds
image: python:3-buster
image: debian:buster-slim
stages:
- test
- deploy
test:
before_script:
......@@ -20,3 +24,21 @@ test:
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 for file in `ls migrations/*`;
do
echo "importing $file";
psql -v ON_ERROR_STOP=1 -h postgres -U postgres -f $file;
done
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