OS:
_Platform:_
When CI tries to build with Xcode Sentry Run Scripts, it fails. On AppCenter there is post-build scripts support, so I tried to move run scripts to post-build scripts like below;
export SENTRY_PROPERTIES=sentry.properties
./node_modules/@sentry/cli/bin/sentry-cli react-native xcode \
./node_modules/@sentry/cli/bin/sentry-cli upload-dsym
Then I'm getting the following error ;
2018-03-01T10:06:50.3861460Z [command]/bin/bash /Users/vsts/agent/2.129.1/work/1/s/appcenter-post-build.sh
2018-03-01T10:06:50.5917230Z error: Need to run this from Xcode
2018-03-01T10:06:50.7343910Z Warning: No paths were provided.
Any suggestions how to upload dsym and sourcemaps to Sentry after CI build ?
Thanks!
@sercanov did you find a solution for this?
@gcesarmza I ended up sending artifacts manually with sentry-cli. Here's an example;
export SENTRY_ORG=XXX
export SENTRY_PROJECT=XXX
export SENTRY_AUTH_TOKEN=馃攽
export SENTRY_PROPERTIES=./ios/sentry.properties
if [ $AGENT_JOBSTATUS != "Succeeded" ]; then
echo "Build failed, exiting script"
exit
fi
echo "Build success"
brew install jq
APP_VERSION=$(cat package.json | jq -r .version)
SENTRY_VERSION=""
BUNDLE_ID_ANDROID="com.package.android"
BUNDLE_ID_IOS="com.package.ios"
echo "App version parsed: $APP_VERSION"
SENTRY_VERSION="$BUNDLE_ID_IOS-$APP_VERSION"
# Create dist folder & copy bundle files
cp "$APPCENTER_SOURCE_DIRECTORY/index.ios.map" "$APPCENTER_SOURCE_DIRECTORY/dist/index.ios.map"
cp "$APPCENTER_SOURCE_DIRECTORY/dummy-sourcemap-main.jsbundle" "$APPCENTER_SOURCE_DIRECTORY/dist/main.jsbundle"
./node_modules/@sentry/cli/bin/sentry-cli --log-level=DEBUG releases \
files $SENTRY_VERSION \
upload-sourcemaps \
--dist $APPCENTER_BUILD_ID \
--strip-prefix "$APPCENTER_SOURCE_DIRECTORY/src" \
--rewrite "$APPCENTER_SOURCE_DIRECTORY/dist"
Hi there, I just edited this for you. Please never post your auth token in public places like Github, Stack Overflow or the support forum. Doing so might give others access to sensitive data in your account.
Most helpful comment
Hi there, I just edited this for you. Please never post your auth token in public places like Github, Stack Overflow or the support forum. Doing so might give others access to sensitive data in your account.