2025-02-13 10:34:58 +00:00
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: default
|
|
|
|
|
|
|
|
steps:
|
2025-02-13 10:48:23 +00:00
|
|
|
- name: build and test
|
|
|
|
image: python:3.9-slim
|
|
|
|
commands:
|
|
|
|
- pip install --no-cache-dir -r requirements.txt
|
2025-02-13 13:47:52 +00:00
|
|
|
|
2025-02-13 14:03:38 +00:00
|
|
|
- name: deploy
|
|
|
|
image: python:3.9-slim
|
|
|
|
when:
|
|
|
|
status: success
|
2025-02-13 13:47:52 +00:00
|
|
|
commands:
|
2025-02-13 14:03:38 +00:00
|
|
|
- echo "Deploying app to production..."
|
2025-02-13 14:04:28 +00:00
|
|
|
- python app.py & # Run Flask app in background
|
2025-02-13 14:03:38 +00:00
|
|
|
secrets: [ eins ] # Use secrets to securely store deployment credentials
|
2025-02-13 10:48:23 +00:00
|
|
|
|
|
|
|
trigger:
|
|
|
|
branch:
|
2025-02-13 14:03:38 +00:00
|
|
|
- master
|
2025-02-13 14:09:13 +00:00
|
|
|
event:
|
|
|
|
- promote
|
|
|
|
target:
|
|
|
|
- production
|