Command CompileSwift failed on archiving build on Jenkins - xcode

In our project we have CI setup on M1 processor. We use fastlane to automate build publshing and Jenkins to run bundle install --path vendor/bundle + bundle exec fastlane build upond each commit. The local archive via fastalne works fine on M1 process. We don't have any problem with it. Once, we run our pipeline on CI the Command CompileSwift failed with a nonzero exit code appears. The errors reference to several files from third party libaries which added with cocoapods (Kingfisher, Stripe, FBSDKShareKit). Any thoughts why does the error reprodicible only on CI run not on local execution of the same commands via consloe?
cocoapods: 1.10.2

The issue has been resolved by myself. I figure out that my project has an inaccurate build script to rename image assets to lowercase. The build script has a "Based on dependency analysis" checkmark enabled. Consequently, upon clean install on Jenkins, it always failed, but in fact succeeded on the second run.

Related

Jenkins giving "The cypress npm package is installed, but the Cypress binary is missing." error while Running cypress Test

Hi I am Trying to run cypress test through Jenkins and am getting the test form my local m/c not form github and am Executing windows batch command
"./node_modules/.bin/cypress run --spec "cypress\integration\SignUpTestCases\NewUserSignUp.spec.js" in Bulid configuration.
and i am getting this error
C:\Users\akash\CypressAutomation>./node_modules/.bin/cypress run --spec "cypress\integration\SignUpTestCases\NewUserSignUp.spec.js"
The cypress npm package is installed, but the Cypress binary is missing.
We expected the binary to be installed here: C:\WINDOWS\system32\config\systemprofile\AppData\Local\Cypress\Cache\4.4.1\Cypress\Cypress.exe
Reasons it may be missing:
You're caching 'node_modules' but are not caching this path: C:\WINDOWS\system32\config\systemprofile\AppData\Local\Cypress\Cache
You ran 'npm install' at an earlier build step but did not persist: C:\WINDOWS\system32\config\systemprofile\AppData\Local\Cypress\Cache
Properly caching the binary will fix this error and avoid downloading and unzipping Cypress.
Alternatively, you can run 'cypress install' to download the binary again.
https://on.cypress.io/not-installed-ci-error
WHat is the problem here .....or pls tell me about cypress configuration with Jenkins!!!!
Please set up environment variable CYPRESS_RUN_BINARY and its value should be your cypress runner location. (the runner defauly localtion is ~/AppData\Local\Cypress\Cache)
the variable setting:
Name: CYPRESS_RUN_BINARY
Value:C:\Users\Administrator\AppData\Local\Cypress\Cache\4.8.0\Cypress\Cypress.exe
Or you can add the command in the jenkins job:
set CYPRESS_RUN_BINARY=C:\Users\Administrator\AppData\Local\Cypress\Cache\4.8.0\Cypress\Cypress.exe before run the cypress cases.
Your problem probably exists because you have node_modules added to your git repository.
Remove node_modules folder from your repository
add node_modules to .gitignore file.
commit changes, push them and try again.

Cypress CI vsts not finding binary

Could you please give me some advise on how to deal with this issue.
Build Pipeline
npm install
package.json
"dependencies": {
"cypress": "^3.4.1"
}
Release
Powershell command
npm ./node_modules/.bin/Cypress run
The cypress npm package is installed, but the Cypress binary is missing.
2019-10-07T18:04:59.5720120Z We expected the binary to be installed here:
There are some examples on how to cache ~/.npm but nothing seems to work so far. Examples on how to include cypress.io in your vsts are at the building stage and not after release.
According to the error log, it has provided a solution about this. You should run the cypress install command first and then the error will be fixed.
As my test, since I don't have a cypress.json file, so I need run the open command to
automatic generated get the json file and project sample.
Then the open command run as expected.
But because I run the open command in interactive mode and I don't have the cypress.json file in my artifacts, the taks finally failed.
So if you have cypress.json in your repo or artifacts, you just need to add
.\cypress install
in your powershell command.
And if not, you can add the related json file and folder to your repo or artifacts and then the run command will work as your expected.

How to fix "-bash: bazel: command not found" when running "bazel build //src:bazel" from windows

Hi I downloaded the last release of bazel 0.24.1 for windows and I did the same instructions But, when I run
./compile.sh
It shows the error as mentioned and I tried bazel build //src:bazel but it didn't work to it shows me
-bash: bazel: command not found
after searching I tried : bazel --output_user_root=c:\tmp build //src:bazel.exe
but the same error
-bash: bazel: command not found
Ps: I run it from msys64 any suggestions please thanks a lot for reacting
./compile.sh
🍃 Building Bazel from scratch ERROR: Must specify PROTOC if not
bootstrapping from the distribution artifact
-------------------------------------------------------------------------------- NOTE: This failure is likely occuring if you are trying to bootstrap
bazel from a developer checkout. Those checkouts do not include the
generated output of the protoc compiler (as we prefer not to version
generated files)
.
To build a developer version of bazel, do
bazel build //src:bazel
To bootstrap your first bazel binary, please download a dist archive from our release page at
https://github.com/bazelbuild/bazel/releases and run compile.sh on
the unpacked archive.
The full install instructions to install a release version of bazel
can be found at https://docs.bazel.build/install-compile-source.html
For a rationale, why the bootstrap process is organized in this way,
see https://bazel.build/designs/2016/10/11/distribution-artifact.html

Docker Ruby Bundle Permissions Error on Build

Using docker-compose, I'm trying to build a Ruby application (ruby-app). However near the end of the build it errors out:
There was an error while trying to write to `/ruby-app/Gemfile.lock`. It is likely
that you need to grant write permissions for that path.
ERROR: Service 'ruby-app' failed to build: The command '/bin/sh -c bundle install --jobs 4' returned a non-zero code: 23
Not sure why this permissions error is cropping up now, it has been building fine for some time.
The problem was that I modified the Gemfile and I was expecting bundler inside of the container to generate the new Gemfile.lock based on the changes.
To fix the issue, I ran bundle install outside of the container. This generated a new Gemfile.lock on my local filesystem and then I was able to build the container as expected.

Modifying Check Pods Manifest.lock script in build phases of Xcode

pod install adds a script to the build phases to check for the Manifest.lock file. It throws an error if the sandbox is not in sync and exits the process. Is there any way to modify this script such that on error I want to perform "pod install".

Resources