From 765fd28a499c599a417bc35964c194748fdc3888 Mon Sep 17 00:00:00 2001 From: Denis Kirillov Date: Thu, 15 Dec 2022 17:08:25 +0300 Subject: [PATCH] [#2] Update build Signed-off-by: Denis Kirillov --- .docker/Dockerfile | 10 +++++----- .docker/Dockerfile.dirty | 8 ++++---- Makefile | 12 ++++++------ README.md | 2 +- api/reqinfo.go | 2 +- cmd/s3-authmate/main.go | 4 ++-- cmd/s3-gw/app.go | 2 +- cmd/s3-gw/app_settings.go | 4 ++-- internal/version/version.go | 2 +- 9 files changed, 23 insertions(+), 23 deletions(-) diff --git a/.docker/Dockerfile b/.docker/Dockerfile index dca0b6817..8342aba9b 100644 --- a/.docker/Dockerfile +++ b/.docker/Dockerfile @@ -1,7 +1,7 @@ FROM golang:1.19 as builder ARG BUILD=now -ARG REPO=github.com/nspcc-dev/neofs-s3-gw +ARG REPO=github.com/TrueCloudLab/frostfs-s3-gw ARG VERSION=dev WORKDIR /src @@ -10,12 +10,12 @@ COPY . /src RUN make # Executable image -FROM alpine AS neofs-s3-gw +FROM alpine AS frostfs-s3-gw RUN apk add --no-cache bash ca-certificates WORKDIR / -COPY --from=builder /src/bin/neofs-s3-gw /bin/neofs-s3-gw -COPY --from=builder /src/bin/neofs-s3-authmate /bin/neofs-s3-authmate +COPY --from=builder /src/bin/frostfs-s3-gw /bin/frostfs-s3-gw +COPY --from=builder /src/bin/frostfs-s3-authmate /bin/frostfs-s3-authmate -ENTRYPOINT ["/bin/neofs-s3-gw"] +ENTRYPOINT ["/bin/frostfs-s3-gw"] diff --git a/.docker/Dockerfile.dirty b/.docker/Dockerfile.dirty index 22c0d020a..77cd6fa02 100644 --- a/.docker/Dockerfile.dirty +++ b/.docker/Dockerfile.dirty @@ -1,9 +1,9 @@ -FROM alpine AS neofs-s3-gw +FROM alpine AS frostfs-s3-gw RUN apk add --no-cache bash ca-certificates WORKDIR / -COPY /bin/neofs-s3-gw /bin/neofs-s3-gw -COPY /bin/neofs-s3-authmate /bin/neofs-s3-authmate +COPY /bin/frostfs-s3-gw /bin/frostfs-s3-gw +COPY /bin/frostfs-s3-authmate /bin/frostfs-s3-authmate -ENTRYPOINT ["/bin/neofs-s3-gw"] +ENTRYPOINT ["/bin/frostfs-s3-gw"] diff --git a/Makefile b/Makefile index e1347d48d..86dba46d0 100644 --- a/Makefile +++ b/Makefile @@ -8,12 +8,12 @@ LINT_VERSION ?= 1.49.0 BINDIR = bin # Binaries to build -CMDS = $(addprefix neofs-, $(notdir $(wildcard cmd/*))) +CMDS = $(addprefix frostfs-, $(notdir $(wildcard cmd/*))) BINS = $(addprefix $(BINDIR)/, $(CMDS)) # Variables for docker REPO_BASENAME = $(shell basename `go list -m`) -HUB_IMAGE ?= "nspccdev/$(REPO_BASENAME)" +HUB_IMAGE ?= "truecloudlab/$(REPO_BASENAME)" HUB_TAG ?= "$(shell echo ${VERSION} | sed 's/^v//')" .PHONY: all $(BINS) $(BINDIR) dep docker/ test cover format image image-push dirty-image lint docker/lint version clean protoc @@ -33,7 +33,7 @@ $(BINS): sync-tree $(BINDIR) dep CGO_ENABLED=0 \ go build -v -trimpath \ -ldflags "-X $(REPO)/internal/version.Version=$(VERSION)" \ - -o $@ ./cmd/$(subst neofs-,,$(notdir $@)) + -o $@ ./cmd/$(subst frostfs-,,$(notdir $@)) $(BINDIR): @echo "⇒ Ensure dir: $@" @@ -80,7 +80,7 @@ format: # Build clean Docker image image: - @echo "⇒ Build NeoFS S3 Gateway docker image " + @echo "⇒ Build FrostFS S3 Gateway docker image " @docker build \ --build-arg REPO=$(REPO) \ --build-arg VERSION=$(VERSION) \ @@ -95,7 +95,7 @@ image-push: # Build dirty Docker image dirty-image: - @echo "⇒ Build NeoFS S3 Gateway dirty docker image " + @echo "⇒ Build FrostFS S3 Gateway dirty docker image " @docker build \ --build-arg REPO=$(REPO) \ --build-arg VERSION=$(VERSION) \ @@ -135,7 +135,7 @@ protoc: # Package for Debian debpackage: - dch --package neofs-s3-gw \ + dch --package frostfs-s3-gw \ --controlmaint \ --newversion $(PKG_VERSION) \ --distribution $(OS_RELEASE) \ diff --git a/README.md b/README.md index a577e1975..8188d1053 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ version Show current version ``` Or you can also use a [Docker -image](https://hub.docker.com/r/nspccdev/frostfs-s3-gw) provided for released +image](https://hub.docker.com/r/truecloudlab/frostfs-s3-gw) provided for released (and occasionally unreleased) versions of gateway (`:latest` points to the latest stable release). diff --git a/api/reqinfo.go b/api/reqinfo.go index e66b36bc4..b57b20aae 100644 --- a/api/reqinfo.go +++ b/api/reqinfo.go @@ -45,7 +45,7 @@ type ( // Key used for Get/SetReqInfo. type contextKeyType string -const ctxRequestInfo = contextKeyType("NeoFS-S3-GW") +const ctxRequestInfo = contextKeyType("FrostFS-S3-GW") var ( // De-facto standard header keys. diff --git a/cmd/s3-authmate/main.go b/cmd/s3-authmate/main.go index 86f1bc520..4436df903 100644 --- a/cmd/s3-authmate/main.go +++ b/cmd/s3-authmate/main.go @@ -110,8 +110,8 @@ func prepare() (context.Context, *zap.Logger) { func main() { app := &cli.App{ - Name: "NeoFS S3 Authmate", - Usage: "Helps manage delegated access via gates to data stored in NeoFS network", + Name: "FrostFS S3 Authmate", + Usage: "Helps manage delegated access via gates to data stored in FrostFS network", Version: version.Version, Flags: appFlags(), Commands: appCommands(), diff --git a/cmd/s3-gw/app.go b/cmd/s3-gw/app.go index 02f696ab1..2989d64b2 100644 --- a/cmd/s3-gw/app.go +++ b/cmd/s3-gw/app.go @@ -400,7 +400,7 @@ func remove(list []string, element string) []string { // about the stop to the log. func (a *App) Wait() { a.log.Info("application started", - zap.String("name", "neofs-s3-gw"), + zap.String("name", "frostfs-s3-gw"), zap.String("version", version.Version), ) diff --git a/cmd/s3-gw/app_settings.go b/cmd/s3-gw/app_settings.go index 51773fb88..9b4fe20eb 100644 --- a/cmd/s3-gw/app_settings.go +++ b/cmd/s3-gw/app_settings.go @@ -277,7 +277,7 @@ func newSettings() *viper.Viper { switch { case help != nil && *help: - fmt.Printf("NeoFS S3 gateway %s\n", version.Version) + fmt.Printf("FrostFS S3 gateway %s\n", version.Version) flags.PrintDefaults() fmt.Println() @@ -309,7 +309,7 @@ func newSettings() *viper.Viper { os.Exit(0) case versionFlag != nil && *versionFlag: - fmt.Printf("NeoFS S3 Gateway\nVersion: %s\nGoVersion: %s\n", version.Version, runtime.Version()) + fmt.Printf("FrostFS S3 Gateway\nVersion: %s\nGoVersion: %s\n", version.Version, runtime.Version()) os.Exit(0) } diff --git a/internal/version/version.go b/internal/version/version.go index 6f3d47aed..270768c25 100644 --- a/internal/version/version.go +++ b/internal/version/version.go @@ -5,5 +5,5 @@ var ( Version = "dev" // Server contains server identification string. - Server = "NeoFS-S3-GW/" + Version + Server = "FrostFS-S3-GW/" + Version )