Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.4] fix update-apm package-storage (backport #8972) #8984

Merged
merged 1 commit into from
Aug 26, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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