Jenkins Plugins forJob Configuration change email notification

scmuser created the topic: Jenkins Plugins forJob Configuration change email notification
We have a many team admin for Jenkins server. I would like to have kind of Jenkins plugins which can send an email when any job configuration changed and it should be notified to specific users so we can have a track of each changes notified via email.

Tagged :

Jenkins Plugins for Job Configuration change email notification

scmuser created the topic: Jenkins Plugins forJob Configuration change email notification
We have a many team admin for Jenkins server. I would like to have kind of Jenkins plugins which can send an email when any job configuration changed and it should be notified to specific users so we can have a track of each changes notified via email.

Tagged :

Jenkins Upgrade and Solution!!!

rajeshkumar created the topic: Jenkins Upgrade and Solution!!!
Issues 1: You will find these entry in jenkins log file which will take longer time to start the services of jenkins

SEVERE: org.xmlpull.v1.XmlPullParserException: only whitespace content allowed before start tag and not # (position: START_DOCUMENT seen #… @1:1)
Feb 25, 2014 2:12:56 AM hudson.plugins.testng.parser.ResultsParser log
SEVERE: org.xmlpull.v1.XmlPullParserException: only whitespace content allowed before start tag and not # (position: START_DOCUMENT seen #… @1:1)
Feb 25, 2014 2:12:56 AM hudson.plugins.testng.parser.ResultsParser log
SEVERE: org.xmlpull.v1.XmlPullParserException: only whitespace content allowed before start tag and not # (position: START_DOCUMENT seen #… @1:1)
Feb 25, 2014 2:12:57 AM hudson.plugins.testng.parser.ResultsParser log
SEVERE: org.xmlpull.v1.XmlPullParserException: only whitespace content allowed before start tag and not # (position: START_DOCUMENT seen #… @1:1)
Feb 25, 2014 2:12:57 AM hudson.plugins.testng.parser.ResultsParser log
SEVERE: org.xmlpull.v1.XmlPullParserException: only whitespace content allowed before start tag and not # (position: START_DOCUMENT seen #… @1:1)

Issues 2: Post upgrade, you will find under “Manage Jenkins” sections

You have data stored in an older format and/or unreadable data

Issues 3: Post upgrade, you will find under “Manage Jenkins” sections
It appears that your reverse proxy set up is broken.
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

rajeshkumar replied the topic: Jenkins Upgrade and Solution!!!
Solution for Issues 2
To the right of that messages is a “Manage” button.. click that, and it
explains in great detail what this is about.

Once you will click on it, You may find information as below;

Manage Old Data

When there are changes in how data is stored on disk, Jenkins uses the following strategy: data is migrated to the new structure when it is loaded, but the file is not resaved in the new format. This allows for downgrading Jenkins if needed. However, it can also leave data on disk in the old format indefinitely. The table below lists files containing such data, and the Jenkins version(s) where the data structure was changed.

Sometimes errors occur while reading data (if a plugin adds some data and that plugin is later disabled, if migration code is not written for structure changes, or if Jenkins is downgraded after it has already written data not readable by the older version). These errors are logged, but the unreadable data is then skipped over, allowing Jenkins to startup and function properly.

Type Name Version

The form below may be used to resave these files in the current format. Doing so means a downgrade to a Jenkins release older than the selected version will not be able to read the data stored in the new format. Note that simply using Jenkins to create and configure jobs and run builds can save data that may not be readable by older Jenkins releases, even when this form is not used. Also if any unreadable data errors are reported in the right side of the table above, note that this data will be lost when the file is resaved.

Eventually the code supporting these data migrations may be removed. Compatibility will be retained for at least 150 releases since the structure change. Versions older than this are in bold above, and it is recommended to resave these files.
No old data was found.

Unreadable Data

It is acceptable to leave unreadable data in these files, as Jenkins will safely ignore it. To avoid the log messages at Jenkins startup you can permanently delete the unreadable data by resaving these files using the button below.
Type Name Error
hudson.maven.MavenModuleSet US-Harmony-E2E-C4-Regression MissingFieldException: No field ‘perModuleEmail’ found in class ‘hudson.maven.MavenModuleSet’
hudson.maven.MavenModuleSet DY-Classic-QA-US-trunk MissingFieldException: No field ‘perModuleEmail’ found in class ‘hudson.maven.MavenModuleSet’
hudson.maven.MavenModuleSet UK-Classic-E2E-C1-Regression MissingFieldException: No field ‘perModuleEmail’ found in class ‘hudson.maven.MavenModuleSet’
hudson.maven.MavenModuleSet CI-QE-FTU-Regression MissingFieldException: No field ‘perModuleEmail’ found in class ‘hudson.maven.MavenModuleSet’
hudson.maven.MavenModuleSet US-Classic-E2E-C4-Regression MissingFieldException: No field ‘perModuleEmail’ found in class ‘hudson.maven.MavenModuleSet’
hudson.maven.MavenModuleSet CI-QE-IPD-Smoke MissingFieldException: No field ‘perModuleEmail’ found in class ‘hudson.maven.MavenModuleSet’
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

rajeshkumar replied the topic: Jenkins Upgrade and Solution!!!
Solution 3: Post upgrade, you will find under “Manage Jenkins” sections
It appears that your reverse proxy set up is broken.

If you see the error message “It appears that your reverse proxy set up is broken” in the “Manage Jenkins” page, here’s what’s happening.

