-
Notifications
You must be signed in to change notification settings - Fork 134
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1957 from DataDog/ncreated/RUM-4079/migrate-e2e-s…
…8s-upload
- Loading branch information
Showing
16 changed files
with
285 additions
and
138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,58 @@ | ||
all: dependencies archive upload | ||
.PHONY: clean archive export upload | ||
|
||
dependencies: | ||
@echo "⚙️ Installing datadog-ci..." | ||
@npm install -g @datadog/datadog-ci | ||
REPO_ROOT := ../ | ||
include ../tools/utils/common.mk | ||
|
||
BUILD_DIR := .build | ||
ARCHIVE_PATH := $(BUILD_DIR)/Runner.xcarchive | ||
IPA_PATH := $(ARTIFACTS_PATH)/Runner.ipa | ||
|
||
clean: | ||
@$(ECHO_SUBTITLE2) "make clean" | ||
rm -rf "$(BUILD_DIR)" | ||
ifdef ARTIFACTS_PATH | ||
rm -rf "$(IPA_PATH)" | ||
endif | ||
|
||
archive: | ||
xcrun agvtool new-version "$(shell git rev-parse --short HEAD)" | ||
|
||
set -o pipefail && xcodebuild \ | ||
@:$(eval VERSION ?= $(CURRENT_GIT_COMMIT_SHORT)) | ||
@$(ECHO_SUBTITLE2) "make archive VERSION='$(VERSION)'" | ||
@xcrun agvtool new-version "$(VERSION)" | ||
set -eo pipefail; \ | ||
xcodebuild \ | ||
-project E2ETests.xcodeproj \ | ||
-scheme Runner \ | ||
-sdk iphoneos \ | ||
-configuration Synthetics \ | ||
-destination generic/platform=iOS \ | ||
-archivePath .build/Runner.xcarchive \ | ||
archive | xcbeautify | ||
-archivePath $(ARCHIVE_PATH) \ | ||
archive | xcbeautify | ||
git restore E2ETests.xcodeproj/project.pbxproj | ||
@$(ECHO_SUCCESS) "Archive ready in '$(ARCHIVE_PATH)'" | ||
|
||
set -o pipefail && xcodebuild -exportArchive \ | ||
-archivePath .build/Runner.xcarchive \ | ||
export: | ||
@$(call require_param,ARTIFACTS_PATH) | ||
@:$(eval VERSION ?= $(CURRENT_GIT_COMMIT_SHORT)) | ||
@$(ECHO_SUBTITLE2) "make export VERSION='$(VERSION)' ARTIFACTS_PATH='$(ARTIFACTS_PATH)'" | ||
set -o pipefaill; \ | ||
xcodebuild -exportArchive \ | ||
-archivePath $(ARCHIVE_PATH) \ | ||
-exportOptionsPlist exportOptions.plist \ | ||
-exportPath .build \ | ||
| xcbeautify | ||
-exportPath $(BUILD_DIR) \ | ||
| xcbeautify | ||
mkdir -p "$(ARTIFACTS_PATH)" | ||
cp -v "$(BUILD_DIR)/Runner.ipa" "$(IPA_PATH)" | ||
@$(ECHO_SUCCESS) "IPA exported to '$(IPA_PATH)'" | ||
|
||
upload: | ||
@$(call require_param,ARTIFACTS_PATH) | ||
@$(call require_param,DATADOG_API_KEY) | ||
@$(call require_param,DATADOG_APP_KEY) | ||
@$(call require_param,S8S_APPLICATION_ID) | ||
@:$(eval VERSION ?= $(CURRENT_GIT_COMMIT_SHORT)) | ||
@$(ECHO_SUBTITLE2) "make upload VERSION='$(VERSION)' ARTIFACTS_PATH='$(ARTIFACTS_PATH)'" | ||
datadog-ci synthetics upload-application \ | ||
--mobileApp ".build/Runner.ipa" \ | ||
--mobileApp "$(IPA_PATH)" \ | ||
--mobileApplicationId "${S8S_APPLICATION_ID}" \ | ||
--versionName "$(shell agvtool vers -terse)" \ | ||
--versionName "$(VERSION)" \ | ||
--latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.