Draft: Gitlab CI #8

Open
JustScreaMy wants to merge 11 commits from 12-gitlab-ci into master
Showing only changes of commit 2b30676431 - Show all commits

View file

@ -6,9 +6,14 @@ stages:
- production
default:
image: python:3.12-slim
before_script:
- docker login ${CI_REGISTRY} -u gitlab-ci-token -p ${CI_JOB_TOKEN}
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
build_image:
stage: build
@ -17,6 +22,8 @@ build_image:
- docker
variables:
CONTAINER_NAME: ${CI_REGISTRY_IMAGE}/facturio
before_script:
- docker login ${CI_REGISTRY} -u gitlab-ci-token -p ${CI_JOB_TOKEN}
script:
- docker build -t ${CONTAINER_NAME}:${CI_COMMIT_REF_NAME} .
- docker push ${CONTAINER_NAME}:${CI_COMMIT_REF_NAME}