|
21 | 21 | echo "--- 📦 Zipping test results" |
22 | 22 | cd build/results/ && zip -rq Simplenote.xcresult.zip Simplenote.xcresult && cd - |
23 | 23 |
|
24 | | -echo "--- :s3: Upload xcactivitylog to S3" |
25 | | -aws s3 cp DerivedData s3://a8c-apps-metrics/simplenote-ios/ \ |
26 | | - --recursive \ |
27 | | - --exclude "*" \ |
28 | | - --include "*.xcactivitylog" |
29 | | - |
30 | | -echo "--- :arrow_up: Sync with Apps Metrics" |
31 | | -API_URL='https://metrics.a8c-ci.services/api/pending-build-logs' |
32 | | -TOKEN="$APPS_METRICS_UPLOAD_TOKEN" |
33 | | - |
34 | | -for file in DerivedData/Logs/Build/*.xcactivitylog; do |
35 | | - filename=$(basename "$file") |
36 | | - |
37 | | - echo "📤 Posting $filename to $API_URL ..." |
38 | | - |
39 | | - arch_val=$(arch) |
40 | | - os_val="$(sw_vers -productName) $(sw_vers -productVersion)" |
41 | | - branch_val="${BUILDKITE_BRANCH:-$(git rev-parse --abbrev-ref HEAD)}" |
42 | | - |
43 | | - curl -s -o /dev/null -w "\nHTTP CODE: %{http_code}\n" \ |
44 | | - -X POST "$API_URL" \ |
45 | | - -H 'Content-Type: application/json' \ |
46 | | - -H 'Accept: application/json' \ |
47 | | - -H "Authorization: Bearer $TOKEN" \ |
48 | | - -d "{ |
49 | | - \"file_path\": \"simplenote-ios/Logs/Build/$filename\", |
50 | | - \"type\": \"xcactivitylog\", |
51 | | - \"meta\": [ |
52 | | - { \"name\": \"simplenote-ios-user\", \"value\": \"CI\" }, |
53 | | - { \"name\": \"simplenote-ios-environment\", \"value\": \"CI\" }, |
54 | | - { \"name\": \"simplenote-ios-architecture\", \"value\": \"$arch_val\" }, |
55 | | - { \"name\": \"simplenote-ios-operating-system\", \"value\": \"$os_val\" }, |
56 | | - { \"name\": \"simplenote-ios-metrics-source\", \"value\": \"xcactivitylog\" }, |
57 | | - { \"name\": \"simplenote-ios-branch\", \"value\": \"$branch_val\" } |
58 | | - ] |
59 | | - }" |
60 | | - |
61 | | - echo " ✅ $filename queued" |
62 | | -done |
63 | | - |
64 | 24 | echo "--- :xcode: Store raw xcresulttool JSONs" |
65 | 25 | mkdir -p build/xcresulttool |
66 | 26 | xcrun xcresulttool get build-results \ |
|
0 commit comments