mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 02:33:34 +00:00
add make target for containerized tests
`make containerized-test` has been added as a make target. This runs the 'make test' target in a container. All test dependencies are installed in the container once, and the container is kept around for running `make containerized-test` subsequently. The test container is based on Fedora:latest so that all test tools get easily installed and are available in a recent version. The production container is based on the Ceph container which has CentOS as Operating System and therefor a more stable (too old) toolset. Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
committed by
mergify[bot]
parent
58c2a3f15f
commit
3c6054ddf9
43
scripts/Dockerfile.test
Normal file
43
scripts/Dockerfile.test
Normal file
@ -0,0 +1,43 @@
|
||||
# Container image for running the Ceph-CSI tests
|
||||
#
|
||||
# This container is based on Fedora so that recent versions of tools can easily
|
||||
# be installed.
|
||||
#
|
||||
# Production containers are based one ceph/ceph:latest, which use CentOS as
|
||||
# Operating System, so generated binaries and versions of dependencies may be a
|
||||
# little different.
|
||||
#
|
||||
|
||||
FROM fedora:latest
|
||||
|
||||
ARG GOLANGCI_VERSION=v1.21.0
|
||||
ARG GOSEC_VERSION=2.0.0
|
||||
ARG GOPATH=/go
|
||||
|
||||
ENV \
|
||||
GOPATH=${GOPATH} \
|
||||
GO111MODULE=on \
|
||||
PATH="${GOPATH}/bin:${PATH}"
|
||||
|
||||
|
||||
RUN dnf -y install \
|
||||
git \
|
||||
make \
|
||||
golang \
|
||||
gcc \
|
||||
librados-devel \
|
||||
librbd-devel \
|
||||
rubygems \
|
||||
ShellCheck \
|
||||
yamllint \
|
||||
&& dnf -y update \
|
||||
&& dnf -y clean all \
|
||||
&& gem install mdl \
|
||||
&& curl -sf "https://install.goreleaser.com/github.com/golangci/golangci-lint.sh" \
|
||||
| bash -s -- -b ${GOPATH}/bin "${GOLANGCI_VERSION}" \
|
||||
&& curl -sfL "https://raw.githubusercontent.com/securego/gosec/master/install.sh" \
|
||||
| sh -s -- -b $GOPATH/bin "${GOSEC_VERSION}" \
|
||||
&& curl -L https://git.io/get_helm.sh | bash \
|
||||
&& true
|
||||
|
||||
WORKDIR /go/src/github.com/ceph/ceph-csi
|
Reference in New Issue
Block a user