From 5c5316eb370dbaafd979c2b96fc31bfc09ce4a37 Mon Sep 17 00:00:00 2001 From: Ivan Fonarev Date: Fri, 27 Oct 2023 21:50:49 +0300 Subject: [PATCH] Try to add CI/CD --- .gitlab-ci.yml | 27 +++++++++++++++++++++++++++ Dockerfile | 9 +++++++++ 2 files changed, 36 insertions(+) create mode 100644 .gitlab-ci.yml create mode 100644 Dockerfile diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..4e497b8 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,27 @@ +# Is performed before the scripts in the stages step +tags: + - selfhosted-1 +before_script: + - source /etc/profile + +# Defines stages which are to be executed +stages: + - build + +# Stage "build" +run-build: + stage: build + script: + - apt install -y build-essential dh-make devscripts + - dpkg-buildpackage -us -uc + - mkdir build + - mv ../* build/ + + # This stage is only executed for new tags + only: + - tags + + # The files which are to be made available in GitLab + artifacts: + paths: + - build/* diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..3048011 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,9 @@ +FROM debian:bookworm +WORKDIR /app +COPY . /app +RUN apt update + +RUN apt install -y git dh-make build-essential autoconf autotools-dev +RUN apt-get clean autoclean +RUN apt-get autoremove --yes +RUN rm -rf /var/lib/{apt,dpkg,cache,log}/ \ No newline at end of file