Skip to content

Commit

Permalink
Readme update (#202)
Browse files Browse the repository at this point in the history
Updated the readme & some code to show more accurate description & function of the repo. Also removed unused links and sections.
  • Loading branch information
mbasha-dell authored Aug 20, 2024
1 parent a93d605 commit c1c4169
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/development.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ jobs:
chmod +x ./scripts/build-ubi-micro.sh
make build-base-image
podman build -t docker.io/${{ env.IMAGENAME }}:${{ env.IMAGETAG }} -f ./Dockerfile --build-arg GOIMAGE=golang:latest --build-arg BASEIMAGE="localhost/cosi-ubimicro"
podman save docker.io/library/${{ env.IMAGENAME }}:${{ env.IMAGETAG }} -o /tmp/cosi.tar
podman save docker.io/${{ env.IMAGENAME }}:${{ env.IMAGETAG }} -o /tmp/cosi.tar
docker load -i /tmp/cosi.tar
- name: Run trivy action
uses: aquasecurity/trivy-action@master
Expand Down
26 changes: 15 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright © 2023 Dell Inc. or its subsidiaries. All Rights Reserved.
# Copyright © 2023 - 2024 Dell Inc. or its subsidiaries. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -37,6 +37,10 @@ clean: ##clean directory

.PHONY: codegen
codegen: clean ##regenerate files
go generate -skip="mockery" ./...

.PHONY: mockgen
mockgen: clean
go generate ./...

# FIXME: remove this target after we remove dependency on private goobjectscale.
Expand All @@ -45,7 +49,7 @@ vendor: ##generate the vendor directory
go mod vendor

.PHONY: build
build: ##build project
build: codegen ##build project
GOOS=linux CGO_ENABLED=0 go build -ldflags="-s -w" -o ${COSI_BUILD_DIR}/cosi ${COSI_BUILD_PATH}

########################################################################
Expand All @@ -55,20 +59,20 @@ build: ##build project
.PHONY: build-base-image
build-base-image: vendor download-csm-common
$(eval include csm-common.mk)
sh ./scripts/build-ubi-micro.sh $(DEFAULT_BASEIMAGE)
sh ./scripts/build-ubi-micro.sh $(DEFAULT_BASEIMAGE);
$(eval BASEIMAGE=cosi-ubimicro:latest)

.PHONY: docker
docker: build-base-image
.PHONY: podman
podman: build-base-image
@echo "Base Images is set to: $(BASEIMAGE)"
@echo "Building: $(IMAGENAME):$(IMAGETAG)"
docker build -t "$(IMAGENAME):$(IMAGETAG)" --build-arg BASEIMAGE=$(BASEIMAGE) --build-arg GOIMAGE=$(DEFAULT_GOIMAGE) .
podman build -t "$(IMAGENAME):$(IMAGETAG)" --build-arg BASEIMAGE=$(BASEIMAGE) --build-arg GOIMAGE=$(DEFAULT_GOIMAGE) .

.PHONY: push
push: docker ##build and push the docker container to repository
push: podman ##build and push the podman container to repository
@echo "Pushing: $(REGISTRY)/$(IMAGENAME):$(IMAGETAG)"
docker tag "$(IMAGENAME):$(IMAGETAG)" "$(REGISTRY)/$(IMAGENAME):$(IMAGETAG)"
docker push "$(REGISTRY)/$(IMAGENAME):$(IMAGETAG)"
podman tag "$(IMAGENAME):$(IMAGETAG)" "$(REGISTRY)/$(IMAGENAME):$(IMAGETAG)"
podman push "$(REGISTRY)/$(IMAGENAME):$(IMAGETAG)"

.PHONY: download-csm-common
download-csm-common:
Expand All @@ -82,11 +86,11 @@ download-csm-common:
test: unit-test fuzz ##run unit and fuzzy tests

.PHONY: unit-test
unit-test: ##run unit tests (Windows or Linux; requires no hardware)
unit-test: mockgen ##run unit tests (Windows or Linux; requires no hardware)
( go clean -cache; CGO_ENABLED=0 go test -v -coverprofile=c.out ./...)

.PHONY: unit-test-race
unit-test-race: ##run unit tests with race condition reporting (Windows or Linux; requires no hardware, requires CGO)
unit-test-race: mockgen ##run unit tests with race condition reporting (Windows or Linux; requires no hardware, requires CGO)
( go clean -cache; CGO_ENABLED=1 go test -race -v -coverprofile=c.out ./...)

.PHONY: fuzz
Expand Down
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,24 +31,26 @@ For any COSI driver issues, questions or feedback, please follow our [support pr
This project is a Go module (see golang.org Module information for explanation).
The dependencies for this project are in the go.mod file.

To build the source, execute `make clean build`.
To build the source, execute `make build`.

To build an image, execute `make docker`.
To build an image, execute `make podman`.

To run unit tests, execute `make unit-test`.

Default parameters for building an image are defined in overrides.mk. Run `make -f overrides.mk overrides-help` to display current values.

<!-- You can run an integration test on a Linux system by populating the file `env.sh` with values for your Dell PowerMax systems and then run "`make integration-test`". -->

## Runtime Dependencies
<!-- ## Runtime Dependencies -->
<!-- Both the Controller and the Node portions of the driver can only be run on nodes which have network connectivity to a “`Unisphere for PowerMax`” server (which is used by the driver).
If you are using ISCSI, then the Node portion of the driver can only be run on nodes that have the iscsi-initiator-utils package installed. -->

## Driver Installation
Please consult the [Installation Guide](https://dell.github.io/csm-docs/docs/cosidriver/installation)

## Using Driver
Please refer to the section `Testing Drivers` in the [Documentation](https://dell.github.io/csm-docs/docs/cosidriver/installation/test/) for more info.
<!-- ## Using Driver
Please refer to the section `Testing Drivers` in the [Documentation](https://dell.github.io/csm-docs/docs/cosidriver/installation/test/) for more info. -->

## Documentation
For more detailed information on the driver, please refer to [Container Storage Modules documentation](https://dell.github.io/csm-docs/).
Expand Down
2 changes: 1 addition & 1 deletion pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"gopkg.in/yaml.v3"
)

//go:generate go run github.com/atombender/go-jsonschema/cmd/gojsonschema@main --package=config --output=config.gen.go config.schema.json --extra-imports
//go:generate go run github.com/atombender/go-jsonschema/cmd/gojsonschema@v0.13.1 --package=config --output=config.gen.go config.schema.json --extra-imports

// New takes filename and returns populated configuration struct.
func New(filename string) (*ConfigSchemaJson, error) {
Expand Down

0 comments on commit c1c4169

Please sign in to comment.