Newer
Older
POSTGRESQL_USER: biscuit
POSTGRESQL_DB: biscuit
BISCUIT_http__allowed_hosts: "['*']"
BISCUIT_caching__memcached__address: memcached:11211
BISCUIT_database__host: db
name: registry.edugit.org/teckids/docker-images/python-pimped:master
- adduser --disabled-password --gecos "Test User" testuser
- poetry export --without-hashes --dev -f requirements.txt | pip install -r /dev/stdin
build_dist:
stage: build
image:
name: registry.edugit.org/teckids/docker-images/python-pimped:master
before_script:
- adduser --disabled-password --gecos "Test User" testuser
script:
- sudo -u testuser poetry build
artifacts:
paths:
- dist/
stage: build
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" >/kaniko/.docker/config.json
- /kaniko/executor
--context $CI_PROJECT_DIR
--dockerfile $CI_PROJECT_DIR/Dockerfile
--destination $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
--cache=true
--cleanup
- /kaniko/executor
--context $CI_PROJECT_DIR/docker/nginx
--dockerfile $CI_PROJECT_DIR/docker/nginx/Dockerfile
--destination $CI_REGISTRY_IMAGE/nginx:$CI_COMMIT_REF_NAME
--cache=true
--cleanup
test_docker:
stage: test_integrated
image:
name: debian:buster-slim
services:
alias: db
- name: memcached:latest
alias: memcached
- name: registry.edugit.org/biscuit/biscuit-ng:${CI_COMMIT_REF_NAME}
alias: app
script:
- echo true
deploy_demo-master:
stage: deploy
environment:
url: http://demo-master.biscuit-sis.org
image:
name: debian:buster-slim
before_script:
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- echo "$SSH_KNOWN_HOSTS" >~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
script:
- grep -v "build:" docker-compose.yml | ssh root@demo-master.biscuit-sis.org
env BISCUIT_IMAGE_TAG=${CI_COMMIT_REF_NAME}
docker-compose
-p biscuit-${CI_ENVIRONMENT_SLUG}
-f /dev/stdin
pull
- grep -v "build:" docker-compose.yml | ssh root@demo-master.biscuit-sis.org
env BISCUIT_IMAGE_TAG=${CI_COMMIT_REF_NAME}
docker-compose
-p biscuit-${CI_ENVIRONMENT_SLUG}
-f /dev/stdin
up -d
pages:
stage: deploy
image:
name: registry.edugit.org/teckids/docker-images/python-pimped:master
- poetry export --without-hashes --dev -f requirements.txt | eatmydata pip install -r /dev/stdin
- make -C docs html BUILDDIR=../public/docs
artifacts:
paths:
- public/
only:
- master