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
807 B
YAML
Raw 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:
CONTAINER_NAME: ${CI_REGISTRY_IMAGE}/facturio
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-17 21:44:04 +02:00
- docker build -t ${CONTAINER_NAME}:${CI_COMMIT_REF_NAME} .
- docker push ${CONTAINER_NAME}:${CI_COMMIT_REF_NAME}
2024-08-17 21:38:32 +02:00
- |
2024-08-17 21:44:04 +02:00
if [[ -n "${CI_COMMIT_TAG}" ]]; then
docker tag ${CONTAINER_NAME}:${CI_COMMIT_REF_NAME} ${CONTAINER_NAME}:${CI_COMMIT_TAG}
docker push ${CONTAINER_NAME}:${CI_COMMIT_TAG}
2024-08-17 21:38:32 +02:00
fi