2024-08-15 19:26:47 +03:00
|
|
|
stages:
|
|
|
|
- lint
|
2024-08-16 16:23:57 +03:00
|
|
|
- build
|
2024-08-15 19:26:47 +03:00
|
|
|
|
|
|
|
lint-pre-commit:
|
|
|
|
stage: lint
|
|
|
|
image: python:3.12-bullseye
|
|
|
|
before_script:
|
2024-10-10 02:02:31 +03:00
|
|
|
- export PIP_CACHE_DIR=$(pwd)/.cache/pip
|
|
|
|
- export PRE_COMMIT_HOME=$(pwd)/.cache/pre-commit
|
2024-08-15 19:26:47 +03:00
|
|
|
- pip install pre-commit
|
|
|
|
scripts:
|
|
|
|
- pre-commit run --all-files
|
|
|
|
cache:
|
|
|
|
paths:
|
|
|
|
- .cache/pip
|
|
|
|
- .cache/pre-commit
|
2024-08-16 16:23:57 +03:00
|
|
|
|
2024-08-19 09:58:48 +03:00
|
|
|
.docker-dev-build-template:
|
2024-08-16 16:23:57 +03:00
|
|
|
before_script:
|
|
|
|
- docker info
|
|
|
|
- docker login -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD} ${CI_REGISTRY}
|
|
|
|
scripts:
|
|
|
|
- |
|
2024-08-19 09:58:48 +03:00
|
|
|
cd ./src/${KARKAS_PROJECT}
|
2024-08-16 16:23:57 +03:00
|
|
|
export IMAGE_COMMIT=${IMAGE_NAME}:${CI_COMMIT_SHA}
|
|
|
|
export IMAGE_BRANCH=${IMAGE_NAME}:$(echo $CI_COMMIT_REF_NAME | sed 's/[^a-zA-Z0-9]/-/g')
|
|
|
|
docker build -t ${IMAGE_COMMIT} -t ${IMAGE_BRANCH} -f Dockerfile ../..
|
|
|
|
docker push ${IMAGE_COMMIT}
|
|
|
|
docker push ${IMAGE_BRANCH}
|
2024-08-19 09:58:48 +03:00
|
|
|
|
|
|
|
build-gnomik:
|
|
|
|
stage: build
|
|
|
|
image: docker:27.1.2
|
|
|
|
variables:
|
|
|
|
CI_REGISTRY: registry.gitflic.ru
|
|
|
|
IMAGE_NAME: registry.gitflic.ru/project/alt-gnome/karkas/gnomik
|
|
|
|
KARKAS_PROJECT: gnomik
|
|
|
|
extends: .docker-dev-build-template
|
2024-10-03 20:00:25 +03:00
|
|
|
|
|
|
|
build-karkas-lite:
|
|
|
|
stage: build
|
|
|
|
image: docker:27.1.2
|
|
|
|
variables:
|
|
|
|
CI_REGISTRY: registry.gitflic.ru
|
|
|
|
IMAGE_NAME: registry.gitflic.ru/project/alt-gnome/karkas/karkas-lite
|
|
|
|
KARKAS_PROJECT: karkas_lite
|
|
|
|
extends: .docker-dev-build-template
|