For a reverse proxy to work correctly, it needs to rewrite both the request and the response. Request rewriting involves receiving an inbound HTTP call and then make a forwarding request to Jenkins (sometimes with some HTTP headers modified, sometimes not.) Failing to configure the request rewriting is easy to catch, because you just won’t see any pages at all.

But proper reverse proxying also involves rewriting response. The primary place where this needs to happen is the “Location” header in the response, which is used during redirects. Jenkins would send back “Location: actual.server:8080/jenkins/foobar ” and the reverse proxy needs to rewrite this to “Location: nice.name/jenkins/foobar “. Unfortunately, failing to configure this correctly is harder to catch.

So Jenkins has a proactive monitoring to make sure this is configured correctly. It uses XmlHttpRequest to request a specific URL in Jenkins (via relative path, so this will always get through provided the request is properly rewritten), which will then redirect the user to another page in Jenkins (this works correctly only if you got the reponse rewriting configured correctly), which then returns 200.

This error message indicates that this test is failing. The most likely cause is that you got the response rewriting incorrectly done. See Running Jenkins behind Apache for additional tips about reverse proxy. While the page talks primarily about Apache, it has some information that applies to other reverse proxies.

For further diagnosis, try wget –no-check-certificate –debug -O /dev/null your.reverse.proxy/jenkins/administrativ…oxySetupMonitor/test (assuming your Jenkins should be visible at your.reverse.proxy/jenkins/ )

or using cURL:

curl -iL your.reverse.proxy/jenkins/administrativ…oxySetupMonitor/test
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

Tagged :

Solution for database disk image is malformed during jenkins install

rajeshkumar created the topic: Solution for database disk image is malformed during jenkins install
Error – database disk image is malformed

Sol
# yum clean dbcache
# yum update

and you are done.
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

Tagged :

Script to check the build status of a Jenkins job

Using JSON & Curl

BUILD_STATUS=$(curl --user USER:TOKEN_VALUE --silent $BUILD_URLapi/json | jq -r '.result')
echo $BUILD_STATUS

Using jenkins Plugins
Plugins Name – Conditional Build Step

For Implementations, Please check here.
https://stackoverflow.com/questions/11125598/getting-the-build-status-in-post-build-script

Using Python & Json

</pre>
#!/usr/bin/python
#
# author: ajs
# license: bsd
# copyright: re2

import json
import sys
import urllib
import urllib2

jenkinsUrl = "https://jenkins.example.com/job/"

if len( sys.argv ) > 1 :
jobName = sys.argv[1]
jobNameURL = urllib.quote(jobName)
else :
sys.exit(1)

try:
jenkinsStream = urllib2.urlopen( jenkinsUrl + jobNameURL + "/lastBuild/api/json" )
except urllib2.HTTPError, e:
print "URL Error: " + str(e.code)
print " (job name [" + jobName + "] probably wrong)"
sys.exit(2)

try:
buildStatusJson = json.load( jenkinsStream )
except:
print "Failed to parse json"
sys.exit(3)

if buildStatusJson.has_key( "result" ):
print "[" + jobName + "] build status: " + buildStatusJson["result"]
if buildStatusJson["result"] != "SUCCESS" :
exit(4)
else:
sys.exit(5)

sys.exit(0)

Reference -
<a href="http://serverfault.com/questions/309848/how-can...49988bb53ee820fe202a">serverfault.com/questions/309848/how-can...49988bb53ee820fe202a</a>
<pre>
Tagged :

Jenkins plugin list sometimes shows up empty

rajeshkumar created the topic: Jenkins plugin list sometimes shows up empty
Issues- Jenkins plugin list ” Updates” and “Available” tab sometimes shows up empty
Solution –
help.openshift.com/hc/en-us/articles/202…times-shows-up-empty
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

Tagged :

Jenkins time-out while pushing to github

rajeshkumar created the topic: Jenkins time-out while pushing to github
C:\Build_WS\BuildDeployment>exit 0
Pushing HEAD to branch master at repo origin
using .gitcredentials to set credentials
> C:\Program Files (x86)\Git\bin\git.exe –version # timeout=10
> C:\Program Files (x86)\Git\bin\git.exe config –local credential.helper store –file=\”C:\Windows\TEMP\git3934542327404930267.credentials\” # timeout=10
> C:\Program Files (x86)\Git\bin\git.exe -c core.askpass=true push github.com/EigenRisk/RACE HEAD:master -f
> C:\Program Files (x86)\Git\bin\git.exe config –local –remove-section credential # timeout=10
ERROR: Publisher hudson.plugins.git.GitPublisher aborted due to exception
hudson.AbortException: No note to push defined
at hudson.plugins.git.GitPublisher.perform(GitPublisher.java:353)
at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:761)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:721)
at hudson.model.Build$BuildExecution.post2(Build.java:183)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:670)
at hudson.model.Run.execute(Run.java:1743)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:89)
at hudson.model.Executor.run(Executor.java:240)
An attempt to send an e-mail to empty list of recipients, ignored.
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

rajeshkumar replied the topic: Jenkins time-out while pushing to github
I could resolve this issues by following url…
stackoverflow.com/questions/19954727/jen…om-github-in-10-mins
issues.jenkins-ci.org/browse/JENKINS-203…panel#comment-190411

stackoverflow.com/questions/5936519/how-…ervice-under-windows
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

Tagged :