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

docker build

parent eb79fc15
No related branches found
No related tags found
No related merge requests found
Pipeline #3214 failed
image: python:latest
services:
- postgres:latest
variables: variables:
POSTGRES_DB: database_name CONTAINER_IMAGE: rlacko58/kszkepzes-backend:0.2
cache:
key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
paths:
- .cache/pip
- venv/
before_script:
- python -V
- python3 -m venv venv
- source venv/bin/activate
- pip install -r requirements/production.txt
stages: stages:
- Build - Build image
Flake8:
stage: Build
script:
- flake8 --max-line-length=125 --exclude=src/kszkepzes,migrations,venv
Test: docker build:
stage: Build stage: Build image
variables: image:
DATABASE_URL: "postgresql://postgres:postgres@postgres:5432/$POSTGRES_DB" name: gcr.io/kaniko-project/executor:debug
SECRET_KEY: "secret" entrypoint: [""]
AUTHSCH_KEY: "secret"
AUTHSCH_SECRET: "secret"
script: script:
- python src/manage.py test - CRED=$(echo -n $DOCKERHUB_USER:$DOCKERHUB_PASSWORD | base64)
- echo "{\"auths\":{\"https://index.docker.io/v1/\":{\"auth\":\"$CRED\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination https://index.docker.io/v1/rlacko58/kszkepzes-backend
only:
- master
- tags
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