Skip to content
Snippets Groups Projects
Commit 7341c4fb authored by Rafael László's avatar Rafael László :speech_balloon:
Browse files

update ci

parent f0d032a9
No related branches found
No related tags found
No related merge requests found
Pipeline #5913 failed
......@@ -4,30 +4,40 @@ services:
- postgres:latest
variables:
POSTGRES_DB: database_name
POSTGRES_DB: kszkepzes
CONTAINER_IMAGE: 'registry.kszk.bme.hu/kszk/devteam/$CI_PROJECT_NAME:$CI_COMMIT_REF_NAME'
cache:
key: '$CI_JOB_NAME-$CI_COMMIT_REF_SLUG'
paths:
- .cache/pip
- venv/
- env/
before_script:
- python -V
- python3 -m venv venv
- source venv/bin/activate
- python3 -m venv env
- source env/bin/activate
- pip install -r requirements/production.txt
stages:
- Build
- Docker Build
Flake8:
stage: Build
only:
- dev
- master
tags: [docker]
script:
- flake8 --max-line-length=125 --exclude=src/kszkepzes,migrations,venv,env
- flake8 --max-line-length=125 --exclude=src/kszkepzes,migrations,env
Test:
stage: Build
only:
- dev
- master
tags: [docker]
variables:
DATABASE_URL: 'postgresql://postgres:postgres@postgres:5432/$POSTGRES_DB'
SECRET_KEY: 'secret'
......@@ -35,3 +45,15 @@ Test:
AUTHSCH_SECRET: 'secret'
script:
- python src/manage.py test
Docker build:
stage: Docker build
tags: [docker]
only:
- tags
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: ['']
script:
- echo "{\"auths\":{\"registry.kszk.bme.hu\":{\"username\":\"$REGISTRY_USER\",\"password\":\"$REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CONTAINER_IMAGE
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment