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/.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 diff --git a/Makefile b/Makefile index 3031023..3333add 100644 --- a/Makefile +++ b/Makefile @@ -1,17 +1,24 @@ TARGET = ./cc-metric-store -VERSION = 1.3.0 +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,13 +29,13 @@ clean: @go clean @rm -f $(TARGET) +distclean: clean + @rm -rf ./var + @rm -f config.json + test: $(info ===> TESTING) @go clean -testcache @go build ./... @go vet ./... @go test ./... - -tags: - $(info ===> TAGS) - @ctags -R 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 new file mode 100644 index 0000000..31ffb62 --- /dev/null +++ b/ReleaseNotes.md @@ -0,0 +1,9 @@ +# `cc-metric-store` version 0.1.0 + +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/). + +## Breaking changes + +None diff --git a/config.json b/configs/config.json similarity index 100% rename from config.json rename to configs/config.json