From a7fb43e1dc81b141f81562f6f400dcab938074a0 Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Wed, 28 Dec 2022 12:08:13 +0100 Subject: [PATCH] .gitlab-ci.yml improvements --- .gitlab-ci.yml | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e2da6f7..f8c8ab9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,10 +7,6 @@ build:docker: stage: build rules: - if: $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH - - changes: - - Dockerfile - - requirements.txt - - app/**/* tags: [ docker ] before_script: - echo "COMMIT=${CI_COMMIT_SHA}" >> version.env # COMMIT=`git rev-parse HEAD` @@ -23,10 +19,6 @@ build:debian: # debian:bullseye-slim image: debian:bookworm-slim # just to get "python3-jose" working stage: build - rules: - - changes: - - DEBIAN/**/* - - app/**/* before_script: - apt-get update -qq && apt-get install -qq -y build-essential - chmod 0755 -R . @@ -99,6 +91,10 @@ deploy:docker: stage: deploy rules: - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + - changes: + - Dockerfile + - requirements.txt + - app/**/* before_script: - echo "COMMIT=${CI_COMMIT_SHA}" >> 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 image: debian:bookworm-slim stage: deploy - # rules: - # - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + rules: + #- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + - changes: + - DEBIAN/**/* + - app/**/* needs: - job: build:debian artifacts: true