diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 1118cf8211..d9ae5e378f 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -140,7 +140,6 @@ jobs: echo "BRANCH=$GITHUB_EVENT_PULL_REQUEST_HEAD_REF" >> $GITHUB_ENV echo "GORELEASER_PREVIOUS_TAG=$(git describe --abbrev=0 --tags $(git rev-list --tags --skip=1 --max-count=1))" >> $GITHUB_ENV echo "GORELEASER_CURRENT_TAG=${{ needs.tag-release.outputs.version }}" >> $GITHUB_ENV - echo "DEV_BUCKET_CONTAINER_IMAGE=$(make echo-dev-bucket-container)" >> $GITHUB_ENV echo "FLUX_VERSION=$(make echo-flux-version)" >> $GITHUB_ENV echo "CHART_VERSION=$(yq e '.version' charts/gitops-server/Chart.yaml)" >> $GITHUB_ENV - name: "Make All" diff --git a/Makefile b/Makefile index 56d3e5ae49..acc55d63aa 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,6 @@ GIT_COMMIT?=$(shell which git > /dev/null && git log -n1 --pretty='%h') VERSION?=$(shell which git > /dev/null && git describe --always --match "v*") FLUX_VERSION=2.0.1 CHART_VERSION=$(shell which yq > /dev/null && yq e '.version' charts/gitops-server/Chart.yaml) -DEV_BUCKET_CONTAINER_IMAGE?=ghcr.io/weaveworks/gitops-bucket-server@sha256:9fa2a68032b9d67197a3d41a46b5029ffdf9a7bc415e4e7e9794faec8bc3b8e4 TIER=oss # Go build args @@ -20,7 +19,6 @@ LDFLAGS?=-X github.com/weaveworks/weave-gitops/cmd/gitops/version.Branch=$(BRANC -X github.com/weaveworks/weave-gitops/cmd/gitops/version.GitCommit=$(GIT_COMMIT) \ -X github.com/weaveworks/weave-gitops/cmd/gitops/version.Version=$(VERSION) \ -X github.com/weaveworks/weave-gitops/pkg/version.FluxVersion=$(FLUX_VERSION) \ - -X github.com/weaveworks/weave-gitops/pkg/run/watch.DevBucketContainerImage=$(DEV_BUCKET_CONTAINER_IMAGE) \ -X github.com/weaveworks/weave-gitops/pkg/analytics.Tier=$(TIER) \ -X github.com/weaveworks/weave-gitops/core/server.Branch=$(BRANCH) \ -X github.com/weaveworks/weave-gitops/core/server.Buildtime=$(BUILD_TIME) \ @@ -225,9 +223,6 @@ echo-ldflags: echo-flux-version: @echo $(FLUX_VERSION) -echo-dev-bucket-container: - @echo $(DEV_BUCKET_CONTAINER_IMAGE) - download-test-crds: group_resources="source/helmrepositories source/buckets source/gitrepositories source/helmcharts source/ocirepositories"; \ for group_resource in $$group_resources; do \ diff --git a/cmd/gitops-bucket-server/main.go b/cmd/gitops-bucket-server/main.go deleted file mode 100644 index 2ad9fe27e0..0000000000 --- a/cmd/gitops-bucket-server/main.go +++ /dev/null @@ -1,88 +0,0 @@ -package main - -import ( - "context" - "flag" - "log" - "os" - "os/signal" - "syscall" - - "github.com/johannesboyne/gofakes3" - "github.com/johannesboyne/gofakes3/backend/s3mem" - "github.com/weaveworks/weave-gitops/pkg/http" - "github.com/weaveworks/weave-gitops/pkg/s3" -) - -func main() { - logger := log.New(os.Stdout, "", 0) - - awsAccessKeyID := os.Getenv("AWS_ACCESS_KEY_ID") - if awsAccessKeyID == "" { - minioRootUser := os.Getenv("MINIO_ROOT_USER") - if minioRootUser == "" { - logger.Fatal("AWS_ACCESS_KEY_ID or MINIO_ROOT_USER must be set") - return - } - - awsAccessKeyID = minioRootUser - } - - awsSecretAccessKey := os.Getenv("AWS_SECRET_ACCESS_KEY") - if awsSecretAccessKey == "" { - minioRootPassword := os.Getenv("MINIO_ROOT_PASSWORD") - if minioRootPassword == "" { - logger.Fatal("AWS_SECRET_ACCESS_KEY or MINIO_ROOT_PASSWORD must be set") - return - } - - awsSecretAccessKey = minioRootPassword - } - - ctx, cancel := signal.NotifyContext( - context.Background(), - syscall.SIGINT, - syscall.SIGTERM) - defer cancel() - - s3Server := gofakes3.New(s3mem.New(), - gofakes3.WithAutoBucket(true), - gofakes3.WithLogger( - gofakes3.StdLog( - logger, - gofakes3.LogErr, - gofakes3.LogWarn, - gofakes3.LogInfo, - ))).Server() - - var ( - httpPort, httpsPort int - certFile, keyFile string - ) - - flag.IntVar(&httpPort, "http-port", 9000, "TCP port to listen on for HTTP connections") - flag.IntVar(&httpsPort, "https-port", 9443, "TCP port to listen on for HTTPS connections") - flag.StringVar(&certFile, "cert-file", "", "Path to the HTTPS server certificate file") - flag.StringVar(&keyFile, "key-file", "", "Path to the HTTPS server certificate key file") - flag.Parse() - - if certFile == "" { - logger.Fatalf("please specify the path to the HTTPS server certificate file") - } - - if keyFile == "" { - logger.Fatalf("please specify the path to the HTTPS server certificate key file") - } - - srv := http.MultiServer{ - HTTPPort: httpPort, - HTTPSPort: httpsPort, - CertFile: certFile, - KeyFile: keyFile, - Logger: logger, - } - - if err := srv.Start(ctx, s3.AuthMiddleware(awsAccessKeyID, awsSecretAccessKey, s3Server)); err != nil { - logger.Fatalf("server exited unexpectedly: %s", err) - } -}