35 lines
759 B
YAML
35 lines
759 B
YAML
image: docker:19.03.0-dind
|
|
services:
|
|
- name: docker:dind
|
|
entrypoint: ["env", "-u", "DOCKER_HOST"]
|
|
command: ["dockerd-entrypoint.sh"]
|
|
variables:
|
|
DOCKER_TLS_CERTDIR: ""
|
|
|
|
stages:
|
|
- linting
|
|
- deploy
|
|
|
|
linting:
|
|
stage: linting
|
|
before_script:
|
|
- apk add --no-cache python3 python3-dev build-base docker
|
|
- pip3 install pylint
|
|
- pip3 install -r app/requirements.txt
|
|
script:
|
|
- pylint -E app/*.py
|
|
|
|
build_and_push_container:
|
|
before_script:
|
|
- apk add --no-cache python3
|
|
- pip3 install -r app/requirements.txt
|
|
stage: deploy
|
|
script:
|
|
- docker login -u ldooks -p $DOCKER_PASSWORD
|
|
- docker build -t ldooks/dragon-bot:latest .
|
|
- docker push ldooks/dragon-bot:latest
|
|
only:
|
|
- master
|
|
tags:
|
|
- docker
|