mirror of
https://git.collinwebdesigns.de/oscar.krause/fastapi-dls.git
synced 2024-11-23 23:41:06 +03:00
.gitlab-ci.yml - added ubuntu to test:debian stage
This commit is contained in:
parent
d91b81e50f
commit
9ab0eb4796
@ -15,7 +15,7 @@ build:docker:
|
|||||||
- docker build . --tag ${CI_REGISTRY}/${CI_PROJECT_PATH}/${CI_BUILD_REF_NAME}:${CI_BUILD_REF}
|
- docker build . --tag ${CI_REGISTRY}/${CI_PROJECT_PATH}/${CI_BUILD_REF_NAME}:${CI_BUILD_REF}
|
||||||
- docker push ${CI_REGISTRY}/${CI_PROJECT_PATH}/${CI_BUILD_REF_NAME}:${CI_BUILD_REF}
|
- docker push ${CI_REGISTRY}/${CI_PROJECT_PATH}/${CI_BUILD_REF_NAME}:${CI_BUILD_REF}
|
||||||
|
|
||||||
build:debian:
|
build:package:
|
||||||
# debian:bullseye-slim
|
# debian:bullseye-slim
|
||||||
image: debian:bookworm-slim # just to get "python3-jose" working
|
image: debian:bookworm-slim # just to get "python3-jose" working
|
||||||
stage: build
|
stage: build
|
||||||
@ -57,14 +57,13 @@ test:
|
|||||||
script:
|
script:
|
||||||
- pytest main.py
|
- pytest main.py
|
||||||
|
|
||||||
test:debian:
|
.test:linux:
|
||||||
image: debian:bookworm-slim
|
|
||||||
stage: test
|
stage: test
|
||||||
|
needs:
|
||||||
|
- job: build:package
|
||||||
|
artifacts: true
|
||||||
variables:
|
variables:
|
||||||
DEBIAN_FRONTEND: noninteractive
|
DEBIAN_FRONTEND: noninteractive
|
||||||
needs:
|
|
||||||
- job: build:debian
|
|
||||||
artifacts: true
|
|
||||||
before_script:
|
before_script:
|
||||||
- apt-get update -qq && apt-get install -qq -y jq
|
- apt-get update -qq && apt-get install -qq -y jq
|
||||||
script:
|
script:
|
||||||
@ -87,6 +86,14 @@ test:debian:
|
|||||||
- apt-get purge -qq -y fastapi-dls
|
- apt-get purge -qq -y fastapi-dls
|
||||||
- apt-get autoremove -qq -y && apt-get clean -qq
|
- apt-get autoremove -qq -y && apt-get clean -qq
|
||||||
|
|
||||||
|
test:debian:
|
||||||
|
extends: .test:linux
|
||||||
|
image: debian:bookworm-slim
|
||||||
|
|
||||||
|
test:ubuntu:
|
||||||
|
extends: .test:linux
|
||||||
|
image: ubuntu:22.10
|
||||||
|
|
||||||
deploy:docker:
|
deploy:docker:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
rules:
|
rules:
|
||||||
@ -123,7 +130,7 @@ deploy:debian:
|
|||||||
- DEBIAN/**/*
|
- DEBIAN/**/*
|
||||||
- app/**/*
|
- app/**/*
|
||||||
needs:
|
needs:
|
||||||
- job: build:debian
|
- job: build:package
|
||||||
artifacts: true
|
artifacts: true
|
||||||
before_script:
|
before_script:
|
||||||
- apt-get update -qq && apt-get install -qq -y curl lsb-release
|
- apt-get update -qq && apt-get install -qq -y curl lsb-release
|
||||||
|
Loading…
Reference in New Issue
Block a user