xcodexcode-serverxcode-server-botsxcs

Xcode server bot: pre Scripts error Trigger Error: Trigger exited with non-zero status 1


I wanna setup a Xcode server for archive my project, but i get a tigger issues that tigger error Tigger exited with non-zero status 1.

That is my scripts:

#!/bin/sh
#make sure the encoding is correct
export LANG=en_US.UTF-8

# fix the path so Ruby can find it's binaries
export PATH=/usr/local/bin:$PATH
# echo "PATH: $PATH"

cd "${XCS_PRIMARY_REPO_DIR}/ZHXShop/"

/usr/local/bin/pod install --verbose --no-repo-update

My Project named ZHXShop, also "/usr/local/bin/pod" can search in my computer finder, and i don't use Fastlane in my project

My env:
Xcode -> 11.5
Mac os -> 10.15.5
Cocoapods -> 1.9.1
Ruby -> 2.7.0
rvm -> 1.29.10 

The end i hope your answers


Solution

  • Try adding a wait right after you call to pod install. You can add this as a Add Pre-Integration Triggers when you edit your Xcode Server Bot.

    #!/bin/sh
    
    # cd to where your Podfile is
    cd "${XCS_PRIMARY_REPO_DIR}/ZHXShop/"
    
    # add to the path, or explicitly add the path to your `pod` call
    export PATH=/usr/local/bin:$PATH
    pod install --verbose --no-repo-update
    
    wait
    

    Notes I found on wait

    The wait() function suspends execution of its calling thread until status information is available for a child process or a signal is received.