mirror of
https://gitea.publichub.eu/oscar.krause/fastapi-dls.git
synced 2024-12-28 08:34:04 +00:00
.gitlab-ci.yml improvements
This commit is contained in:
parent
5af1ba106d
commit
a7fb43e1dc
@ -7,10 +7,6 @@ build:docker:
|
|||||||
stage: build
|
stage: build
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH
|
- if: $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH
|
||||||
- changes:
|
|
||||||
- Dockerfile
|
|
||||||
- requirements.txt
|
|
||||||
- app/**/*
|
|
||||||
tags: [ docker ]
|
tags: [ docker ]
|
||||||
before_script:
|
before_script:
|
||||||
- echo "COMMIT=${CI_COMMIT_SHA}" >> version.env # COMMIT=`git rev-parse HEAD`
|
- echo "COMMIT=${CI_COMMIT_SHA}" >> version.env # COMMIT=`git rev-parse HEAD`
|
||||||
@ -23,10 +19,6 @@ build:debian:
|
|||||||
# 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
|
||||||
rules:
|
|
||||||
- changes:
|
|
||||||
- DEBIAN/**/*
|
|
||||||
- app/**/*
|
|
||||||
before_script:
|
before_script:
|
||||||
- apt-get update -qq && apt-get install -qq -y build-essential
|
- apt-get update -qq && apt-get install -qq -y build-essential
|
||||||
- chmod 0755 -R .
|
- chmod 0755 -R .
|
||||||
@ -99,6 +91,10 @@ deploy:docker:
|
|||||||
stage: deploy
|
stage: deploy
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||||
|
- changes:
|
||||||
|
- Dockerfile
|
||||||
|
- requirements.txt
|
||||||
|
- app/**/*
|
||||||
before_script:
|
before_script:
|
||||||
- echo "COMMIT=${CI_COMMIT_SHA}" >> version.env
|
- echo "COMMIT=${CI_COMMIT_SHA}" >> version.env
|
||||||
- source version.env
|
- source version.env
|
||||||
@ -121,8 +117,11 @@ deploy:debian:
|
|||||||
# doc: https://git.collinwebdesigns.de/help/user/packages/debian_repository/index.md#install-a-package
|
# doc: https://git.collinwebdesigns.de/help/user/packages/debian_repository/index.md#install-a-package
|
||||||
image: debian:bookworm-slim
|
image: debian:bookworm-slim
|
||||||
stage: deploy
|
stage: deploy
|
||||||
# rules:
|
rules:
|
||||||
# - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
#- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||||
|
- changes:
|
||||||
|
- DEBIAN/**/*
|
||||||
|
- app/**/*
|
||||||
needs:
|
needs:
|
||||||
- job: build:debian
|
- job: build:debian
|
||||||
artifacts: true
|
artifacts: true
|
||||||
|
Loading…
Reference in New Issue
Block a user