This repository has been archived on 2025-03-03. You can view files and clone it, but cannot push or open issues or pull requests.
facturio/.gitlab-ci.yml

35 lines
767 B
YAML
Raw Permalink Normal View History

2024-02-16 15:55:12 +01:00
stages:
- linting
- testing
- build
- staging
- production
default:
2024-08-17 21:46:36 +02:00
image: python:3.12-alpine
pre_commit:
stage: linting
script:
- apk add git
- pip install --root-user-action ignore pre-commit
- pre-commit run -a
2024-08-17 21:29:19 +02:00
build_image:
stage: build
2024-08-17 21:31:11 +02:00
image: docker
services:
- docker
2024-08-17 21:44:04 +02:00
variables:
2024-08-19 22:42:51 +02:00
COMPOSE_FILE: docker-compose.build.yml
2024-08-17 21:46:36 +02:00
before_script:
- docker login ${CI_REGISTRY} -u gitlab-ci-token -p ${CI_JOB_TOKEN}
2024-08-17 21:29:19 +02:00
script:
2024-08-19 22:42:51 +02:00
- docker compose build
- docker compose push
2024-08-17 21:38:32 +02:00
- |
2024-08-17 21:44:04 +02:00
if [[ -n "${CI_COMMIT_TAG}" ]]; then
2024-08-19 22:42:51 +02:00
docker tag ${CI_REGISTRY_IMAGE}/facturio:${CI_COMMIT_REF_NAME} ${CI_REGISTRY_IMAGE}/facturio:${CI_COMMIT_TAG}
docker push ${CI_REGISTRY_IMAGE}/facturio:${CI_COMMIT_TAG}
2024-08-17 21:38:32 +02:00
fi