Ad Code

Responsive Advertisement

Ticker

6/recent/ticker-posts

Gitlab CI

 my-flask-app/

├── app/
  ├── __init__.py
  └── main.py
├── Dockerfile
├── k8s/
  ├── deployment.yaml
  ├── service.yaml
├── requirements.txt
└── .gitlab-ci.yml


image: python:3.9

variables:
  DATABASE_URL: "postgres://user:password@postgres:5432/dbname"

services:
  - postgres:latest

stages:
  - build
  - test
  - deploy

cache:
  paths:
    - .cache/pip

before_script:
  - pip install -r requirements.txt

build:
  stage: build
  script:
    - python setup.py build

test:
  stage: test
  script:
    - pytest

deploy:
  stage: deploy
  script:
    - echo "Deploying application..."
    - ./deploy.sh
  only:
    - master

# Running jobs in parallel
test:unit:
  stage: test
  script:
    - pytest tests/unit

test:integration:
  stage: test
  script:
    - pytest tests/integration

# Define jobs to run in parallel within the same stage

Post a Comment

0 Comments

Ad Code

Responsive Advertisement