Hudson build timeout plugin - hudson-plugins

Do you guys know how to check out hudson build timeout plugin's source code ?
I could find only the jenkins build timeout plugin's source code.
https://github.com/hudson-plugins doesn't contain build-timeout plugin

Related

How to Configure Build as Unstable vs Failed in Jenkins

in the Jenkins UI, how can I set whether a build should be considered unstable(yellow), or failure(red)? This is for a Maven build, Gatling performance test.
Use the text-finder plugin . https://wiki.jenkins.io/plugins/servlet/mobile?contentId=753775#content/view/753775 you can search for a status or a string in the build log and mark either failure or unstable

How can I configure Maven build job on Jenkins to tell SonarQube the build job's URL?

I have a build job on Jenkins which executes Maven tasks. One of the tasks is sonar:sonar which makes a static source code analysis on our SonarQube server.
How can I tell Maven in the build job configuration to take the property sonar.links.ci=%JOB_URL% which is responsible for displaying the build job's URL on the project's site on SonarQube?
Thank you in advance.
You just pass it as a property to maven task. Dsonar.links.ci=${JOB_URL} sonar:sonar
You can add <ciManagement> to the pom.xml file `.
Example:
<ciManagement>
<system>travis</system>
<url>https://travis-ci.org/your-project</url>
</ciManagement>
See Maven POM Reference.
You can also add information about:
issue tracking system (<issueManagement>)
sources hosting (<scm>)

Properties file path was not found! (Relevant only for builds running on a CI Server)

I get the following message from gradle when I run a 'gradle build' with Artifactory configured.
[buildinfo] Properties file path was not found! (Relevant only for builds running on a CI Server)
It starts appearing when I include the following line in my build.gradle:
apply plugin: 'com.jfrog.artifactory'
I would like to know what it exactly means and what to do about it, but I cannot find anything anywhere about it.
Gradle integration with Artifactory can be achieved by using the Gradle Artifactory Plugin or alternatively from a CI server (Jenkims, Bamboo or TeamCity), by using the relevant Artifactory Plugin for the CI server.
All Artifactory Plugins for the CI servers share the same code with the Gradle Artifactory Plugin to integrate with Artifactory.
The warning message you're getting is relevant only in case the build is running on a CI server. If it is not, this message is not an indication of a problem and it should be ignored. To avoid confusion, in the next release this message type will be changed to info instead of warning.
As for the actual meaning of this message, here's a short description:
The Artifactory Plugins for CI servers use a property file to pass
information to the build tool process (Gradle for example). The Gradle
Artifactory Plugin code (running as part of the Gradle process) uses
the data of in the file for artifact resolution and deployment from/to
Artifactory, as well as deployment for the build information to
Artifactory.
Using the Gradle Artifactory Plugin directly from your build script does not use or require this properties file and that's why you're seeing this message.

How to use ANT in Cloudbees

I'm trying to move an existing ANT build script (build.xml) into Cloudbees for CI using Jenkins. I setup the project repository using GitHub. The build pulls the repository into the Cloudbees Workspace successfully, but then fails with this message.
Parsing POMs
ERROR: No such file /scratch/jenkins/workspace/project/pom.xml
Perhaps you need to specify the correct POM file path in the project configuration?
I'm not too familiar with this, but from what I can tell (thanks Google) it's because Cloudbees uses Maven instead of ANT. Is there a way that I can change Jenkins to run the ANT build script instead of using Maven? Or a simple way to execute my ANT scripts from Maven? Any help here would be appreciated!
Thanks
You do not need a Maven POM file if your project is Ant-based.
It sounds like you created a Maven job in Jenkins. Delete it and create a free-style job instead, then (as #thekbb says) click Add build step and select Invoke Ant and configure as needed.
ant support is provided by teh ant plugin, I think you get this automatically when installing jenkins. In your jenkins job, add a build step of type 'Invoke Ant' and provide the target.

Publish JavaDoc on Jenkins with maven

I have maven project that is built by Jenkins-CI.
How to generate and publish JavaDoc on Jenkins?
Make sure Jenkins javadoc plugin is installed.
Go to http://yourjenkinsserver.com/jenkins/pluginManager/installed to see list of intalled plugins.
Plugin page https://wiki.jenkins-ci.org/display/JENKINS/Javadoc+Plugin
Configure Jenkins job:
In Build section, Goals and options line add:
javadoc:javadoc
That's all. No need to change pom.xml
The simplest thing to do is to create a separate task that runs thr javadoc command, and which runs after the compile task. You pass it the input and output directories.
I would run a separate tomcat for your CI website - it's easier.

Resources