Tag Info

Hot answers tagged

11

I couldn't find a built in tool so I made one: #!/usr/bin/python # # author: ajs # license: bsd # copyright: re2 import json import sys import urllib2 jenkinsUrl = "https://jenkins.example.com/job/" if len( sys.argv ) > 1 : jobName = sys.argv[1] else : sys.exit(1) try: jenkinsStream = urllib2.urlopen( jenkinsUrl + jobName + ...


10

Debian If you installed Jenkins from the Debian package, you can modify /etc/default/jenkins and add the following line somewhere: HTTP_HOST=127.0.0.1 and then add --httpListenAddress=$HTTP_HOST to the JENKINS_ARGS so that it reads something like: JENKINS_ARGS="--webroot=/var/run/jenkins/war --httpPort=$HTTP_PORT --ajp13Port=$AJP_PORT ...


8

Just in case you're using Nginx and not Apache, you might want to use proxy_redirect http:// https://; to rewrite the Location header as the response comes back from Jenkins. A complete nginx setup where SSL is terminated with Nginx and proxied internally to Jenkins using 8080 might look like this: upstream jenkins { server 127.0.0.1:8080 fail_timeout=0; ...


6

This page should help you set it up behind Apache (which would handle HTTPS): http://wiki.hudson-ci.org/display/HUDSON/Running+Hudson+behind+Apache Apart from being a "normal" reverse-proxy, you'll need this (as shown on that page): Header edit Location ^http://www.example.com/hudson/ https://www.example.com/hudson/


6

Orien is correct, it is the fork() system call triggered by ProcessBuilder or Runtime.exec or other means of the JVM executing an external process (e.g. another JVM running ant, a git command, etc.). There have been some posts on the Jenkins mailing lists about this: Cannot run program "git" ... error=12, Cannot allocate memory There is a nice description ...


6

By default sudo cannot be used without a TTY. In order to do so: Disable 'requiretty' in sudoers (using visudo) This should amount to commenting out 'Defaults requiretty' (using visudo) Ensure that your user is able to login without entering a password: Set 'NOPASSWD' in sudoers Create the user if the user does not exist Set visiblepw - this will allow ...


4

When were you hit? Could it be the leap second problem that hit on both July 1st and recently on certain servers on August 1st, causing both Linux kernel crashes and Java CPU load problems? Here's one of the main references for the July leap, and a thread about the August leap.


4

You are telling the script to exit after the first line yourself, which each exit statement in the if blocks. If you want the logic of your script to stay the same but you want to print everything, let it print the output in a separate loop before processing and exiting. foreach $line (@output) { print $line; }


4

It turns out the crutial info seems to be wget's "--auth-no-challenge" option which apparently is for obscure webserver configurations like Jenkins that don't follow expected protocol: wget --auth-no-challenge --user=joe.shmoe --password=secret \ --post-file=config.xml --no-check-certificate \ ...


4

Jenkins kills all process spawn by the job. This can be disabled by setting the BUILD_ID environment variable to something else: export BUILD_ID=dontKillMe see https://wiki.jenkins-ci.org/display/JENKINS/ProcessTreeKiller for details


3

A better practice would be to use the pwauth plugin, which lets you run jenkins as a non-root user, and only pwauth itself needs to be setuid root to perform the actual authentication.


3

Your understanding is quite complete. The only thing i can add are that "master/slave" terminology use in jenkins/hudson is a little corrupted in my opinion. As the "slaves" are more like executors in distributed scheme of triggering jobs/builds/projects. I won't think that having 3 separate jenkins masters is reasonable in your situation. 1) - I'll have ...


3

The one issue that I see with your config is that: ProxyPassReverse / https://jenkins.example.com Should be: ProxyPassReverse / https://jenkins.example.com/ Seems like the service is sending http:// instead of https:// location headers (probably because your connection to its listener from Apache is unencrypted on the localhost listener), in ...


3

If I'm reading this right, and I like to think that I am.. Then you're asking for a very roundabout way to disable update-motd on ubuntu. Have a look in /etc/cron.d for /etc/cron.d/update-motd, and if you've got it, mv it to /tmp. That should stop it. I don't think you should kill long-running processes. I do think that no harm can come out of ...


3

Note that (as of sometime?) Jenkins can generate the key for you, all you need to do is set the --httpsPort=(portnum) parameter in JENKINS_ARGS. In my case I set JENKINS_PORT="-1" (disable http) and set --httpsPort=8080 which worked well for my own purposes. Just note that any port below 1000 generally requires root access, so pick a port higher than ...


3

