Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
image: django:latest
.shared_hidden_key: &test
services:
- postgres:latest
.shared_hidden_key: &deploy
before_script:
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
- eval $(ssh-agent -s)
- ssh-add <(echo "$SSH_PRIVATE_KEY")
- mkdir -p ~/.ssh
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
stages:
- test
- deploy
variables:
POSTGRES_DB: postgres
POSTGRES_USER: postgres
POSTGRES_PASSWORD: dev
all_tests:
<<: *test
stage: test
script:
- pip install -r config/requirements.txt
- PGPASSWORD=dev psql -h postgres -U postgres -d template1 -c 'create extension hstore;'
- sh scripts/run_tests.sh
deploy:
<<: *deploy
stage: deploy
script:
- ssh -t cloud@$DEPLOYHOST "export ADMIN_PWD=$DJANGO_ADMIN_PWD && cd django/eoa-django-test && git fetch --all && git reset --hard origin/master && sh scripts/start_deploy.sh "
environment:
name: production
url: https://c105-187.cloud.gwdg.de/publications/studies/312/index.html
only:
- master
when: manual