Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Finally I figured out how to solve this problem. At first we need to uncheck "Enable security" option at Manage Jenkins page. With security disabled we can trigger our jobs with requests like <code>http://ci.your_domain.com/job/job_name/build</code>. </p> <p>If you want to add token to trigger URL we need to Enable Security, choose "Project-based Matrix Authorization Strategy" and give Admin rights to Anonymous user. After it in Configure page of your project will be "Trigger builds remotely" option where you can specify token so your request will look like <code>JENKINS_URL/job/onru/build?token=TOKEN_NAME</code></p> <p>So with disabled security we need to protect <a href="http://ci.your_domain.com" rel="nofollow">http://ci.your_domain.com</a> with nginx http_auth except urls like <code>/job/job_name/build'</code>.</p> <p>And of course we need to hide 8080 port from external requests. Since my server is on Ubuntu I can use <strong>iptables</strong> firewall:</p> <pre><code>iptables -A INPUT -p tcp --dport 8080 -s localhost -j ACCEPT iptables -A INPUT -p tcp --dport 8080 -j DROP </code></pre> <p>But! On ubuntu (I am not sure about other linux oses) iptables will disappear after reboot. So we need to save them with:</p> <pre><code>iptables-save </code></pre> <p>And it is not the end. With this command we just get a file with iptables. On startup we need to load iptables and the easiest way is to use 'uptables-persistent' package:</p> <pre><code>sudo apt-get install iptables-persistent iptables-save &gt; /etc/iptables/rules </code></pre> <p>Take a closer look at iptables if needed <a href="https://help.ubuntu.com/community/IptablesHowTo#Saving_iptables" rel="nofollow">https://help.ubuntu.com/community/IptablesHowTo#Saving_iptables</a> and good luck with Jenkins!</p> <p>And there is good example for running jenkins on subdomain of your server: <a href="https://wiki.jenkins-ci.org/display/JENKINS/Running+Hudson+behind+Nginx" rel="nofollow">https://wiki.jenkins-ci.org/display/JENKINS/Running+Hudson+behind+Nginx</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload