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

feat: 蓝鲸网关自动注册 --task=75069710 #3265

Merged
merged 1 commit into from
Jun 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions bcs-services/bcs-bscp/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# init the build information
ifdef HASTAG
GITTAG=${HASTAG}
else
GITTAG=$(shell git describe --always)
endif

# version
PRO_DIR = $(shell pwd)
BUILDTIME = $(shell date +%Y-%m-%dT%T%z)
Expand All @@ -17,6 +24,7 @@ ifeq ("$(VERSION)", "")
export OUTPUT_DIR = ${PRO_DIR}/build/bk-bscp
export LDVersionFLAG = "-X github.com/TencentBlueKing/bk-bcs/bcs-services/bcs-bscp/pkg/version.BUILDTIME=${BUILDTIME} \
-X github.com/TencentBlueKing/bk-bcs/bcs-services/bcs-bscp/pkg/version.GITHASH=${GITHASH} \
-X github.com/TencentBlueKing/bk-bcs/bcs-services/bcs-bscp/pkg/version.GITTAG=${GITTAG} \
-X github.com/TencentBlueKing/bk-bcs/bcs-services/bcs-bscp/pkg/version.DEBUG=${DEBUG}"
else
export OUTPUT_DIR = ${PRO_DIR}/build/bk-bscp-${VERSION}
Expand Down
9 changes: 8 additions & 1 deletion bcs-services/bcs-bscp/cmd/api-server/cmd/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,14 @@ package cmd

import (
"fmt"
"time"

"github.com/spf13/cobra"

"github.com/TencentBlueKing/bk-bcs/bcs-services/bcs-bscp/pkg/cc"
"github.com/TencentBlueKing/bk-bcs/bcs-services/bcs-bscp/pkg/iam/apigw"
"github.com/TencentBlueKing/bk-bcs/bcs-services/bcs-bscp/pkg/logs"
"github.com/TencentBlueKing/bk-bcs/bcs-services/bcs-bscp/pkg/version"
)

var migrateCmd = &cobra.Command{
Expand All @@ -42,7 +45,11 @@ var migrateInitApigatewayCmd = &cobra.Command{

logs.InitLogger(cc.ApiServer().Log.Logs())

fmt.Println("Need to be implemented")
if err := apigw.ReleaseSwagger(cc.ApiServer(), "zh",
fmt.Sprintf("%s+%s", version.GITTAG, time.Now().Format("20060102150405"))); err != nil {
fmt.Println(err)
return
}
},
}

Expand Down
Loading
Loading