From a02d1ab9dff3791df17b53abf0796119246ea954 Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Wed, 28 Dec 2022 21:20:19 +0100 Subject: [PATCH] .gitlab-ci.yml - handle artifact --- PKGBUILD => .PKGBUILD/PKGBUILD | 2 +- fastapi-dls.default => .PKGBUILD/fastapi-dls.default | 0 fastapi-dls.install => .PKGBUILD/fastapi-dls.install | 0 fastapi-dls.service => .PKGBUILD/fastapi-dls.service | 0 .gitlab-ci.yml | 9 ++++++++- 5 files changed, 9 insertions(+), 2 deletions(-) rename PKGBUILD => .PKGBUILD/PKGBUILD (91%) rename fastapi-dls.default => .PKGBUILD/fastapi-dls.default (100%) rename fastapi-dls.install => .PKGBUILD/fastapi-dls.install (100%) rename fastapi-dls.service => .PKGBUILD/fastapi-dls.service (100%) diff --git a/PKGBUILD b/.PKGBUILD/PKGBUILD similarity index 91% rename from PKGBUILD rename to .PKGBUILD/PKGBUILD index a70b36e..3a2fac0 100644 --- a/PKGBUILD +++ b/.PKGBUILD/PKGBUILD @@ -11,7 +11,7 @@ license=('MIT') depends=('python' 'python-jose' 'python-starlette' 'python-httpx' 'python-fastapi' 'python-dotenv' 'python-dateutil' 'python-sqlalchemy' 'python-pycryptodome' 'uvicorn' 'python-markdown' 'openssl') provider=("$pkgname") install="$pkgname.install" -source=('git+https://git.collinwebdesigns.de/oscar.krause/fastapi-dls.git#commit=3d5203dae054020e6f56e5f457fac1fbacc6f05d' # https://gitea.publichub.eu/oscar.krause/fastapi-dls.git +source=('git+file:///builds/oscar.krause/fastapi-dls' # https://gitea.publichub.eu/oscar.krause/fastapi-dls.git "$pkgname.default" "$pkgname.service") sha256sums=('SKIP' diff --git a/fastapi-dls.default b/.PKGBUILD/fastapi-dls.default similarity index 100% rename from fastapi-dls.default rename to .PKGBUILD/fastapi-dls.default diff --git a/fastapi-dls.install b/.PKGBUILD/fastapi-dls.install similarity index 100% rename from fastapi-dls.install rename to .PKGBUILD/fastapi-dls.install diff --git a/fastapi-dls.service b/.PKGBUILD/fastapi-dls.service similarity index 100% rename from fastapi-dls.service rename to .PKGBUILD/fastapi-dls.service diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8ffad3e..ebf8150 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -20,7 +20,6 @@ build:apt: stage: build before_script: - apt-get update -qq && apt-get install -qq -y build-essential - - chmod 0755 -R . # create build directory for .deb sources - mkdir build # copy install instructions @@ -48,15 +47,23 @@ build:pamac: - if: $CI_COMMIT_BRANCH == "archlinux-makepkg" before_script: - pacman -Syu --noconfirm git + # "makepkg" don't likes root user - useradd --no-create-home --shell=/bin/false build && usermod -L build - 'echo "build ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers' - 'echo "root ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers' - chown -R build:build . + # move .PKGBUILD contents to root directory + - mv .PKGBUILD/* . script: + - pwd # download dependencies - source PKGBUILD && pacman -Syu --noconfirm --needed --asdeps "${makedepends[@]}" "${depends[@]}" # build - sudo -u build makepkg -s + artifacts: + expire_in: 1 week + paths: + - "*.pkg.tar.zst" test: image: python:3.10-slim-bullseye