Jenkins building Xcode - getting build error "permission denied" - ios

I'm trying to get a phonegap project building on our Jenkins build server and I'm getting a permission denied error. Keep in mind, this is my first experience with Mac OS X.
The build output in Jenkins is telling me this:
/bin/sh -c \"/Users/Shared/Jenkins/Home/jobs/myMobile\ -\ iOS/workspace/build/TDE.build/Release-iphoneos/TDE.build/Script-304B58A110DAC018002A0835.sh\"
/Users/Shared/Jenkins/Home/jobs/myMobile - iOS/workspace/build/TDE.build/Release-iphoneos/TDE.build/Script-304B58A110DAC018002A0835.sh: line 2: cordova/lib/copy-www-build-step.sh: Permission denied
** BUILD FAILED **
The following build commands failed:
PhaseScriptExecution Copy\ www\ directory build/TDE.build/Release-iphoneos/TDE.build/Script-304B58A110DAC018002A0835.sh
(1 failure)
Build step 'XCode' marked build as failure
Finished: FAILURE
Googling this, I found a SO post saying to run the chmod 755 command on this .sh file, but that still didn't fix anything. What else should I be doing to get this file to be able to execute/copy or whatever it's doing?
Edit: Is my actual permission issue for this file:
line 2: cordova/lib/copy-www-build-step.sh: Permission denied
Or is it the Script-.... file?

Added permissions on the ...copy-www-build-step.sh file and that fixed THIS build error. On to the next...
In order for these permissions to stay even after doing a full-checkout from SVN via Jenkins, find the copy-www-build-step in your source control. View the properties for the file, and add svn:executable.
This fixes it so you don't have to keep updating the permissions if you do a full checkout for every build.

I get the answer... I have to change the file permissions.. sudo chmod 777 copy-www-build-step.sh
just move to the platforms/ios/cordova/lib and execute the above command.

Related

karate options in jenkins

I am trying to run code from jenkins giving specific tag in Goals and options.But it fails with following error.Can you please validate the syntax and let me know how to resolve this
Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean (default-clean) on project karate-boilerplate: Failed to clean project: Failed to delete
clean compile test -Dkarate.options="--tags #reg"
This doesn't look like an issue with karate, error says
Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean (default-clean) on project karate-boilerplate: Failed to clean project: Failed to delete
maven is failing to clean your target directory. from the complete logs, you should be able to see the exact file which maven is not able to delete.
In the logs carefully look after Failed to delete statement. it should be pointing to a file.

Jenkins Permission Denied on shell execute

I'm trying to do a shell execute in Jenkins build step. I have a binary executable in /home/ubuntu/.local/bin/aws which is called from Jenkins executable script.
In the build output log, it reads /tmp/jenkins2312.sh: line 2: /home/ubuntu/.local/bin/aws: Permission denied
Adding Jenkins user to Root Group didn't help.
Give execute permission to aws file.
chmod +x /home/ubuntu/.local/bin/aws
Is the file executable for jenkins?
If you are on the machine you could set it to have suitable executable permissions (chmod 755 /home/ubuntu/.local/bin/aws )
You should only have to do this once.
In Ubuntu you need to stop and start Jenkins after you change jenkins's user's permissions. For me, restarting Jenkins didn't work but stop and start did.
your aws executable should in this location
/usr/local/bin/aws
then should work as you want, I don't think on .local

Jenkins2 installer in macOS change home directory

I am new to Jenkins, and I have the following problem
just installed Jenkins2 on MacOS Sierra (10.12.6)
and a new user has been created under /Users/Shared/Jenkins/,
but when I try to run a maven compile command, through a new Job
I have the following error:
[atmosphere] $ mvn -f spring-boot-samples/spring-boot-sample-atmosphere/pom.xml compile
FATAL: command execution failed
java.io.IOException: error=2, No such file or directory
I try to run the command manually and got the following:
Caused by: org.apache.maven.shared.filtering.MavenFilteringException:
Cannot create resource output directory:
/Users/Shared/Jenkins/Home/workspace/atmosphere/spring-boot-samples/spring-boot-sample-atmosphere/target/classes
How could I solve this ?
I guess I have to change the workspace permissions, but I don't know how to do that.
Please help !
It was really a newbie mistake.
I didn't have installed the maven plugin.
This post helped me to solve the problem.

"Access Denied" error during TFS XAML build process

I Have Source Controller And Team Project My Build Process Is
and when i build i Got Access Denied Error Like This:
C:\Program Files (x86)\MSBuild\12.0\bin\amd64\Microsoft.Common.CurrentVersion.targets (3678): Unable to copy file "C:\Builds\2\AcuatAgile\AcuatNFSBuild\src\AcuatAgile\Release001\Library\Kendo.Mvc.dll" to "C:\Builds\2\AcuatAgile\AcuatNFSBuild\bin\Kendo.Mvc.dll". Access to the path 'C:\Builds\2\AcuatAgile\AcuatNFSBuild\bin\Kendo.Mvc.dll' is denied.
and every time i got Access Denied To Different File DLL
I Searched The Net And Most Of The Answers are Clean WorkSpace As You Can See I Put True To Clean WorkSpace And I Got The Same Error in Build.
is there any other parameters to solve this problem?
Check the properties of bin folder to see whether it is read-only.
Try to add the following MSBUILD arguments in the build definition: /m:1 to make MSBUILD to use only one process to build.

Jenkins and CMake: permission errors

I installed Jenkins, I'm new to it. Made a user, installed the CMake plugin. I'm trying to compile a simple project just to get started but I cannot even do that.
After complaining of not being able to open some files (like build/CMakeFiles/CMakeOutput.log), at the end of the output it says:
-- Configuring incomplete, errors occurred!
CMake Error: Cannot open file for write: /home/username/development/csa/build/CMakeCache.txt.tmp
CMake Error: : System Error: Permission denied
CMake Error: Unable to open cache file for save. /home/username/development/csa/build/CMakeCache.txt
CMake Error: : System Error: Permission denied
Build step 'CMake Build' marked build as failure
Finished: FAILURE
To me this is clearly a permissions issue. The build directory is empty, it has not done anything. I created a user, started jenkins and either of the following had no effect on the output:
sudo /etc/init.d/jenkins start --user jenkins
sudo /etc/init.d/jenkins start --user username
sudo /etc/init.d/jenkins start
I'm not even trying to compile the code, just trying to build the cmake files... my configuration is like this: (as simple as possible)
I did add a working directory which is in my home folder so I do have permissions for it.
EDIT: I changed the ownership of the build folder to jenkins, created a user group called jenkinsusers, added myself and jenkins to the group, and gave the group read/write permissions. It appears to work now. But I'm not sure this is the standard way to do this...
So I'm not sure this is the right way but this is how I did it: I changed the owner of the directory to jenkins.
The workspace folder is under my home directory (~/myproject/build). That's probably the issue. The compiling gets done using catkin_make, a tool from ROS.

Resources