Skip to content

Commit 2ab49b9

Browse files
committed
ci: use golang bci instead of manual download
ref: longhorn/longhorn#8721 Signed-off-by: davidko <[email protected]>
1 parent d1662b2 commit 2ab49b9

File tree

2 files changed

+8
-14
lines changed

2 files changed

+8
-14
lines changed

Dockerfile.dapper

+5-13
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ ARG http_proxy
55
ARG https_proxy
66

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

1817
RUN zypper -n addrepo --refresh https://download.opensuse.org/repositories/system:/snappy/SLE_15/system:snappy.repo && \
19-
zypper --gpg-auto-import-keys ref && \
20-
zypper -n ref && \
21-
zypper update -y
18+
zypper --gpg-auto-import-keys ref
2219

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

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

32-
# Install tools
33-
34-
## golangci-lint
35-
RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.55.2
36-
37-
## Docker Buildx: The docker version in dapper is too old to have buildx. Install it manually.
38-
RUN wget https://github.com/docker/buildx/releases/download/v0.13.1/buildx-v0.13.1.linux-${ARCH} && \
29+
## Install Docker Buildx: The docker version in dapper is too old to have buildx. Install it manually.
30+
RUN curl -sSfLO https://github.com/docker/buildx/releases/download/v0.13.1/buildx-v0.13.1.linux-${ARCH} && \
3931
chmod +x buildx-v0.13.1.linux-${ARCH} && \
4032
mv buildx-v0.13.1.linux-${ARCH} /usr/local/bin/buildx

package/Dockerfile

+3-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ ENV ARCH ${TARGETPLATFORM#linux/}
1212

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

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

0 commit comments

Comments
 (0)