-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from dell/release-1.3.0
CSI Driver for Dell EMC PowerScale 1.3.0
- Loading branch information
Showing
69 changed files
with
3,222 additions
and
1,323 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,17 @@ | ||
# Binaries for programs and plugins | ||
*.exe | ||
*.exe~ | ||
*.dll | ||
*.so | ||
*.dylib | ||
|
||
# Test binary, build with `go test -c` | ||
*.test | ||
|
||
# Output of the go coverage tool, specifically when used with LiteIDE | ||
*.out | ||
# Binaries for programs and plugins | ||
*.exe | ||
*.exe~ | ||
*.dll | ||
*.so | ||
*.dylib | ||
|
||
# Test binary, build with `go test -c` | ||
*.test | ||
|
||
# Output of the go coverage tool, specifically when used with LiteIDE | ||
*.out | ||
|
||
*.swp | ||
helm/myvalues.yaml | ||
semver.mk | ||
goisilon |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,55 @@ | ||
FROM centos:8 | ||
RUN yum install -y libaio | ||
RUN yum install -y libuuid | ||
RUN yum install -y numactl | ||
RUN yum install -y xfsprogs | ||
RUN yum install -y e4fsprogs | ||
RUN yum install -y nfs-utils | ||
RUN yum --enablerepo=cr update -y | ||
RUN yum clean all | ||
COPY "csi-isilon" . | ||
ENTRYPOINT ["/csi-isilon"] | ||
# some arguments that must be supplied | ||
ARG GOPROXY | ||
ARG GOVERSION | ||
ARG BASEIMAGE | ||
|
||
# Stage to build the driver | ||
FROM golang:${GOVERSION} as builder | ||
ARG GOPROXY | ||
RUN mkdir -p /go/src | ||
COPY ./ /go/src/ | ||
WORKDIR /go/src/ | ||
RUN CGO_ENABLED=0 \ | ||
make build | ||
|
||
# Stage to build the driver image | ||
FROM $BASEIMAGE AS driver | ||
# install necessary packages | ||
# alphabetical order for easier maintenance | ||
RUN microdnf install -y \ | ||
e4fsprogs \ | ||
libaio \ | ||
libuuid \ | ||
nfs-utils \ | ||
numactl \ | ||
xfsprogs && \ | ||
microdnf clean all | ||
# copy in the driver | ||
COPY --from=builder /go/src/csi-isilon / | ||
ENTRYPOINT ["/csi-isilon"] | ||
|
||
# Stage to check for critical and high CVE issues via Trivy (https://github.com/aquasecurity/trivy) | ||
# will break image build if CRITICAL issues found | ||
# will print out all HIGH issues found | ||
FROM driver as cvescan | ||
# run trivy and clean up all traces after | ||
RUN microdnf install -y --enablerepo=ubi-8-baseos tar && \ | ||
microdnf clean all && \ | ||
curl https://raw.githubusercontent.com/aquasecurity/trivy/master/contrib/install.sh | sh && \ | ||
trivy fs -s CRITICAL --exit-code 1 / && \ | ||
trivy fs -s HIGH / && \ | ||
trivy image --reset && \ | ||
rm ./bin/trivy | ||
|
||
# final stage | ||
# simple stage to use the driver image as the resultant image | ||
FROM driver as final | ||
|
||
LABEL vendor="Dell Inc." \ | ||
name="csi-isilon" \ | ||
summary="CSI Driver for Dell EMC PowerScale" \ | ||
description="CSI Driver for provisioning persistent storage from Dell EMC PowerScale" \ | ||
version="1.3.0" \ | ||
license="Apache-2.0" | ||
|
||
COPY ./licenses /licenses |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,66 @@ | ||
all: clean build | ||
|
||
# Tag parameters | ||
MAJOR=1 | ||
MINOR=0 | ||
PATCH=0 | ||
NOTES= | ||
TAGMSG="CSI Spec 1.0" | ||
|
||
clean: | ||
rm -f core/core_generated.go | ||
go clean | ||
|
||
check: | ||
@./check.sh | ||
|
||
format: | ||
@gofmt -w -s . | ||
|
||
build: | ||
go generate | ||
@./check.sh | ||
GOOS=linux CGO_ENABLED=0 go build | ||
|
||
install: | ||
go generate | ||
GOOS=linux CGO_ENABLED=0 go install | ||
|
||
# Tags the release with the Tag parameters set above | ||
tag: | ||
-git tag -d v$(MAJOR).$(MINOR).$(PATCH)$(NOTES) | ||
git tag -a -m $(TAGMSG) v$(MAJOR).$(MINOR).$(PATCH)$(NOTES) | ||
|
||
# Generates the docker container (but does not push) | ||
docker: | ||
# go generate | ||
go run core/semver/semver.go -f mk >semver.mk | ||
make -f docker.mk docker | ||
|
||
# Pushes container to the repository | ||
push: docker | ||
make -f docker.mk push | ||
|
||
# Windows or Linux; requires no hardware | ||
unit-test: | ||
( cd service; go clean -cache; go test -v -coverprofile=c.out ./... ) | ||
|
||
# Linux only; populate env.sh with the hardware parameters | ||
integration-test: | ||
( cd test/integration; sh run.sh ) | ||
|
||
version: | ||
go generate | ||
go run core/semver/semver.go -f mk >semver.mk | ||
make -f docker.mk version | ||
|
||
gosec: | ||
gosec -quiet -log gosec.log -out=gosecresults.csv -fmt=csv ./... | ||
|
||
|
||
# default target | ||
all: help | ||
|
||
# include an overrides file, which sets up default values and allows user overrides | ||
include overrides.mk | ||
|
||
# Help target, prints usefule information | ||
help: | ||
@echo | ||
@echo "The following targets are commonly used:" | ||
@echo | ||
@echo "build - Builds the code locally" | ||
@echo "check - Runs the suite of code checking tools: lint, format, etc" | ||
@echo "clean - Cleans the local build" | ||
@echo "docker - Builds the code within a golang container and then creates the driver image" | ||
@echo "integration-test - Runs the integration tests. Requires access to an array" | ||
@echo "push - Pushes the built container to a target registry" | ||
@echo "unit-test - Runs the unit tests" | ||
@echo | ||
@make -s overrides-help | ||
|
||
# Clean the build | ||
clean: | ||
rm -f core/core_generated.go | ||
rm -f semver.mk | ||
go clean | ||
|
||
# Dependencies | ||
dependencies: | ||
go generate | ||
go run core/semver/semver.go -f mk >semver.mk | ||
|
||
check: | ||
@./check.sh | ||
|
||
format: | ||
@gofmt -w -s . | ||
|
||
# Build the driver locally | ||
build: dependencies check | ||
GOOS=linux CGO_ENABLED=0 go build | ||
|
||
# Generates the docker container (but does not push) | ||
docker: dependencies | ||
make -f docker.mk docker | ||
|
||
# Pushes container to the repository | ||
push: docker | ||
make -f docker.mk push | ||
|
||
# Windows or Linux; requires no hardware | ||
unit-test: | ||
( cd service; go clean -cache; go test -v -coverprofile=c.out ./... ) | ||
|
||
# Linux only; populate env.sh with the hardware parameters | ||
integration-test: | ||
( cd test/integration; sh run.sh ) | ||
|
||
version: | ||
go generate | ||
go run core/semver/semver.go -f mk >semver.mk | ||
make -f docker.mk version | ||
|
||
gosec: | ||
gosec -quiet -log gosec.log -out=gosecresults.csv -fmt=csv ./... | ||
|
Oops, something went wrong.