From 2af1ef08f6f342169aba926ff6b8fc9dee07d46c Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Thu, 25 Aug 2022 15:30:50 +0100 Subject: [PATCH 1/4] fix create-package-storage-pull-request --- .ci/scripts/Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.ci/scripts/Makefile b/.ci/scripts/Makefile index 59f777c73e3..53fd21f33d8 100644 --- a/.ci/scripts/Makefile +++ b/.ci/scripts/Makefile @@ -7,6 +7,8 @@ PACKAGE_STORAGE=.package-storage PACKAGE_STORAGE_PATH=$(BUILD)/$(PACKAGE_STORAGE) 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,7 +17,7 @@ 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 @@ -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 From 63a736cc867a82339131a37f92f1718e986e6494 Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Thu, 25 Aug 2022 15:58:53 +0100 Subject: [PATCH 2/4] avoid reset the branch name --- .ci/scripts/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/scripts/Makefile b/.ci/scripts/Makefile index 53fd21f33d8..c23e35a2201 100644 --- a/.ci/scripts/Makefile +++ b/.ci/scripts/Makefile @@ -5,7 +5,7 @@ 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 = $(eval PACKAGE_STORAGE_BRANCH := $$(shell date "+%Y%m%d%H%M%S"))$(PACKAGE_STORAGE_BRANCH) APM_SERVER_VERSION=$(shell make --no-print-directory -C ../../ get-version) REPO_PROJECT=elastic/package-storage BASE_BRANCH=snapshot From ad7175cd7c9dd0cdfa66c0fd15919f0a94c8081d Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Thu, 25 Aug 2022 15:59:07 +0100 Subject: [PATCH 3/4] help with the debugging --- .ci/scripts/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/scripts/Makefile b/.ci/scripts/Makefile index c23e35a2201..32b96a550bc 100644 --- a/.ci/scripts/Makefile +++ b/.ci/scripts/Makefile @@ -23,7 +23,7 @@ package-storage-snapshot: ## 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" ; \ From 0158bef6fca521d8d7e8cc6b89fc23f5a90cb954 Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Fri, 26 Aug 2022 11:45:58 +0100 Subject: [PATCH 4/4] Update .ci/scripts/Makefile Co-authored-by: Andrew Wilkins --- .ci/scripts/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/scripts/Makefile b/.ci/scripts/Makefile index 32b96a550bc..49d1d8bdd02 100644 --- a/.ci/scripts/Makefile +++ b/.ci/scripts/Makefile @@ -5,7 +5,7 @@ BUILD=../../build PACKAGE_STORAGE=.package-storage PACKAGE_STORAGE_PATH=$(BUILD)/$(PACKAGE_STORAGE) -PACKAGE_STORAGE_BRANCH = $(eval PACKAGE_STORAGE_BRANCH := $$(shell date "+%Y%m%d%H%M%S"))$(PACKAGE_STORAGE_BRANCH) +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