Tag Info

Hot answers tagged

13

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; ...


12

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 + ...


11

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

Configure it to run on any port you like! 81. 8081. Anything really.


7

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 ...


7

Set the "Restrict where this job can be run" check box in your job configuration and specify the name of your slave. If you add more slaves later, you can set labels for each slave and specify those in your job configs.


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 ...


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

OK, so I've managed to do it: you need Role Strategy Plugin enable this authentication strategy in Configure Global Security in Manage and Assign Roles / Manage Roles create new role anonymous and authenticated for both global and project roles in Global roles grant anonymous role right only to Overall / Read (this will at the very least access anonymous ...


5

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


5

I am late but In future this will help to other people insted of https://username@bitbucket.org/username/repo.git replace this https://bitbucket.org/username/repo.git in the Git Repository URL


5

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 ...


5

I ran into this issue which was resolved by editing jenkins config file sudo vim /etc/default/jenkins edit HTTP_HOST, default 127.0.0.1 to HTTP_HOST=0.0.0.0


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

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 ...


4

A former colleague of mine wrote this: https://github.com/txels/autojenkins which has a whole bunch of convenience features and API type stuff around working with a jenkins instance from Python..


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

You need to pass in your required value of user.timezone as a JVM argument when you start Jenkins. The Java command line will look something like: $JAVA_HOME/java -Duser.timezone="America/Toronto" [other JVM parameters] $JENKINS_HOME/jenkins.jar Unfortunately I'm not familiar with the Debian installation, but the JVM parameters should either be defined ...


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; }


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

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

I believe you are looking for this option from man sudoers requiretty If set, sudo will only run when the user is logged in to a real tty. When this flag is set, sudo can only be run from a login session and not via other means such as cron(8) or cgi-bin scripts. This flag is off by default. ...


3

EDIT 2 If running Jenkins on an Amazon EC2 instance, try setting HTTP_HOST to 0.0.0.0. You may not be able to bind the public interface IP directly. EDIT 1 Check /etc/default/jenkins instead if you installed directly from the .deb package. It appears Jenkins is listening on localhost (--httpListenAddress=127.0.0.1). In this configuration, Jenkins is ...


3

Considering that Jenkins normally should not be run as root, you can take anything starting from 1024 upwards, because <1024 is reserved for root only.


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

It's likely you can reproduce your problem by trying the following in PowerShell: robocopy a b * "/e /purge" If this is true, parameter expansion is what's causing your problem. To work around this, you can go this route: iex "$srcLocation $destLocation $files $options"


3

I prefer curl.... curl "http://localhost:18080/jenkins/job/npm-package-aaa/config.xml" -si --data-binary "$XML" -H "Content-Type: text/xml"


3

According to the Internet: What are the .key files for? Short story: I strongly suggest backing up the files somewhere. As already mentioned in this thread, the secret.key is used to encrypt sensitive data in configuration files, e.g. the proxy password in update center. Without the key file these configuration values are useless.


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

Absent a facility in the software itself that lets you do this, you've pretty much outlined the three options available to make it happen without working too hard. Looking at those options more closely: Option 3 sucks. Don't do it. Too complex and too much potential to screw up. Option 1 sucks less - You just need to remember to patch every time you ...



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