pergamum-ci (5)
Published 2026-08-30 04:11:36 +00:00 by zombor
Installation
docker pull git.zombor.net/zombor/pergamum-ci:5sha256:5ca1cf648c4a3a9ac0a9a7fd9f4cdc2d8460fc37dd83b7cf0af23c8d7f6d2235Image layers
| # debian.sh --arch 'amd64' out/ 'bookworm' '@1782172800' |
| RUN /bin/sh -c set -eux; apt-get update; apt-get install -y --no-install-recommends ca-certificates curl gnupg netbase sq wget ; rm -rf /var/lib/apt/lists/* # buildkit |
| RUN /bin/sh -c set -eux; apt-get update; apt-get install -y --no-install-recommends git mercurial openssh-client subversion procps ; rm -rf /var/lib/apt/lists/* # buildkit |
| RUN /bin/sh -c set -eux; apt-get update; apt-get install -y --no-install-recommends g++ gcc libc6-dev make pkg-config ; dpkgArch="$(dpkg --print-architecture)"; if [ "$dpkgArch" = 'arm64' ]; then apt-get install -y --no-install-recommends binutils-gold; fi; rm -rf /var/lib/apt/lists/* # buildkit |
| ENV GOLANG_VERSION=1.26.4 |
| ENV GOTOOLCHAIN=local |
| ENV GOPATH=/go |
| ENV PATH=/go/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin |
| COPY /target/ / # buildkit |
| RUN /bin/sh -c mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 1777 "$GOPATH" # buildkit |
| WORKDIR /go |
| RUN echo 'PATH="/usr/local/go/bin:/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"' > /etc/environment && echo 'export PATH="/usr/local/go/bin:/go/bin:$PATH"' > /etc/profile.d/golang.sh |
| RUN apt-get update -y && apt-get install -y --no-install-recommends chromium chromium-sandbox ca-certificates curl fonts-liberation gnupg libnss3 libxss1 libasound2 libatk-bridge2.0-0 libgtk-3-0 libx11-xcb1 libgbm1 && curl -fsSL https://deb.nodesource.com/setup_22.x | bash - && apt-get install -y --no-install-recommends nodejs && rm -rf /var/lib/apt/lists/* |
| RUN go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.12.2 && go install github.com/onsi/ginkgo/v2/ginkgo@v2.29.0 && go install github.com/sqlc-dev/sqlc/cmd/sqlc@latest |
| WORKDIR /build |
| COPY go.mod go.sum ./ |
| RUN go mod download |
| COPY go.mod go.sum ./ |
| RUN go mod download |
| COPY . . |
| RUN go build ./... && go build -tags e2e ./... && go build -tags integration ./... && go test -count=0 ./... && go test -count=0 -tags e2e ./... && go test -count=0 -tags integration ./... && (golangci-lint run --issues-exit-code=0 2>/dev/null || true) |
| RUN rm -rf /build |
| WORKDIR /build |
| COPY go.mod go.sum ./ |
| RUN go mod download |
| COPY . . |
| RUN go build ./... && go build -tags e2e ./... && go build -tags integration ./... && go test -run='^$' ./... && go test -run='^$' -tags e2e ./... && go test -run='^$' -tags integration ./... && go test -cover -run='^$' ./... && go test -race -run='^$' ./internal/bookdrop/... ./internal/library/... ./internal/cover/... ./internal/middleware/... ./internal/observability/... ./internal/books/... ./internal/imagehash/... && (golangci-lint run --issues-exit-code=0 2>/dev/null || true) |