You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
1.6 KiB

kind: pipeline
name: default
type: docker
steps:
- name: build
image: docker/compose:latest
volumes:
- name: docker_sock
path: /var/run/docker.sock
commands:
- docker-compose build
- name: push
image: docker/compose:latest
volumes:
- name: docker_sock
path: /var/run/docker.sock
environment:
REGISTRY_USERNAME:
from_secret: REGISTRY_USERNAME
REGISTRY_PASSWORD:
from_secret: REGISTRY_PASSWORD
commands:
- docker login https://registry.mootfrost.ru -u $REGISTRY_USERNAME -p $REGISTRY_PASSWORD
- docker-compose push
- name: deploy
image: docker/compose:latest
volumes:
- name: docker_sock
path: /var/run/docker.sock
environment:
API_ID:
from_secret: API_ID
API_HASH:
from_secret: API_HASH
BOT_TOKEN:
from_secret: BOT_TOKEN
POSTGRES_HOST:
from_secret: POSTGRES_HOST
POSTGRES_USER:
from_secret: POSTGRES_USER
POSTGRES_PASSWORD:
from_secret: POSTGRES_PASSWORD
commands:
- export API_ID=${API_ID}
- export API_HASH=${API_HASH}
- export BOT_TOKEN=${BOT_TOKEN}
- export POSTGRES_HOST=${POSTGRES_HOST}
- export POSTGRES_USER=${POSTGRES_USER}
- export POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- docker-compose -p mootfrost-dev up -d
- name: prune
image: docker/compose:latest
volumes:
- name: docker_sock
path: /var/run/docker.sock
commands:
- docker image prune -f
volumes:
- name: docker_sock
host:
path: /var/run/docker.sock