datadog-ci
datadog-ci copied to clipboard
Xcode cloud dSYMs upload using datadog-ci
Bug description
I have added ci_post_xcodebuild.sh file in my project
#!/usr/bin/env bash
if [ "$CI_WORKFLOW" = "Release" ];
then
mkdir build
TMPDIR=build/datadog
mkdir $TMPDIR
curl -L --fail https://github.com/DataDog/datadog-ci/releases/latest/download/datadog-ci_darwin-x64 --output $TMPDIR/datadog-ci && chmod +x $TMPDIR/datadog-ci
echo "Uploading Symbol"
export DATADOG_SITE="datadoghq.eu"
export DATADOG_API_KEY="${DATADOG_API_KEY}"
build/datadog/datadog-ci dsyms upload $CI_ARCHIVE_PATH/dSYMs/
fi
Which should upload dSYMs files from the xcode cloud.
when it comes to executing this script it looks like this
Run command: 'cd /Volumes/workspace/repository/ci_scripts && CI_XCODEBUILD_EXIT_CODE=0 /Volumes/workspace/repository/ci_scripts/ci_post_xcodebuild.sh'
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
52 72.3M 52 37.7M 0 0 27.5M 0 0:00:02 0:00:01 0:00:01 27.5M
100 72.3M 100 72.3M 0 0 37.6M 0 0:00:01 0:00:01 --:--:-- 62.5M
Uploading Symbol
Starting upload with concurrency 20.
Will look for dSYMs in /Volumes/workspace/build.xcarchive/dSYMs/
Once dSYMs upload is successful files will be processed and ready to use within the next 5 minutes.
Will use temporary intermediate directory: build/datadog/869845565736001.9/datadog-ci/dsyms/intermediate
Will use temporary upload directory: build/datadog/869845565736001.9/datadog-ci/dsyms/upload
Internal Error: Command failed: zip -r 'build/datadog/869845565736001.9/datadog-ci/dsyms/upload/D9A29B22-21BC-31EF-B8D8-2E61FDA3EF6A.zip' 'ResourceBundledDependencies.framework.dSYM'
at ChildProcess.exithandler (child_process.js:383:12)
at ChildProcess.emit (events.js:400:28)
at maybeClose (internal/child_process.js:1058:16)
at Socket.<anonymous> (internal/child_process.js:443:11)
at Socket.emit (events.js:400:28)
at Pipe.<anonymous> (net.js:686:12)
Error
Command exited with non-zero exit-code: 1
Describe what you expected
I would expect that dSYMs are uploaded to the datadog.
Steps to reproduce the issue
No response
Additional context
- macOS Sonoma 14.3.1
- latest datadog-ci
Command
dsyms
here is how I do it :
Below are the contents of ci_post_xcodebuild.sh
echo "===== upload to datadog phase ====="
npx @datadog/datadog-ci dsyms upload "${DWARF_DSYM_FOLDER_PATH}"
note : DATADOG_API_KEY
is part of my environment variables in Xcode cloud.