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

Xcode cloud dSYMs upload using datadog-ci #1206

Open
sladan-hedvig opened this issue Feb 22, 2024 · 3 comments
Open

Xcode cloud dSYMs upload using datadog-ci #1206

sladan-hedvig opened this issue Feb 22, 2024 · 3 comments
Labels
bug Something isn't working rum Related to [dsyms, flutter-symbols, unity-symbols, react-native, sourcemaps]

Comments

@sladan-hedvig
Copy link

sladan-hedvig commented Feb 22, 2024

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:/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

@sladan-hedvig sladan-hedvig added the bug Something isn't working label Feb 22, 2024
@github-actions github-actions bot added the rum Related to [dsyms, flutter-symbols, unity-symbols, react-native, sourcemaps] label Feb 22, 2024
@siddarthkay
Copy link

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.

@rohdester
Copy link

Did this get resolved? I am experiencing the same thing.
@siddarthkay how are you using npx in a Xcode Cloud post build script?

@siddarthkay
Copy link

siddarthkay commented Jun 21, 2024

@rohdester : Back when I was experimenting with xcode-cloud :

echo "===== upload to datadog phase ====="
npx @datadog/datadog-ci dsyms upload "${DWARF_DSYM_FOLDER_PATH}"

in ios/ci_scripts/ci_post_xcodebuild.sh

and

echo "===== Installing Node.js using Homebrew ====="
brew install node

echo "===== Installing Yarn using Homebrew ====="
brew install yarn

in ios/ci_scripts/ci_post_clone.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working rum Related to [dsyms, flutter-symbols, unity-symbols, react-native, sourcemaps]
Projects
None yet
Development

No branches or pull requests

3 participants