From 5dfaba7ca9e9840b590e6f6d4cfb3eef04847c0b Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Fri, 26 Aug 2022 12:35:54 +0100 Subject: [PATCH] fix update-apm package-storage (#8972) --- .ci/scripts/Makefile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.ci/scripts/Makefile b/.ci/scripts/Makefile index 59f777c73e3..49d1d8bdd02 100644 --- a/.ci/scripts/Makefile +++ b/.ci/scripts/Makefile @@ -5,8 +5,10 @@ BUILD=../../build PACKAGE_STORAGE=.package-storage PACKAGE_STORAGE_PATH=$(BUILD)/$(PACKAGE_STORAGE) -PACKAGE_STORAGE_BRANCH=update-apm-$(shell date "+%Y%m%d%H%M%S") +PACKAGE_STORAGE_BRANCH:=update-apm-$(shell date "+%Y%m%d%H%M%S") APM_SERVER_VERSION=$(shell make --no-print-directory -C ../../ get-version) +REPO_PROJECT=elastic/package-storage +BASE_BRANCH=snapshot ############################################################################## # Rules for the package-storage. @@ -15,13 +17,13 @@ APM_SERVER_VERSION=$(shell make --no-print-directory -C ../../ get-version) .PHONY: package-storage-snapshot package-storage-snapshot: @rm -fr $(PACKAGE_STORAGE_PATH) - git clone https://github.com/elastic/package-storage.git $(PACKAGE_STORAGE_PATH) --branch snapshot --single-branch --depth=1 + git clone https://github.com/$(REPO_PROJECT).git $(PACKAGE_STORAGE_PATH) --branch $(BASE_BRANCH) --single-branch --depth=5 cp -rf $(BUILD)/packages/apm/$(APM_SERVER_VERSION) $(PACKAGE_STORAGE_PATH)/packages/apm/ ## create-package-storage-pull-request : Create the pull request for the package storage .PHONY: create-package-storage-pull-request create-package-storage-pull-request: - @cd $(PACKAGE_STORAGE_PATH) ; \ + cd $(PACKAGE_STORAGE_PATH) ; \ echo "INFO: create branch" ; \ git checkout -b $(PACKAGE_STORAGE_BRANCH) ; \ echo "INFO: add files if any" ; \ @@ -40,8 +42,9 @@ create-package-storage-pull-request: --title "Publish apm-$(APM_SERVER_VERSION)" \ --body "Automated by $${BUILD_URL}" \ --label automation \ - --base snapshot \ + --base $(BASE_BRANCH) \ --head $(PACKAGE_STORAGE_BRANCH) \ + --repo $(REPO_PROJECT) \ --reviewer elastic/apm-server || true ; \ ## get-package-storage-location : Get the package storage location