While making changes under Global Tool Configuration in Jenkins, it throws a message as "A problem occurred while processing your request". Though the changes are reflected even after the error message, however, it doesn't stay put after a jenkins restart.
enter image description here
I have tried the possible solutions.
Remove multi-auth files and role-strategy files
Remove authorization tag from config.xml files
Restarted jenkins multiple time
Updated plugins
Related
I'm in the process of migrating all our Jenkins jobs into pipelines and, using a JenkinsFile for better control (committed to CodeCommit, AWS' GIT).
One of the steps in our jobs is the Post Build Action that uploads files to S3, which works correctly in the Jenkins' jobs, but haven't been able to correctly replicate it in the JenkinsFile. I think I've tried every possible combination provided in the documentation but, despite the process says that "worked", no file appears in S3 console.
Since our target file gets named based on version number extracted from pom.xml, I need to use wildcards to get it's name using the following syntax:
s3Upload(bucket:"myBucket", path:'path/to/targetFolder/', includePathPattern:'**/*.war', workingDir:'target')
The 'path/to/targetFolder/' gets created and the log shows:
Uploading
file:/var/lib/jenkins/workspace/mailer%20pipeline/target/mailer%23%231.3.2.war to s3://myBucket/path/to/targetFolder/
Finished: Uploading to myBucket/path/to/targetFolder/
Upload complete
But no file gets into the target folder.
What could I be missing?
There was indeed an error in the plugin. I reported it to GitHub and a contributor released a fix.
We'd like to build a script that checks for certain output in the build log, analyzes it and sends results to the person in charge.
What would be the best way to access the logs?
Is there any property that points us to the location of the log file so we could perform this step in the post-build step?
Can we copy the log via the build definition or manually in the post-build step to some folder?
Right now we're stuck getting access to the log file of completed builds at all -
except manually via the web interface or in VS..
If you are running a drop folder as part of your build the log files will be dropped their, the path will always be.
DropLocation\BuildName\Build\logs
So you can work out where the log file will be created and use the DropLocation property to identify the path (Microsoft.TeamFoundation.Build.Activities.Extensions.WellKnownEnvironmentVariables.DropLocation in TFS2013)
I have perforce installed on my ubuntu server and am accessing it from a Windows XP machine on the same network. It is located at mysql:1667. I am able to access perforce via p4v from the windows machine.
I installed jenkins on the same server, and can access it via mysql:8080. I have installed the perforce plugin, and put set the file location at usr/local/bin/p4.
When I try to create a new project, I put in the info mysql:1667, jenkins, XXXXXXXX, jenkins_space (which has been created and is listed among the workspaces in p4v), I see the red "unable to check workspace against depot". Reading that this is possibly a misleading error message, I try to do a build anyway (with absolutely no build commands). The "build" fails, and I get the following:
Started by user anonymous
Building in workspace /var/lib/jenkins/workspace/test7
Using master perforce client: jenkins_space
[test7] $ /usr/local/bin/p4 workspace -o jenkins_space
Caught exception communicating with perforce. Connect to server failed; check $P4PORTcom.tek42.perforce.PerforceException: Connect to server failed; check $P4PORT
at com.tek42.perforce.parse.AbstractPerforceTemplate.getPerforceResponse(AbstractPerforceTemplate.java:406)
at com.tek42.perforce.parse.AbstractPerforceTemplate.getPerforceResponse(AbstractPerforceTemplate.java:301)
at com.tek42.perforce.parse.Workspaces.getWorkspace(Workspaces.java:61)
at hudson.plugins.perforce.PerforceSCM.getPerforceWorkspace(PerforceSCM.java:1545)
at hudson.plugins.perforce.PerforceSCM.getPerforceWorkspace(PerforceSCM.java:1506)
at hudson.plugins.perforce.PerforceSCM.checkout(PerforceSCM.java:843)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1414)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:652)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:561)
at hudson.model.Run.execute(Run.java:1678)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:231)
ERROR: Unable to communicate with perforce. Connect to server failed; check $P4PORT
Finished: FAILURE
Any ideas what I might have/be doing wrong?
Thank you,
Brian
The error is indicating that it isn't connecting to the server. There's nothing in the logs indicating that the calls to perforce are getting a valid P4PORT and they aren't being sent command-line arguments.
Double-check that your Source Code Management plugin in your Job is configured as you expect it to be. The P4PORT should be coming from Jenkins immediately before the first p4 command is generated (although it won't appear in the logs).
Generally "Unable to check workspace against depot" is a valid diagnostic. If you get "Workspace does not exist", that may be bogus, due to a number of factors, but the "Unable to check" error tends to indicate that a connection can't be made or there is an authentication failure.
If you are using SSL, make sure you put that in the connection string as well (ssl:mysql:1667 as an example), since that will cause a connection failure, although it should generate a different message in the logs.
I faced a similar issue and restarting the jenkins server on the slave machine worked for me.
Check the configuration in jenkins and ensure that the user used for perforce has valid permissions and the P4PORT settings are correct.Once you are done,restart the jenkins service in the slave.
Seems like jenkins was still using the old settings which was causing the failure.
Currently I'm running a Maven 3 build with Selenium/WebDriver tests. Whenever a test fails, it will snap a screenshot and save it to the correct folder (for the plugin). When the job finishes, I can see all the attachments listed. I can also copy the attachments off of the Jenkins server and view them.
However, whenever I try to view them in Jenkins, I'm seeing a 404 file not found exception. I've double checked the permissions of all the files involved, tried using both .jpg and .png extensions. I've commented on the JUnit Attachments Plugin wiki page. I'm thinking that it might be a bug at this point, but wanted to see if anyone has had it work with Maven builds.
n.b. I'm using version 1.3 of the plugin, version 1.540 of Jenkins, and the correct dependency for JQuery.
Edit: This is not specific to images. I attempted this with a text file, and still get a 404.
I am new to Jenkins and just started configuring it. This is what i have done till now:
Installed and configured Jenkins to display the home page. Added PMD plugin.
Set the HUDSON_HOME to a specific directory > C:\Work\Jenkins
Configured a test build to run a simple do-nothing ant script. It runs successfully
Written an independent pmdbuild.xml to run checks on a set of files in C:\myview (I am using clearcase). This xml also copies the output pmd_results.xml to the workspace directory in $HUDSON_HOME/[job-name]/workspace
Now I added the pmdbuild.xml as a step in my primary build. So my build has 2 steps:
a. Run a simple script, do-nothing.
b. Run pmdbuild.xml which generate pmd_results.xml and place it in $HUDSON_HOME/[job-name]/workspace (HARD-CODED as Jenkins PMD plugin expects the file there)
Jenkins picks up the pmd_results.xml automatically with the plugin and displays warnings and everything.
Now the problem:
If I click on a filename in the PMD results, it gives a filenotfound exception as it is looking for the source file in $HUDSON_HOME/[job-name]/workspace.
My java code files are placed in C:\myview (a clearcase snapshot view)
My question is, do I need all my code files to be present inside $HUDSON_HOME/[job-name]/workspace ?? Meaning can't I tell Jenkins to look for the PMD input files in C:\myview or any other directory instead of $HUDSON_HOME/[job-name]/workspace ??
Sorry for the extremely long description.
Jenkins expects that all the code is in the workspace. Usually Jenkins is used to check out a copy of the code into the workspace, and then runs all build steps on the Sources in the Workspace.
Might seem restraining at first, but it saves you a lot of trouble if you need to move Jenkins to another server, or create a slave instance.
So I would suggest you let Jenkins check out your code (there should be a clearcase plugin) into the workspace, and run the analysis on the checked out code.
If there are compelling reasons why your code has to stay where it is (C:\myview in your case) you can still set the workspace of your build to that directory (find this in the job configuration page, you need to click on the 'extended' button to see the option).