Skip to content

Commit

Permalink
fix update-apm package-storage (#8972) (#8984)
Browse files Browse the repository at this point in the history
(cherry picked from commit 5dfaba7)

Co-authored-by: Victor Martinez <victormartinezrubio@gmail.com>
  • Loading branch information
mergify[bot] and v1v authored Aug 26, 2022
1 parent 194ae8e commit f8542f5
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .ci/scripts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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" ; \
Expand All @@ -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
Expand Down

0 comments on commit f8542f5

Please sign in to comment.