FirebaseCrash error TARGET_BUILD_DIR: Value missing - ios

I'm trying to follow the steps listed here to upload dSYMs to Firebase.
I'm using Jenkins as a build server. This is my script:
GOOGLE_APP_ID=1:my:app:id
Pods/FirebaseCrash/upload-sym "/Path/To/Service_Account/file.json"
I'm getting this error:
Pods/FirebaseCrash/upload-sym:113: error: TARGET_BUILD_DIR: Value missing
How do I specify the target build directory?

As per Eric Shieh's comment, the reason why the script was not working in Jenkins' build script was that certain environment variables that Xcode supplies are missing when running through Jenkins.
So, I added a run script phase as the documentation suggests and then marked the "Run script only when installing" option.
This option will only run the script when archiving occurs.

Related

Run Newman in jenkins

this is my first time using Jenkins for automated test.I've tried to run a test by integrate Newman with Jenkins but I always get the
Console Error
"Newman : command not found"
as a result,it's make my test failed.
I have looking for some answers on the Internet and some tell me to add a value for Environment variables, but I don't know how to get the exact value to add to this. Please show me where can I get this.I'm using MacOS High Sierra
Install https://plugins.jenkins.io/nodejs in jenkins
In Global Tool Configuration add Nodejs and in "Global npm packages to install" add newman
In Build Environment use "Provide Node & npm bin/ folder to PATH"
In Build add "execute shell" if you are using linux or use "execute windows batch command" if you are on windows and add your newman command
For example:
newman run
https://www.getpostman.com/collections/631643-f695cab7-6878-eb55-7943-ad88e1ccfd65-JsLv
the html extra reporter only worked for me once enabling 'locate executor' and flag "with ant" as well, under the provide node & npm option.
I had the similar problem. I had several lines of the text in the Command field. According to advice I used backslashes to make it look pretier and I couldn't create a report with Newman. I got a report only after deleteing the backslashes and writing all information in one line

TFS build error: Web deployment task failed. Package file does not have a .zip file name extension

I am getting the following error when I am queuing a build in TFS 2017.
"Microsoft.Web.Publishing.targets 3009,5): Error : Web deployment task failed. (Package file 'C:\agent_work\3\s\TestApp\TestApp\release' does not have a .zip file name extension.)"
I am not sure why I am getting this error. I have hosted agent on the TFS server. I created the build definition according to this video:
www.youtube.com/watch?v=HjD4A-yeFTE
Does somebody have any idea? Appreciate your help!
Test at my side and everything works correctly.
Please try below items to narrow down the issue:
Please check the drop folder, if the .zip file actually being in the
place that you expected.
Try to specify the output path, eg:
/p:PackageLocation="$(build.artifactstagingdirectory)\\" , then
specify the Copy Root path as $(build.artifactstagingdirectory)
in Copy and Publish Build Artifacts task.
Explicitly specifying .zip extension in MSBuild Argument in the
Build Definition.
p:PackageLocation="$(BuildConfiguration)\package.zip
Check the build log, check if MSbuild works correctly. Also you can try the Msbuild command line locally to check if the .zip package can be generated.
Deploy a new agent on your Develop machine, create a new build
definition, then build with the new agent.
If still can not resolve the issue, just share the build logs here for further troubleshoot.

configure Valgrind plugin in Jenkins

I have installed valgrind plugin in Jenkins.
I just want to trigger my binary(of a simple C program ) with valgrind trough jenkins(valgrind plugin)
Under Build->Run Valgrind Options
I have given Working Directory as directory of my executable.
executable Include pattern as quick* (quick is my executable name)
When I run the build the following is the console output.
Building in workspace /home/iptv/.jenkins/jobs/testVal/workspace
[VAlgrind] Error, java.lang.NullPointerException: null
Build step 'Run Valgring' marked build as failure
Finished: Failure
Is ther some where we need to declare environment variables ${PROGRAM_NAME} and ${PROGRAM_DIR}
Am I missing something to configure.
Thanks in advance.

failed archiving ipa files jenkins

I have a extrange problem,
when building the ios app with jenkins the ipa file is generated, and signed correctly but when I try to archive the ipa file it fails
the jenkins log says
Results at '/Users/Shared/Jenkins/Home/jobs/iosHelp/workspace/build/ipa/Verion.ipa'
[Debug-iphoneos] $ ditto -c -k --keepParent -rsrc /Users/Shared/Jenkins/Home/jobs/iosHelp/workspace/build/Debug-iphoneos/FormSlider.app.dSYM /Users/Shared/Jenkins/Home/jobs/iosHelp/workspace/build/ipa/Verion-dSYM.zip
Archiving artifacts
ERROR: No artifacts found that match the file pattern "/Users/Shared/Jenkins/Home/jobs/iosHelp/workspace/build/ipa/Verion.ipa". Configuration error?
ERROR: ‘/Users/Shared/Jenkins/Home/jobs/iosHelp/workspace/build/ipa/Verion.ipa’ doesn’t match anything: ‘’ exists but not ‘/Users/Shared/Jenkins/Home/jobs/iosHelp/workspace/build/ipa/Verion.ipa’
Build step 'Archive the artifacts' changed build result to FAILURE
Finished: FAILURE
clearly it states that jenkins couldn't find the ipa but in the statement before shows that the ipa was generated also using the terminal to go to the build/ipa directory I cheked that the file currently exists and is generated,
any help would be appreciated
What do you use in your "Archive Artifacts" configuration? It should be relative to $workspace, so in your case just build/ipa/Verion.ipa.
Make sure there are no extra quotes either
When you navigate to this job folder is there a file there? If you are using Ant blob syntax try adding a "*" at the end in case the file extension you wrote in is incorrect or instead of "build/ipa/Verion.ipa" use "build/ipa/Verion*" to try and locate the file, as #Slav mentioned use a path relative to the $workspace

