I am setting up Gitlab CI in my project, xcodebuild command fails in gitlab-runner. However, the following command to clean Xcode Project works perfectly in terminal
xcodebuild clean -workspace ~/Documents/iOS\ Projects/{ProjectName}.xcworkspace -scheme {ProjectScheme}
When I added this script to 'yml' file and pushed it to repo, gitlab job says, xcodebuild: command not found
Steps taken to solve this issue, but still not resolved:
- Provided path to same script using /usr/bin/xcodebuild,
says "No such file or directory"

- Xcode > Preferences > Locations > Command Line Tools set to Xcode 13.0
- Run
xcode-select -print-pathand it shows/Applications/Xcode.app/Contents/Developer, which seems to be correct, but gitlab-runner is somehow unable to find the xcodebuild. It seems gitlab-runner is confused with directory.
