Skip to content

Commit

Permalink
Docker files clean up and unit test coverage (#425)
Browse files Browse the repository at this point in the history
  • Loading branch information
santhoshatdell authored Feb 6, 2025
1 parent 5574c26 commit 30aa32e
Show file tree
Hide file tree
Showing 11 changed files with 372 additions and 320 deletions.
12 changes: 1 addition & 11 deletions docker-files/Dockerfile.ubi.micro → Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#
#
# Copyright © 2023-2025 Dell Inc. or its subsidiaries. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -11,13 +9,8 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#

# Dockerfile to build PowerStore CSI Driver
# based on UBI-micro image
# Requires: RHEL host with subscription

# some arguments that must be supplied
ARG GOIMAGE
ARG BASEIMAGE

Expand All @@ -32,9 +25,7 @@ RUN GOOS=linux CGO_ENABLED=0 go build -o csi-powerstore ./cmd/csi-powerstore

# Stage to build the driver image
FROM $BASEIMAGE

WORKDIR /

LABEL vendor="Dell Technologies" \
maintainer="Dell Technologies" \
name="csi-powerstore" \
Expand All @@ -43,7 +34,6 @@ LABEL vendor="Dell Technologies" \
release="1.13.0" \
version="2.13.0" \
license="Apache-2.0"

COPY licenses /licenses

# validate some cli utilities are found
Expand Down
10 changes: 2 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,6 @@

all: clean build

# Dockerfile defines which base image to use [Dockerfile.centos, Dockerfile.ubi, Dockerfile.ubi.min, Dockerfile.ubi.alt]
# e.g.:$ make docker DOCKER_FILE=Dockerfile.ubi.alt
ifndef DOCKER_FILE
DOCKER_FILE = Dockerfile.ubi.micro
endif

# Tag parameters
ifndef MAJOR
MAJOR=2
Expand Down Expand Up @@ -63,12 +57,12 @@ tag:
# Generates the docker container (but does not push)
docker:
go run core/semver/semver.go -f mk >semver.mk
make -f docker.mk DOCKER_FILE=docker-files/$(DOCKER_FILE) docker
make -f docker.mk DOCKER_FILE=Dockerfile docker

# Same as `docker` but without cached layers and will pull latest version of base image
docker-no-cache:
go run core/semver/semver.go -f mk >semver.mk
make -f docker.mk DOCKER_FILE=docker-files/$(DOCKER_FILE) docker-no-cache
make -f docker.mk DOCKER_FILE=Dockerfile docker-no-cache

# Pushes container to the repository
push: docker
Expand Down
45 changes: 0 additions & 45 deletions docker-files/Dockerfile.centos

This file was deleted.

46 changes: 0 additions & 46 deletions docker-files/Dockerfile.ubi

This file was deleted.

59 changes: 0 additions & 59 deletions docker-files/Dockerfile.ubi.alt

This file was deleted.

52 changes: 0 additions & 52 deletions docker-files/Dockerfile.ubi.min

This file was deleted.

66 changes: 66 additions & 0 deletions mocks/NodeLabelsModifier.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 30aa32e

Please sign in to comment.