Skip to content

Commit

Permalink
Merge branch 'main' into feature/release-updates
Browse files Browse the repository at this point in the history
  • Loading branch information
donatwork authored Feb 13, 2025
2 parents 6097348 + 2bc4639 commit 86f5cf6
Show file tree
Hide file tree
Showing 10 changed files with 150 additions and 6 deletions.
9 changes: 6 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,19 @@ updates:
interval: "daily"
time: "18:00"
allow:
# Allow both direct and indirect updates for all packages
- dependency-type: all
# Allow direct updates for packages
- dependency-type: direct
ignore:
- dependency-name: "*"
update-types:
- version-update:semver-patch
# a group of dependencies will be updated together in one pull request
groups:
golang:
# group all semantic versioning levels together in one pull request
update-types:
- major
- minor
- patch
patterns:
- "*"

Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/auto-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Auto Release CSM-Operator
on: # yamllint disable-line rule:truthy
workflow_dispatch:
repository_dispatch:
types: [auto-release-workflow]

jobs:
csm-release:
uses: dell/common-github-actions/.github/workflows/csm-release-driver-module.yaml@main
with:
version: "minor"
images: "csm-operator"
secrets: inherit
27 changes: 27 additions & 0 deletions .github/workflows/image-version-update.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Copyright (c) 2025 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.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0

# Reusable workflow to perform image version update on Golang based projects
name: Image Version Update

on: # yamllint disable-line rule:truthy
workflow_dispatch:
inputs:
version:
description: "Version to release (major, minor, patch) Ex: minor"
required: true
repository_dispatch:
types: [image-update-workflow]

jobs:
# image version update
image-version-update:
uses: dell/common-github-actions/.github/workflows/image-version-workflow.yaml@main
with:
version: "${{ github.event.inputs.version || 'minor' }}"
secrets: inherit
18 changes: 18 additions & 0 deletions .github/workflows/update-libraries-to-commits.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright (c) 2025 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.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0

# Reusable workflow to perform updates of Dell client libraries to latest commits
name: Dell Libraries Commit Update
on: # yamllint disable-line rule:truthy
workflow_dispatch:

jobs:
package-update:
uses: dell/common-github-actions/.github/workflows/update-libraries-to-commits.yml@main
name: Dell Libraries Update
secrets: inherit
20 changes: 20 additions & 0 deletions .github/workflows/update-libraries.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright (c) 2025 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.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0

# Reusable workflow to perform updates of Dell client libraries
name: Dell Libraries Release Update
on: # yamllint disable-line rule:truthy
workflow_dispatch:
repository_dispatch:
types: [latest-released-libraries]

jobs:
package-update:
uses: dell/common-github-actions/.github/workflows/update-libraries.yml@main
name: Dell Libraries Update
secrets: inherit
19 changes: 19 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
include docker.mk
include overrides.mk

# CHANNELS define the bundle channels used in the bundle.
# Add a new line here if you would like to change its default config. (E.g CHANNELS = "candidate,fast,stable")
Expand Down Expand Up @@ -63,10 +64,28 @@ generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and
$(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./..."

#Generate semver.mk
.PHONY: gen-semver
gen-semver: generate
(cd core; rm -f core_generated.go; go generate)
go run core/semver/semver.go -f mk > semver.mk

-include semver.mk

ifdef NOTES
RELNOTE="-$(NOTES)"
else
RELNOTE=
endif

# Operator version tagged with build number. For e.g. - v1.8.0.001
VERSION ?= v$(MAJOR).$(MINOR).$(PATCH)$(RELNOTE)

ifdef VERSION
$(info VERSION is: $(VERSION)) # Print the version for debugging
else
$(error VERSION is not defined! Check semver.mk generation.)
endif

fmt: ## Run go fmt against code.
go fmt ./...

Expand Down
3 changes: 0 additions & 3 deletions docker.mk
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ BUNDLE_IMAGE_TAG_BASE_COMMUNITY ?= dell-csm-community-operator-bundle
# Image tag base for community catalog images
CATALOG_IMAGE_TAG_BASE_COMMUNITY ?= dell-csm-community-operator-catalog

# Operator version tagged with build number. For e.g. - v1.8.0.001
VERSION ?= v1.8.0

# Bundle Version is the semantic version(required by operator-sdk)
BUNDLE_VERSION ?= 1.8.0

Expand Down
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ module github.com/dell/csm-operator

go 1.23.0

toolchain go1.23.5

require (
github.com/cert-manager/cert-manager v1.16.2
github.com/go-logr/logr v1.4.2
Expand Down
43 changes: 43 additions & 0 deletions overrides.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Copyright © 2025 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.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# 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.

# overrides file
# this file, included from the Makefile, will overlay default values with environment variables
#


# DEFAULT values
DEFAULT_MAJOR = 0
DEFAULT_MINOR = 0
DEFAULT_PATCH = 0
DEFAULT_NOTES =

# Override defaults with environment variables (version components)
MAJOR ?= $(DEFAULT_MAJOR)
MINOR ?= $(DEFAULT_MINOR)
PATCH ?= $(DEFAULT_PATCH)
NOTES ?= $(DEFAULT_NOTES)

# target to print some help regarding these overrides and how to use them
overrides-help:
@echo
@echo "The following environment variables can be set to control the build"
@echo
@echo "MAJOR - The major version of image to be built, default is: $(DEFAULT_MAJOR)"
@echo " Current setting is: $(MAJOR)"
@echo "MINOR - The minor version of image to be built, default is: $(DEFAULT_MINOR)"
@echo " Current setting is: $(MINOR)"
@echo "PATCH - The patch version of image to be built, defaut is: $(DEFAULT_PATCH)"
@echo " Current setting is: $(PATCH)"
@echo "NOTES - The release notes of image to be built, default is an empty string."
@echo " Current setting is: '$(NOTES)'"
@echo
2 changes: 2 additions & 0 deletions tests/e2e/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ module github.com/dell/csm-operator/tests/e2e

go 1.23.0

toolchain go1.23.5

require (
github.com/dell/csm-operator v0.0.0
github.com/onsi/ginkgo/v2 v2.22.2
Expand Down

0 comments on commit 86f5cf6

Please sign in to comment.