diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..4773f5e061e230f88384ae47281a5d7141d9123f_LmdpdGxhYi1jaS55bWw= --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,19 @@ +variables: + SUBGROUP: xbus + FF_USE_FASTZIP: "true" + CACHE_COMPRESSION_LEVEL: "fast" + ARTIFACT_COMPRESSION_LEVEL: "fast" + +build_image: + image: + name: quay.orus.io/cc/buildkit + entrypoint: [""] + variables: + DOCKER_IMAGE: quay.orus.io/xbus-ci/xbus-build-image + DOCKERFILE: Dockerfile + DOCKER_BUILD_OPTS: --export-cache type=local,dest=$CI_PROJECT_DIR/.cache/buildkit --import-cache type=local,src=$CI_PROJECT_DIR/.cache/buildkit + cache: + paths: + - .cache/buildkit + script: + - build-img diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..4773f5e061e230f88384ae47281a5d7141d9123f_RG9ja2VyZmlsZQ== --- /dev/null +++ b/Dockerfile @@ -0,0 +1,41 @@ +FROM quay.orus.io/docker_mirror/golang:1.21.0-bookworm + +RUN DEBIAN_FRONTEND=noninteractive \ + apt-get update \ + && apt-get dist-upgrade -y + +RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ bookworm-pgdg main" > /etc/apt/sources.list.d/pgdg.list \ + && wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | \ + apt-key add - + +RUN DEBIAN_FRONTEND=noninteractive \ + apt-get update \ + && apt-get install -y \ + rsyslog \ + postgresql-14 \ + postgresql-client-14 \ + python3 python3-pip python3-dev \ + xz-utils \ + parallel \ + && pip3 install --upgrade mercurial hg-evolve --break-system-package \ + && apt-get remove python-dev -y \ + && apt-get clean \ + && apt-get autoclean + +RUN echo "[extensions]" > /etc/mercurial/hgrc \ + && echo "evolve =" >> /etc/mercurial/hgrc \ + && echo "topic =" >> /etc/mercurial/hgrc + +RUN echo "fsync = off" >> /etc/postgresql/14/postgresql.conf \ + && echo "synchronous_commit = off" >> /etc/postgresql/14/postgresql.conf \ + && echo "full_page_writes = off" >> /etc/postgresql/14/postgresql.conf \ + && echo "checkpoint_timeout = 1h" >> /etc/postgresql/14/postgresql.conf + +RUN /etc/init.d/postgresql start \ + && su postgres -c "psql -c \"CREATE DATABASE xbus\"" \ + && su postgres -c "psql -c \"CREATE ROLE xbus WITH SUPERUSER LOGIN PASSWORD 'xbus'\"" \ + && /etc/init.d/postgresql stop + +ENV POSTGRES_DSN="dbname=xbus user=xbus password=xbus sslmode=disable" + +RUN go install github.com/mitchellh/gox@latest