Cannot run program "gradle" in Jenkins

I've installed the Gradle plugin for Jenkins. When I try to build the project I get the following error:
[workspace] $ gradle clean -b build/build.gradle
FATAL: command execution failed
java.io.IOException: Cannot run program "gradle" (in directory "/Users/Shared/Jenkins/Home/jobs/test/workspace"): error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
at hudson.Proc$LocalProc.<init>(Proc.java:244)
at hudson.Proc$LocalProc.<init>(Proc.java:216)
at hudson.Launcher$LocalLauncher.launch(Launcher.java:707)
at hudson.Launcher$ProcStarter.start(Launcher.java:338)
at hudson.Launcher$ProcStarter.join(Launcher.java:345)
at hudson.plugins.gradle.Gradle.performTask(Gradle.java:201)
at hudson.plugins.gradle.Gradle.perform(Gradle.java:97)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:695)
at hudson.model.Build$RunnerImpl.build(Build.java:178)
at hudson.model.Build$RunnerImpl.doRun(Build.java:139)
at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:465)
at hudson.model.Run.run(Run.java:1404)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:238)
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:53)
at java.lang.ProcessImpl.start(ProcessImpl.java:91)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:453)
... 16 more
Build step 'Invoke Gradle script' changed build result to FAILURE
Build step 'Invoke Gradle script' marked build as failure
Finished: FAILURE
Running the task $ gradle clean -b build/build.gradle from the command line works as expected.
I had the same issue and found that the problem for me was the gradle version in the project configuration. It was set to Default and when I set it to the gradle version I was pointing to in the plugin configuration in the Manage Jenkins > Configuration Options, It found gradle and worked properly.
This is a difficult issue to debug and I hope this saves someone else some time.
Solution Mastering_the_Object pointed out worked form me too, just to clarify steps there:
just installing Gradle plugin in Jenkins is not enough, you must also go to:
Jenkins->Manage Jenkins->Configure Jenkins->Configure system.
Under "Gradle Installations" type in name (it appears as version in project configuration), check "Install automatically" and select version. Then you can select that "Gradle version" in project configuration.
I was getting this error using the Gradle wrapper, was able to fix my broken build as follows:
Go to Manage Jenkins -> Global Tool Configuration -> Gradle -> Add Gradle, give it a name
Go to Jenkins -> (your job) -> Configure -> Build, choose "Invoke Gradle" and change the Gradle version from (Default) to the named version
When running Gradle on a CI machine such as Jenkins, it's most convenient to use the Gradle Wrapper.
On your development machine, stand in your root project directory and run
gradle wrapper
Then, check in the resulting files into your source control system. After that, you don't have to install anything on your Jenkins server if you need to change Gradle versions. Just configure your Jenkins job like this:
Quoting from the Gradle User Guide:
By distributing the wrapper with your project, anyone can work with it
without needing to install Gradle beforehand. Even better, users of
the build are guaranteed to use the version of Gradle that the build
was designed to work with. Of course, this is also great for
continuous integration servers (i.e. servers that regularly build your
project) as it requires no configuration on the server.
The jenkins can not find the gradle executable. I have never made gradle wrapper to work. Please follow the following steps:
Download gradle ( http://gradle.org/downloads),
unpack it to, e.g., /usr/local/lib/gradle ,
open /etc/profile and add the following two lines:
export GRADLE_HOME=/usr/local/lib/gradle
export PATH=$PATH:$GRADLE_HOME/bin
It works for my jenkins installation.
ps. I answer this old question, because it is a common issue when setting up gradle with jenkins. I have spent some time trying to make the gradle wrapper work without success before.
Used both #Skarab & a number of other solutions here to get it to work.
Download gradle ( http://gradle.org/downloads),
unpack it to, e.g., /usr/local/lib/gradle ,
open /etc/profile and add the following two lines:
export GRADLE_HOME=/usr/local/lib/gradle
export PATH=$PATH:$GRADLE_HOME/bin
Then under Manage Jenkins > Configure system > Gradle, defined GRADLE_HOME and gave that gradle installation a name
Then, {this could be a bug} for the project, change gradle version from Default to the one I defined above
As others have noted, this is because Jenkins can't find the gradle executable.
None of the published solutions worked for me, but I was able to fix the problem by adding the gradle bin dir to the path set in the .bashrc for the build account on the build slave. Modifying the .profile failed, and setting PATH in the jenkins node configuration also failed.
Some posts will suggest setting the gradle path in the tools menu, but no gradle entry was available there either (perhaps due to regressions / design changes in the gradle plugin?).
In any case, the best test I found (short of running the build again and watching for failure) was to run env over ssh:
ssh <host> env
and check the PATH variable defined that way; if gradle isn't in that path, you probably won't be able to run it from jenkins.

Resources