From 7622d14b083b275b7fddb799e58263b7cb9f2b3d Mon Sep 17 00:00:00 2001 From: Polina Bungina <27892524+hughcapet@users.noreply.github.com> Date: Fri, 21 Apr 2023 21:45:15 +0700 Subject: [PATCH] Remove scm-source.json creation (#2301) --- Makefile | 9 +++------ docker/build_operator.sh | 1 - e2e/Dockerfile | 1 - e2e/Makefile | 5 +---- 4 files changed, 4 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index cb3501a5a..c33c86593 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: clean local test linux macos mocks docker push scm-source.json e2e +.PHONY: clean local test linux macos mocks docker push e2e BINARY ?= postgres-operator BUILD_FLAGS ?= -v @@ -48,7 +48,7 @@ SHELL := env PATH=$(PATH) $(SHELL) default: local clean: - rm -rf build scm-source.json + rm -rf build local: ${SOURCES} hack/verify-codegen.sh @@ -60,7 +60,7 @@ linux: ${SOURCES} macos: ${SOURCES} GOOS=darwin GOARCH=amd64 CGO_ENABLED=${CGO_ENABLED} go build -o build/macos/${BINARY} ${BUILD_FLAGS} -ldflags "$(LDFLAGS)" $^ -docker: ${DOCKERDIR}/${DOCKERFILE} scm-source.json +docker: ${DOCKERDIR}/${DOCKERFILE} echo `(env)` echo "Tag ${TAG}" echo "Version ${VERSION}" @@ -74,9 +74,6 @@ indocker-race: push: docker push "$(IMAGE):$(TAG)$(CDP_TAG)" -scm-source.json: .git - echo '{\n "url": "git:$(GITURL)",\n "revision": "$(GITHEAD)",\n "author": "$(USER)",\n "status": "$(GITSTATUS)"\n}' > scm-source.json - mocks: GO111MODULE=on go generate ./... diff --git a/docker/build_operator.sh b/docker/build_operator.sh index e98f7eab1..337389e4d 100644 --- a/docker/build_operator.sh +++ b/docker/build_operator.sh @@ -25,7 +25,6 @@ apt-get install -y wget export PATH="$PATH:$HOME/go/bin" export GOPATH="$HOME/go" mkdir -p build -cp scm-source.json build/ GO111MODULE=on go mod vendor CGO_ENABLED=0 go build -o build/postgres-operator -v -ldflags "$OPERATOR_LDFLAGS" cmd/main.go diff --git a/e2e/Dockerfile b/e2e/Dockerfile index b97f52dcb..cfbc9eff7 100644 --- a/e2e/Dockerfile +++ b/e2e/Dockerfile @@ -6,7 +6,6 @@ LABEL maintainer="Team ACID @ Zalando " ENV TERM xterm-256color COPY requirements.txt ./ -COPY scm-source.json ./ RUN apt-get update \ && apt-get install --no-install-recommends -y \ diff --git a/e2e/Makefile b/e2e/Makefile index 017f5d345..25688b920 100644 --- a/e2e/Makefile +++ b/e2e/Makefile @@ -36,12 +36,9 @@ copy: clean cp -r ../manifests . mkdir tls -docker: scm-source.json +docker: docker build -t "$(IMAGE):$(TAG)" . -scm-source.json: ../.git - echo '{\n "url": "git:$(GITURL)",\n "revision": "$(GITHEAD)",\n "author": "$(USER)",\n "status": "$(GITSTATUS)"\n}' > scm-source.json - push: docker docker push "$(IMAGE):$(TAG)"