Here is my nginx configuration file, even though I access Hudson through https (port 443): The trick with reverse proxy (Apache or Nginx) is to always keep the same path: If you want to redirect to a_long_and_complex_address/hudson, keep the /hudson part: myserver/hudson. Don't try to redirect myserver to a_long_and_complex_address/hudson: all sorts of ...


3

I've been reading the following article, which is closely related: How do I tell Git for Windows where to find my private RSA key? and it gave a good hint: The HOME-Variable is crucial, but it didn't work out the way I thought. After a lot of reasearch and trying I found this article: ...


3

You need to set up an internal DNS server that replies for that domain in your LAN. You can set up BIND to do that, or any number of other programs will do the same thing. When you're in the LAN, set up DHCP to give you the internal DNS server as a primary. Here is some info about setting up the DNS server in OSX server.


3

Doesn't it tell you where this error occurs? I.e. which line of your Puppet manifests? Do you have an exec somewhere, that has "unless"? The error message you get seems to be clear. Either you should fully qualify the executables, i.e. unless => '/usr/bin/apt-key list | /bin/grep -Fqe D50582E6', or you should add a path, i.e. path => ['/bin', ...


3

You can download the plugins from http://mirrors.jenkins-ci.org/plugins/PLUGIN_NAME/latest/PLUGIN_NAME.hpi . Dropping them into jenkins/plugins/ will do the trick. Don't forget to restart Jenkins. Also, if you're using Chef instead of Puppet, the Jenkins cookbook will take care of installing plugins as well.


2

When you go into the Jenkins control panel, you will see a "Manage Jenkins" link. Somewhere down that page, you'll see "Jenkins URL". Try setting that to example.com/jenkins or whatever scheme you have. Take a look at: https://wiki.jenkins-ci.org/display/JENKINS/Running+Hudson+behind+Nginx So, Jenkins is apparently stupid about some things, and you'll ...


2

Yes, it's possible. Go to Jenkins' configuration - Access Control - Security Realm. Choose LDAP or Delegate to servlet container (depends on where you want to put your LDAP config and how your Jenkins is running) and fill you LDAP informations. Then in Authorization part you can select a mode which will ask the LDAP for rights. You can use user's login or ...


2

Make sure pam_limits.so is enabled for su if your jenkins startup script is using "su" for user switching. For Ubuntu Server, uncomment "session required pam_limits.so" line in /etc/pam.d/su file sudo sed -i '/# session\s\+required\s\+pam_limits.so/ s/# *//' /etc/pam.d/su


2

:) I have an answer for you!!! I was excited when I found this a week ago. I had a similar issue. http://wiki.idalko.com/display/SONAUT/Sonar+Authenticator+for+JIRA This guy forked off the code and fixed it to work with Jira embedded crowd. I am deploying it to test servers right now... its working great for me!


2

Find your Jenkins config file, and edit it, making sure you update the port in the file. For example, on Ubuntu, if you used apt-get to install, the file is /etc/default/jenkins and you need to have (or add) the following line: HTTP_PORT=8090 This sets the port to 8090, you can use whichever port you prefer. Once you have that done, you can look at ...


2

A Debian package is a multi-part archive that contains the data, and control information /debian. The data archive is basically extracted as-is. The control archive is extracted and mostly moved into /var/lib/dpkg/info and the pre|post-inst|rm scripts are called when appropriate. If you want to change something after your files are extracted then do it in ...


2

It seems that you create a binary debian package almost by hand using dpkg-deb command. While this approach is not that bad, you'll get better handling of a lot of things if you try to build packages by creating the source packages and then building binary packages out of those (even if it's architecture-independent files like PHP ones). This requires ...


2

You need to be careful exiting 666: cmp@cmp-dev:~$ bash --version GNU bash, version 4.1.5(1)-release (x86_64-pc-linux-gnu) Copyright (C) 2009 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software; you are free to change and redistribute it. There is NO WARRANTY, to the ...


2

I'm not sure <Proxy> directive handle HTTP Basic auth (documentation suggest only restriction by IP/domain). I think you should just use general method like: <Location /> AuthType Basic AuthName "Dev Server" AuthUserFile "/home/.htpasswd" Require valid-user </Location>


2

This seems to be a bug with Jenkins: https://issues.jenkins-ci.org/browse/JENKINS-14551 For the time being, you're best way to handle this is to implement a workaround by the means of automatically clearing out the workspace before building. This may however not the way to go if you have huge and frequent merges - but from my understanding, they're working ...



Only top voted, non community-wiki answers of a minimum length are eligible