.gitlab-ci.yml - fixed test:debian

This commit is contained in:
Oscar Krause 2022-12-29 07:43:16 +01:00
parent d73221afb7
commit 76f732adb6

View File

@ -104,14 +104,16 @@ test:
script: script:
# test installation # test installation
- apt-get install -q -y ./build/build.deb --fix-missing - apt-get install -q -y ./build/build.deb --fix-missing
- openssl req -x509 -newkey rsa:2048 -nodes -out /etc/fastapi-dls/webserver.crt -keyout /etc/fastapi-dls/webserver.key -days 7 -subj "/C=DE/O=GitLab-CI/OU=Test/CN=localhost"
# copy example config from GitLab-CI-Variables # copy example config from GitLab-CI-Variables
#- cat ${EXAMPLE_CONFIG} > /etc/fastapi-dls/env #- cat ${EXAMPLE_CONFIG} > /etc/fastapi-dls/env
# start service in background # start service in background
- cd /usr/share/fastapi-dls/app - cd /usr/share/fastapi-dls/app
- uvicorn --host 127.0.0.1 --port 443 - uvicorn main:app
--host 127.0.0.1 --port 443
--app-dir /usr/share/fastapi-dls/app --app-dir /usr/share/fastapi-dls/app
--ssl-keyfile /etc/fastapi-dls/webserver.key --ssl-keyfile /etc/fastapi-dls/webserver.key
--ssl-certfile /opt/fastapi-dls/webserver.crt --ssl-certfile /etc/fastapi-dls/webserver.crt
--proxy-headers & --proxy-headers &
- FASTAPI_DLS_PID=$! - FASTAPI_DLS_PID=$!
- echo "Started service with pid $FASTAPI_DLS_PID" - echo "Started service with pid $FASTAPI_DLS_PID"
@ -132,6 +134,10 @@ test:ubuntu:
test:archlinux: test:archlinux:
image: archlinux:base image: archlinux:base
rules:
- changes:
- .PKGBUILD/**/*
- app/**/*
needs: needs:
- job: build:pacman - job: build:pacman
artifacts: true artifacts: true
@ -171,9 +177,6 @@ deploy:apt:
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:apt - job: build:apt
artifacts: true artifacts: true
@ -212,14 +215,11 @@ deploy:apt:
deploy:pacman: deploy:pacman:
image: archlinux:base-devel image: archlinux:base-devel
stage: deploy stage: deploy
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
# - changes:
# - .PKGBUILD/**/*
# - app/**/*
needs: needs:
- job: build:pacman - job: build:pacman
artifacts: true artifacts: true
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
script: script:
- source .PKGBUILD/PKGBUILD - source .PKGBUILD/PKGBUILD
# fastapi-dls-1.0-1-any.pkg.tar.zst # fastapi-dls-1.0-1-any.pkg.tar.zst