Jenkins Summary

Quick installation on linux ami

yum update -y
wget -O /etc/yum.repos.d/jenkins.repo
rpm --import
yum install jenkins -y
service jenkins start
chkconfig jenkins on

optional add an apache proxy so you can surf using the port 80 instead of port 8080 that maybe is blocked from your corporare firewall

yum install httpd -y
chkconfig httpd on
nano /etc/httpd/conf.d/welcome.conf

add this lines
ProxyRequests Off
<Proxy *>
        Order deny,allow
        Allow from all
ProxyPass         /  http://localhost:8080/
ProxyPassReverse  /  http://localhost:8080/

and restart the service
service httpd restart

change jenkins user before the first start

sed -i 's/JENKINS_USER="jenkins"/JENKINS_USER="ec2-user"/g' /etc/sysconfig/jenkins
chown ec2-user:ec2-user /var/lib/jenkins/
chown ec2-user:ec2-user /var/log/jenkins
chown ec2-user:ec2-user /var/cache/jenkins/

Script details info level

as you can read from this page

Jenkins build steps call shell scripts with the option -x, this enables the tracing of the shell script.
use "set +x" in your shell script or at the beginning of the build step script to turn the tracing off again.
Normally the "noisiness" is very helpful to check if the build has done properly

when you run the the bash script, you can use this first line to decrease the noise

#!/bin/bash +x


To use these features you need to install the plugin

After enable the role access control from
and select the Role Based Strategy

if you click on Manage Jenkins a new option will be showed Manage and Assign Role

Following this permissions table

  • if you want assign an user the rights to use the project assign to restricted and reporting
  • if you want the user modify his view assign to enhanced and dqcronjob

The Pattern Cronjob.*$ include all the jobs belong to the Cronjob view.


from a property file

it worked for me and

parameter depends from another parameter

I found the basic info in this post
but it is not so much clear so I try to write all the steps:

  1. you need to install the plugin UpdateSites Manager
  2. you need to configure the biouno repos the documentation to configure are in the link of the previous step the information to add are in this page
  3. now you can install the plugin uno-choice-plugin of the biouno company the instruction to use this plugin are in this link

Reduce the console output

start the build with the

#!/bin/bash +x

this will Suppress execution trace like it is written here
it is good to hide command and maybe credentials but also to avoid to much messages in the output when your script is stable so you don't need too much info


Back up and restore from this page

All the settings, build logs, artifact archives are stored under the JENKINS_HOME directory. Simply archive this directory to make a back up. Similarly, restoring the data is just replacing the contents of the JENKINS_HOME directory from a back up.
Back ups can be taken without stopping the server, but when you restore, please do stop the server.

Plugins Backup

there are some plugins for backup

put the backups in s3

Claus Conrad solution

from this page
this guy do the following:

  1. copy all the important configuration and data from the JENKINS_HOME in the working directory
  2. create a big zip file
  3. upload to s3 using the "S3 plugin"

not bad like solution but it is bit heavy under my point of view

Salvo diversa indicazione, il contenuto di questa pagina è sotto licenza Creative Commons Attribution-ShareAlike 3.0 License