20

I'm trying to do continuous deployment to HockeyApp when all tests in a test suite pass. I have set up an archive post-action that successfully uploads the app to HockeyApp, but the problem is this gets run whether the tests pass or not.

Is it possible to run the archive actions only when all tests have passed? Or is there a better way to do this?

kguest
  • 3,804
  • 3
  • 29
  • 31
Joe
  • 241
  • 1
  • 8
  • do you want to archive/upload after each time you run the tests? or just some times? You can run the tests pre-archive and abort archiving if tests are not passed no? – flovilmart Feb 27 '14 at 17:45
  • @vfloz the idea to always run tests before archive. And Archive only in case, when all test have passed. – skywinder Feb 28 '14 at 12:53
  • Yeah I only want to archive if the tests pass. Don't want to push a failing build to HockeyApp – Joe Mar 05 '14 at 14:12

1 Answers1

1

I just ran into this problem too. Here is the bot result plist location:

/Library/Server/Xcode/Data/BotRuns/Latest/output/xcodebuild_result.bundle/Info.plist

You will have to parse the info.plist file to make sure the TestsFailedCount is 0, but the following answer shows a way to parse the file using PlistBuddy and bash: Where do Xcode Bots put their results, so I can parse them?

Community
  • 1
  • 1
Schlank
  • 181
  • 9