Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: use golang bci instead of manual download #261

Merged
merged 1 commit into from
Jun 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 5 additions & 13 deletions Dockerfile.dapper
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ ARG http_proxy
ARG https_proxy

ENV HOST_ARCH=${DAPPER_HOST_ARCH} ARCH=${DAPPER_HOST_ARCH}
ENV PATH /go/bin:$PATH
ENV DAPPER_DOCKER_SOCKET true
ENV DAPPER_ENV TAG REPO DRONE_REPO DRONE_PULL_REQUEST DRONE_COMMIT_REF
ENV DAPPER_OUTPUT bin coverage.out
Expand All @@ -16,25 +15,18 @@ ENTRYPOINT ["./scripts/entry"]
CMD ["ci"]

RUN zypper -n addrepo --refresh https://download.opensuse.org/repositories/system:/snappy/SLE_15/system:snappy.repo && \
zypper --gpg-auto-import-keys ref && \
zypper -n ref && \
zypper update -y
zypper --gpg-auto-import-keys ref

# Install packages
RUN zypper -n install cmake wget curl git less file \
libkmod-devel libnl3-devel linux-glibc-devel pkg-config psmisc python3-tox fuse python3-devel qemu-tools \
bash-completion librdmacm1 librdmacm-utils libibverbs xsltproc docbook-xsl-stylesheets \
perl-Config-General libaio-devel glibc-devel-static glibc-devel iptables libltdl7 libdevmapper1_03 iproute2 jq docker gcc

# FIXME: Needed for ${!var} substitution
RUN rm -f /bin/sh && ln -s /bin/bash /bin/sh
## Install golangci-lint
RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b /go/bin v1.55.2

# Install tools

## golangci-lint
RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.55.2

## Docker Buildx: The docker version in dapper is too old to have buildx. Install it manually.
RUN wget https://github.com/docker/buildx/releases/download/v0.13.1/buildx-v0.13.1.linux-${ARCH} && \
## Install Docker Buildx: The docker version in dapper is too old to have buildx. Install it manually.
RUN curl -sSfLO https://github.com/docker/buildx/releases/download/v0.13.1/buildx-v0.13.1.linux-${ARCH} && \
chmod +x buildx-v0.13.1.linux-${ARCH} && \
mv buildx-v0.13.1.linux-${ARCH} /usr/local/bin/buildx
4 changes: 3 additions & 1 deletion package/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ ENV ARCH ${TARGETPLATFORM#linux/}

RUN zypper -n addrepo --refresh https://download.opensuse.org/repositories/system:/snappy/SLE_15/system:snappy.repo && \
zypper -n addrepo --refresh https://download.opensuse.org/repositories/network:/utilities/SLE_15_SP5/network:utilities.repo && \
zypper --gpg-auto-import-keys ref
zypper --gpg-auto-import-keys ref && \
zypper -n ref && \
zypper update -y

RUN zypper -n install kmod curl wget nfs-client nfs4-acl-tools fuse \
librdmacm1 librdmacm-utils libibverbs perl-Config-General libaio-devel sg3_utils \
Expand Down