From 73d7376047ac7765c4a47e073caf215979b8ec5b Mon Sep 17 00:00:00 2001 From: Jan Eitzinger Date: Mon, 21 Oct 2024 14:32:47 +0200 Subject: [PATCH 1/6] Remove tags Makefile target --- Makefile | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Makefile b/Makefile index 3031023..7d75c8c 100644 --- a/Makefile +++ b/Makefile @@ -28,7 +28,3 @@ test: @go build ./... @go vet ./... @go test ./... - -tags: - $(info ===> TAGS) - @ctags -R From 8200c05a56895a02989b1707bc809f97804623c8 Mon Sep 17 00:00:00 2001 From: Jan Eitzinger Date: Mon, 21 Oct 2024 14:33:00 +0200 Subject: [PATCH 2/6] Add ReleaseNote file --- ReleaseNotes.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 ReleaseNotes.md diff --git a/ReleaseNotes.md b/ReleaseNotes.md new file mode 100644 index 0000000..f563cbd --- /dev/null +++ b/ReleaseNotes.md @@ -0,0 +1,9 @@ +# `cc-metric-store` version 0.0.3 + +This is a bugfix release of `cc-backend`, the API backend and frontend +implementation of ClusterCockpit. +For release specific notes visit the [ClusterCockpit Documentation](https://clusterockpit.org/docs/release/). + +## Breaking changes + +None From da9e306601f8b5faab82e83773b0c461649dc4e1 Mon Sep 17 00:00:00 2001 From: Jan Eitzinger Date: Mon, 21 Oct 2024 14:33:42 +0200 Subject: [PATCH 3/6] Add goreleaser config --- .goreleaser.yaml | 64 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 .goreleaser.yaml diff --git a/.goreleaser.yaml b/.goreleaser.yaml new file mode 100644 index 0000000..0c71bd2 --- /dev/null +++ b/.goreleaser.yaml @@ -0,0 +1,64 @@ +before: + hooks: + - go mod tidy +builds: + - env: + - CGO_ENABLED=0 + goos: + - linux + goarch: + - amd64 + goamd64: + - v3 + id: "cc-metric-store" + binary: cc-metric-store + main: ./cmd/cc-metric-store + ldflags: + - -s -w -X main.version={{.Version}} + - -X main.commit={{.Commit}} -X main.date={{.Date}} + - -linkmode external -extldflags -static + tags: + - static_build +archives: + - format: tar.gz + # this name template makes the OS and Arch compatible with the results of uname. + name_template: >- + {{ .ProjectName }}_ + {{- title .Os }}_ + {{- if eq .Arch "amd64" }}x86_64 + {{- else }}{{ .Arch }}{{ end }} + {{- if .Arm }}v{{ .Arm }}{{ end }} +checksum: + name_template: "checksums.txt" +snapshot: + name_template: "{{ incpatch .Version }}-next" +changelog: + sort: asc + filters: + include: + - "^feat:" + - "^fix:" + - "^sec:" + - "^docs:" + groups: + - title: "Dependency updates" + regexp: '^.*?(feat|fix)\(deps\)!?:.+$' + order: 300 + - title: "New Features" + regexp: '^.*?feat(\([[:word:]]+\))??!?:.+$' + order: 100 + - title: "Security updates" + regexp: '^.*?sec(\([[:word:]]+\))??!?:.+$' + order: 150 + - title: "Bug fixes" + regexp: '^.*?fix(\([[:word:]]+\))??!?:.+$' + order: 200 + - title: "Documentation updates" + regexp: ^.*?doc(\([[:word:]]+\))??!?:.+$ + order: 400 +release: + draft: false + footer: | + Please check out the [Release Notes](https://github.com/ClusterCockpit/cc-metric-store/blob/master/ReleaseNotes.md) for further details on breaking changes. + +# vim: set ts=2 sw=2 tw=0 fo=cnqoj From f37523a93d5b741d76e0ccc81204ef0e9fd516f9 Mon Sep 17 00:00:00 2001 From: Jan Eitzinger Date: Mon, 21 Oct 2024 14:34:51 +0200 Subject: [PATCH 4/6] Move config to configs folder --- .gitignore | 3 --- config.json => configs/config.json | 0 2 files changed, 3 deletions(-) rename config.json => configs/config.json (100%) diff --git a/.gitignore b/.gitignore index e1cd189..b93d393 100644 --- a/.gitignore +++ b/.gitignore @@ -17,9 +17,6 @@ # Project specific ignores /var -/configs - -sample.txt migrateTimestamps.pl test_ccms_api.sh diff --git a/config.json b/configs/config.json similarity index 100% rename from config.json rename to configs/config.json From 037b60954ff256739db1479b7a0dd4ccce112861 Mon Sep 17 00:00:00 2001 From: Jan Eitzinger Date: Wed, 23 Oct 2024 06:41:19 +0200 Subject: [PATCH 5/6] Start to prepare release --- Makefile | 2 +- README.md | 5 +++-- ReleaseNotes.md | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 7d75c8c..355ac26 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ TARGET = ./cc-metric-store -VERSION = 1.3.0 +VERSION = 0.1.0 GIT_HASH := $(shell git rev-parse --short HEAD || echo 'development') CURRENT_TIME = $(shell date +"%Y-%m-%d:T%H:%M:%S") LD_FLAGS = '-s -X main.date=${CURRENT_TIME} -X main.version=${VERSION} -X main.commit=${GIT_HASH}' diff --git a/README.md b/README.md index 1a21efc..a8a9487 100644 --- a/README.md +++ b/README.md @@ -21,8 +21,9 @@ protocol](https://github.com/ClusterCockpit/cc-specifications/blob/master/metric ## REST API Endpoints -The REST API is documented in [openapi.yaml](./api/openapi.yaml) in the OpenAPI -3.0 format. +The REST API is documented in [swagger.json](./api/swagger.json). You can +explore and try the REST API using the integrated [SwaggerUI web +interface](http://localhost:8082/swagger). ## Run tests diff --git a/ReleaseNotes.md b/ReleaseNotes.md index f563cbd..98fe3fd 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -1,4 +1,4 @@ -# `cc-metric-store` version 0.0.3 +# `cc-metric-store` version 0.1.0 This is a bugfix release of `cc-backend`, the API backend and frontend implementation of ClusterCockpit. From 2654a4e126025234de4b315e54b12a0a0f5feb3e Mon Sep 17 00:00:00 2001 From: Jan Eitzinger Date: Wed, 23 Oct 2024 11:43:40 +0200 Subject: [PATCH 6/6] Add distclean target create config and var dir on build --- Makefile | 15 +++++++++++++-- ReleaseNotes.md | 2 +- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 355ac26..3333add 100644 --- a/Makefile +++ b/Makefile @@ -1,17 +1,24 @@ TARGET = ./cc-metric-store +VAR = ./var/checkpoints/ VERSION = 0.1.0 GIT_HASH := $(shell git rev-parse --short HEAD || echo 'development') CURRENT_TIME = $(shell date +"%Y-%m-%d:T%H:%M:%S") LD_FLAGS = '-s -X main.date=${CURRENT_TIME} -X main.version=${VERSION} -X main.commit=${GIT_HASH}' -.PHONY: clean test tags swagger $(TARGET) +.PHONY: clean distclean test swagger $(TARGET) .NOTPARALLEL: -$(TARGET): +$(TARGET): config.json $(VAR) $(info ===> BUILD cc-metric-store) @go build -ldflags=${LD_FLAGS} ./cmd/cc-metric-store +config.json: + @cp ./configs/config.json config.json + +$(VAR): + @mkdir -p $(VAR) + swagger: $(info ===> GENERATE swagger) @go run github.com/swaggo/swag/cmd/swag init -d ./internal/api,./internal/util -g api.go -o ./api @@ -22,6 +29,10 @@ clean: @go clean @rm -f $(TARGET) +distclean: clean + @rm -rf ./var + @rm -f config.json + test: $(info ===> TESTING) @go clean -testcache diff --git a/ReleaseNotes.md b/ReleaseNotes.md index 98fe3fd..31ffb62 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -1,6 +1,6 @@ # `cc-metric-store` version 0.1.0 -This is a bugfix release of `cc-backend`, the API backend and frontend +This is a minor release of `cc-metric-store`, the metric timeseries cache implementation of ClusterCockpit. For release specific notes visit the [ClusterCockpit Documentation](https://clusterockpit.org/docs/release/).