Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure image version consistency #426

Merged
merged 6 commits into from
Feb 6, 2025

Conversation

riya-kaushal7997
Copy link
Contributor

@riya-kaushal7997 riya-kaushal7997 commented Jan 31, 2025

Description

Set IMAGETAG through semver.mk and removed the unnecessary hardcoded fields

GitHub Issues

List the GitHub issues impacted by this PR:

GitHub Issue #
dell/csm#1490

Checklist:

  • I have performed a self-review of my own code to ensure there are no formatting, vetting, linting, or security issues
  • I have verified that new and existing unit tests pass locally with my changes
  • I have not allowed coverage numbers to degenerate
  • I have maintained at least 90% code coverage
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • Backward compatibility is not broken

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Please also list any relevant details for your test configuration

  • Image is tagged successfully
master-1-Engi0eItYtB5p:~/csm/drivers/csi-powerstore # make tag
which: no gosec in (/root/go/pkg/mod/golang.org/[email protected]/bin:/root/go/bin:/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/go/bin:/root/csm/utilities/bin:/usr/local/go/bin:/root/csm/utilities/bin:/usr/local/go/bin:/root/csm/utilities/bin)
go run core/semver/semver.go -f mk >semver.mk
make -f docker.mk tag TAGMSG='"CSI Spec 1.6"'
make[1]: Entering directory '/root/csm/drivers/csi-powerstore'
MAJOR 2 MINOR 7 PATCH 0 RELNOTE  SEMVER 2.7.0 IMAGETAG v2.7.0 TAGMSG CSI Spec 1.6
git tag -d v2.7.0
Deleted tag 'v2.7.0' (was 90c80e4)
git tag -a -m "CSI Spec 1.6" v2.7.0
make[1]: Leaving directory '/root/csm/drivers/csi-powerstore'
  • Image is built successfully
master-1-Engi0eItYtB5p:~/csm/drivers/csi-powerstore # make docker
which: no gosec in (/root/go/pkg/mod/golang.org/[email protected]/bin:/root/go/bin:/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/go/bin:/root/csm/utilities/bin:/usr/local/go/bin:/root/csm/utilities/bin:/usr/local/go/bin:/root/csm/utilities/bin)
go run core/semver/semver.go -f mk >semver.mk
make -f docker.mk docker
.......
MAJOR 2 MINOR 7 PATCH 0 RELNOTE  SEMVER 2.7.0 IMAGETAG v2.7.0
docker build -t "dellemc/csi-powerstore:v2.7.0" --build-arg GOIMAGE=golang:1.23 --build-arg BASEIMAGE=quay.io/dell/container-storage-modules/csm-base-image:nightly .
Sending build context to Docker daemon  4.752MB
Step 1/16 : ARG GOIMAGE
.......
Successfully built 496b64a1b98c
Successfully tagged dellemc/csi-powerstore:v2.7.0

Comment on lines 23 to 25
ifndef TAGMSG
TAGMSG="CSI Spec 1.6"
endif
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need the TAGMSG. We don't release or tag using this Makefile but rather TechOps builds. I suggest removing it unless it is also standard across repos in which case consistency may be useful.


tag:
-git tag -d $(IMAGETAG)
git tag -a -m $(TAGMSG) $(IMAGETAG)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer to remove the TAGMSG.

donatwork
donatwork previously approved these changes Feb 3, 2025
Base automatically changed from cleanup-dockerfile to main February 6, 2025 15:55
@santhoshatdell santhoshatdell dismissed stale reviews from donatwork and shaynafinocchiaro February 6, 2025 15:55

The base branch was changed.

donatwork
donatwork previously approved these changes Feb 6, 2025
@santhoshatdell
Copy link
Contributor

Image is tagged and built successfully.

[root@master-1-SPknwwOOoaVwH csi-powerstore]# make tag
which: no gosec in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/usr/local/go/bin:/usr/local/go/bin:/go/bin:/usr/local/go/bin:/go/bin)
go run core/semver/semver.go -f mk >semver.mk
make -f docker.mk tag TAGMSG='"CSI Spec 1.6"'
make[1]: Entering directory '/home/santhosh/csm/csi-powerstore'
git tag -d v2.13.0
Deleted tag 'v2.13.0' (was 8286613)
git tag -a -m "CSI Spec 1.6" v2.13.0
make[1]: Leaving directory '/home/santhosh/csm/csi-powerstore'
[root@master-1-SPknwwOOoaVwH csi-powerstore]#

[root@master-1-SPknwwOOoaVwH csi-powerstore]# make docker
which: no gosec in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/usr/local/go/bin:/usr/local/go/bin:/go/bin:/usr/local/go/bin:/go/bin)
go run core/semver/semver.go -f mk >semver.mk
make -f docker.mk docker
.....
podman build -t "dellemc/csi-powerstore:v2.13.0" --build-arg GOIMAGE=golang:1.23 --build-arg BASEIMAGE=quay.io/dell/container-storage-modules/csm-base-image:nightly .
[1/2] STEP 1/5: FROM golang:1.23 AS builder
.....................
[1/2] STEP 5/5: RUN GOOS=linux CGO_ENABLED=0 go build -o csi-powerstore ./cmd/csi-powerstore
--> 2d38e80871c7
[2/2] STEP 1/9: FROM quay.io/dell/container-storage-modules/csm-base-image:nightly
.............
[2/2] STEP 3/9: LABEL vendor="Dell Technologies"       maintainer="Dell Technologies"       name="csi-powerstore"       summary="CSI Driver for Dell EMC PowerStore"       description="CSI Driver for provisioning persistent storage from Dell EMC PowerStore"       release="1.13.0"       version="2.13.0"       license="Apache-2.0"
................
[2/2] STEP 9/9: ENTRYPOINT ["/csi-powerstore"]
[2/2] COMMIT dellemc/csi-powerstore:v2.13.0
--> 947d655b459a
Successfully tagged localhost/dellemc/csi-powerstore:v2.13.0
947d655b459accad80b29bc389368eeb707be6363dba7570f3c4c51ab967511f

@santhoshatdell santhoshatdell merged commit b69477e into main Feb 6, 2025
7 checks passed
@santhoshatdell santhoshatdell deleted the usr/riya/image-version-consistency branch February 6, 2025 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants