meal_homework/.drone.yml

44 lines
900 B
YAML
Raw Normal View History

2022-02-13 20:38:02 +01:00
---
kind: pipeline
type: docker
name: default
steps:
2022-02-13 23:22:11 +01:00
- name: run-service
image: python:3-slim
detach: true
environment:
DATABASE_URI: "postgresql://mealsapi:meals@database:5432/mealsdb"
commands:
- cd mealapi
- pip3 install -r requirements.txt
- python3 app.py
- name: tests
image: node
commands:
- npm install -g newman
- newman run LoadExampleData.postman_collection.json
- newman run MealHomeWork.postman_collection.json
2022-02-13 20:38:02 +01:00
- name: kaniko
image: banzaicloud/drone-kaniko
settings:
registry: registry.kmlabz.com
2022-02-13 20:49:25 +01:00
repo: tormakris/${DRONE_REPO_NAME}
2022-02-13 20:38:02 +01:00
username:
from_secret: DOCKER_USERNAME
password:
from_secret: DOCKER_PASSWORD
tags:
- latest
- ${DRONE_BUILD_NUMBER}
2022-02-13 23:22:11 +01:00
services:
- name: database
image: postgres:14
environment:
POSTGRES_USER: mealsapi
POSTGRES_PASSWORD: meals
POSTGRES_DB: mealsdb