Initial commit
This commit is contained in:
29
.gitlab-ci.yml
Executable file
29
.gitlab-ci.yml
Executable file
@@ -0,0 +1,29 @@
|
||||
stages:
|
||||
- test
|
||||
- build
|
||||
- deploy
|
||||
|
||||
variables:
|
||||
DOCKER_REGISTRY: "registry.beaconborn.ru:5005"
|
||||
DOCKER_IMAGE: "$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME"
|
||||
DOCKER_TAG: "latest"
|
||||
|
||||
|
||||
test:
|
||||
stage: test
|
||||
image: python:3.11-alpine
|
||||
script:
|
||||
- pip install -r requirements.txt
|
||||
- pytest --maxfail=1 --disable-warnings -q
|
||||
only:
|
||||
- main
|
||||
|
||||
|
||||
build:
|
||||
stage: build
|
||||
script:
|
||||
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $DOCKER_REGISTRY
|
||||
- docker build -t $DOCKER_REGISTRY/$DOCKER_IMAGE:$DOCKER_TAG .
|
||||
- docker push $DOCKER_REGISTRY/$DOCKER_IMAGE:$DOCKER_TAG
|
||||
only:
|
||||
- main
|
||||
Reference in New Issue
Block a user