why my jenkins is stuck while checking out a project via SVN? - maven

I have downloaded eclipse and with it I have checked out a project available via SVN, the project is named "Simulation" and is available at an address, with eclipse I can do everything but my main job is to build that project via Jenkins so I have created a maven project that gets the code from SVN: some_address/svn/Simulation and I configured it to build every 2 minutes but 30 minutes passed and here is the log from build #1:
Started by user %USERNAME%
Started by timer
[EnvInject] - Loading node environment variables.
Building in workspace C:\Program Files (x86)\Jenkins\workspace\simulation
Checking out a fresh workspace because there's no workspace at C:\Program Files (x86)\Jenkins\workspace\simulation
Cleaning local Directory .
Checking out http://some_address/svn/Simulation at revision '2019-02-26T09:30:18.376 +0100' --quiet
Using sole credentials devops/****** in realm ‘<http://some_address> VisualSVN Server’
now, I am able to ping successfully to that address and like I said before, I checked out the project with eclipse
what am I doing wrong?

Related

Maven test-output folder is not updated with the build results(emailable-report is not updated after the build is successful/failure with the result)

Scenario: Send an email after the build with the emailable-report.html.
Am able to achieve the above scenario.
But when the build is completed in jenkins, target folder or test-output folder is not updated after build. which means the jenkins workspace is not updating the target folder or test-output folder after the build. Rather the Jenkins workspace remains with the code checked out from GIT repository.
I want the jenkins workspace to be updated after the build to email the latest emailable-report.html.
Script for the sending the email:
def reportPath = build.getWorkspace().child("test-output/emailable-report.html")
msg.setContent(reportPath.readToString(), "text/html")
Help me with this scenario.
This is just because build is generating in wrong jenkins workspace due the wrong configuration that we have done earlier.
It should be something like
C:\Users\Ashv\.jenkins\workspace\projectname
and for this make sure the below configuration.
Goto Manage Jenkins>>Configure System>>Advanced
Home directory C:\Users\Ashv\.jenkins
Workspace Root Directory : ${JENKINS_HOME}/workspace/${ITEM_FULL_NAME}
Build Record Root Directory: ${ITEM_ROOTDIR}/builds
here I am attaching my job screen for all configuration I have done.
you can find the link of image

Restore TeamCity deleted build configuration

I'm trying to restore accidentally deleted build configuration on TeamCity 9.X following this article "https://confluence.jetbrains.com/display/TCD9/How+To...#HowTo...-RestoreJustDeletedProject"
However, I cannot find _trash folder under /config
I'm running TC on Windows and using internal DB.
What am I doing wrong?

Let Jenkins build a maven project from Perforce

I am trying to set up a Jenkins server to build Maven projects stored in a Perforce Depot but I am failing the setup of the Perforce plugin.
That's what I have (regardless of Jenkins):
A running Perforce server with my Maven Project in a depot //components/myjavaproject/main (that's the path where the pom.xml is.
A Perforce user p4javabld with a client spec called p4javabld-cqm1
The client root is set to D:\p4client\p4javabld
When I set up a Jenkins project I set
P4PORT to my perforce server,
Username to p4javabld
Workspace to p4javabld-cqm1
I did not allow Jenkins to create any new Workspace or Workspace View
Client View type to stream with the stream //components/myjavaproject/main
On the config page I get Unable to check workspace against depot and Unable to check stream against depot
When I run a build it executes a
p4 changes -s submitted -m 1 //p4javabld-cqm1/...
which makes no sense I think. It seems then to scan the complete Perforce depot and seems not to concentrate on //components/myjavaproject/main
What is the configuration error?
I was able to let Jenkins build a Maven project from Perforce. I used the P4 Plugin instead of the Perforce Plugin. Then I configured a manual workspace with a workspace view to
//components/myjavaproject/main/... //p4javabld-cqm1/...
having the pom.xml in the root of //components/myjavaproject/main/

Jenkins corrupted, need to know which files I need

I am having issues with Jenkins that I am unable to resolve, and all the solutions I've found online I've used in the past, but are not helping.
I am on windows 2008r2, utilizing svn, jenkins version 1.407.
Initially the service failed, and was not resolved with past methods. In the past I have successfully troubleshoot Jenkins by killing hung processes, restoring the war file, ect.
I have attempted a new install with bringing over the files in the jobs folder. The end result was a partially functioning Jenkins would attempt a build it would report no change and not update.
What I'm trying to determine is a list of files/folders beyond the jobs folder that I need to move to the new install. The initial install predates me and was Hudson. The folder has a number of obviously obsolete files and folders (both a jenkins.war and a hudson.war)
Go to Jenkins home folder and collect:
all ./*.xml files in - these are configuration files for plugins and jenkins itself
users/* in case you have security enabled
subversion-credentials/** and secrets/** for any kind of keys provided in jenkins to access svn or other resources
plugins/*.*pi folder for all plugins - you don't need to have the unpacked folders
jobs/*/config.xml - to retrieve all job configurations; jobs/*/nextBuildNumber if you care to continue build numbers
plugins may create additional folders which you may want to use
with that you should recreate Jenkins as it was. Pay especially attention to config.xml file in root folder - this holds main jenkins configuration. If your issue reproduces on new system most likely a plugin is cause for problems - in that case review log files most likely you will find out which plugin causes trouble.
You didn't indicate if you tried new setup with same version of Jenkins or newer one; if you are using newest version it may be that ssh key handling / svn authentication for each job needs to be updated as somewhen in last few months authentication / security handling changed. Best is to look into Jenkins release log.
I'm using Jenkins 1.55x on CentOS installed as RPM; given that it is a webapp I assume Windows 1.4x setup is similar.

ld: library not found for -lLIBRARY_NAME, only when trying to build using jenkins

I have a project that when built from my machine everything runs smoothly. However, when I push my changes and try to generate the build using jenkins, I'm getting the library not found error message.
This is weird because if I login into the jenkins server and I try to do a manual build, everything works as expected, perfect. It's only when I build from withing jenkins that my build is failing.
I'm assuming LIBRARY_NAME as the name of whatever library, in my case is an internal static library.
Any suggestions?
EDIT:
I've setup: Library Search Headers, Other Linker Flags, Target Dependencies, Proper Architectures
I wrestled with this for three weeks until I accidentally stumbled onto this with the help of a coworker. Basically, you must be sure that the path structure created in your repository is replicated in the .jenkins workspace. To do this just be sure that in your project/job configuration in jenkins the Source Code Management > Subversion > Repository URL field must be at the same level as specified in jenkins in your script or Build > Execute Shell > Command field. So here are my settings as an example:
above Jenkins URL = https://myDuncwa.local/duncwa-repo
above Jenkins Build = "cd $WORKSPACE/mobileapps/projects/PictureBoard/trunk/PictureBoard" and line 2 "xcodebuild -project PictureBoard.xcodeproj" no quotes.
above Subversion URL repository = https://myDuncwa.local/duncwa-repo
This will cause the directory structure mobileapps/projects/PictureBoard in my repository to replicated in the .jenkins/jobs/PictureBoard/workspace/mobileapps/projects/PictureBoard directory that is created automatically by jenkins. Note: 1) This will copy the entire repository so be prepared to change this later and 2) .jenkins is a hidden directory created by the install in the installing user's home directory or "~/"

Resources