jenkins.plone.org/master: Merge pull request #206 from plone/new-structure

GitHub <jenkins-z4DKO/[email protected]>
Newsgroups gmane.comp.web.zope.plone.cvs
Message-ID <[email protected]>
Repository: jenkins.plone.org
Branch: refs/heads/master
Date: 2017-07-22T23:30:03+02:00
Author: Gil Forcada Codinachs (gforcada) <[email protected]>
Commit: https://github.com/plone/jenkins.plone.org/commit/4d1b0a75b5a1692ef3ab79c828c1d54d39811faa

Merge pull request #206 from plone/new-structure

New structure

Files changed:
A ansible/inventory.txt
A ansible/node.yml
A ansible/roles.yml
A ansible/secrets.yml.in
A ansible/server.yml
A ansible/vagrant/files/credentials.xml
A ansible/vagrant/files/key.priv
A ansible/vagrant/files/key.pub
A ansible/vagrant/files/node.xml
A ansible/vagrant/inventory.txt
A ansible/vagrant/playbook.yml
A files/jenkins.plone.org.css
A files/jenkins.plone.org.pub
A files/sponsors/iskra.png
A files/sponsors/kitconcept.png
A files/sponsors/rackspace.jpg
A files/sponsors/sponsors.html
A jobs/config.ini.in
A jobs/flow.groovy
A jobs/jobs.yml
A jobs/scripts/4.3-tests.sh
A jobs/scripts/5.x-at.sh
A jobs/scripts/5.x-js.sh
A jobs/scripts/5.x-robot.sh
A jobs/scripts/5.x-tests.sh
A jobs/scripts/addon-get-info.py
A jobs/scripts/addon-tests.sh
A jobs/scripts/addon.email
A jobs/scripts/docs-styleguide.sh
A jobs/scripts/pkg-py3-report.py
A jobs/scripts/pkg-py3.sh
A jobs/scripts/pkg-qa-report.py
A jobs/scripts/pkg-qa.sh
A jobs/scripts/plips.email
A jobs/scripts/plips.sh
A jobs/scripts/pr-get-info.py
A jobs/scripts/pr-tests.sh
A jobs/scripts/pr.email
A jobs/scripts/qa-global-code-analysis.sh
A jobs/scripts/zope-cmf.sh
A jobs/scripts/zope.sh
A jobs/scripts/ztk.sh
M .gitignore
M Vagrantfile
M ansible.cfg
M docs/source/setup.rst
M docs/source/vagrant.rst
M update_jobs.sh
M update_master.sh
M update_nodes.sh
D etc/jenkins_credentials.xml
D etc/node.xml
D etc/sponsors/iskra.png
D etc/sponsors/kitconcept.png
D etc/sponsors/rackspace.jpg
D etc/sponsors/sponsors.html
D etc/vagrant.priv
D etc/vagrant.pub
D flow.groovy
D inventory-local.txt
D inventory.txt
D jenkins.ini.in
D jenkins.plone.org.css
D jenkins.plone.org.pub
D jenkins_local.yml
D jenkins_node.yml
D jenkins_server.yml
D jobs.yml
D roles.yml
D scripts/4.3-tests.sh
D scripts/5.x-at.sh
D scripts/5.x-js.sh
D scripts/5.x-robot.sh
D scripts/5.x-tests.sh
D scripts/addon-get-info.py
D scripts/addon-tests.sh
D scripts/addon.email
D scripts/docs-styleguide.sh
D scripts/pkg-py3-report.py
D scripts/pkg-py3.sh
D scripts/pkg-qa-report.py
D scripts/pkg-qa.sh
D scripts/plips.email
D scripts/plips.sh
D scripts/pr-get-info.py
D scripts/pr-tests.sh
D scripts/pr.email
D scripts/qa-global-code-analysis.sh
D scripts/zope-cmf.sh
D scripts/zope.sh
D scripts/ztk.sh
D secrets.yml.in

diff --git a/.gitignore b/.gitignore
index dc99d56..04fb1ec 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,5 @@
-jenkins.ini
-secrets.yml
+jobs/config.ini
+ansible/secrets.yml
 auth.py
 /develop-eggs
 /eggs
@@ -28,4 +28,4 @@ docs/Makefile
 docs/make.bat
 docs/doctrees
 docs/html
-roles/
+ansible/roles/
diff --git a/Vagrantfile b/Vagrantfile
index f9ded57..f84ed81 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -7,8 +7,8 @@ Vagrant.configure("2") do |config|
     master.vm.network "private_network", ip: "192.168.50.2"
 
     master.vm.provision "ansible" do |ansible|
-      ansible.inventory_path = "inventory-local.txt"
-      ansible.playbook = "jenkins_local.yml"
+      ansible.inventory_path = "ansible/vagrant/inventory.txt"
+      ansible.playbook = "ansible/vagrant/playbook.yml"
       ansible.limit = "master"
     end
   end
@@ -18,8 +18,8 @@ Vagrant.configure("2") do |config|
     node.vm.network "private_network", ip: "192.168.50.10"
 
     node.vm.provision "ansible" do |ansible|
-      ansible.inventory_path = "inventory-local.txt"
-      ansible.playbook = "jenkins_local.yml"
+      ansible.inventory_path = "ansible/vagrant/inventory.txt"
+      ansible.playbook = "ansible/vagrant/playbook.yml"
       ansible.limit = "node"
     end
   end
diff --git a/ansible.cfg b/ansible.cfg
index 89c30f2..1880ea6 100644
--- a/ansible.cfg
+++ b/ansible.cfg
@@ -1,3 +1,3 @@
 [defaults]
-roles_path = roles
-hostfile = inventory.txt
+roles_path = ansible/roles
+hostfile = ansible/inventory.txt
diff --git a/inventory.txt b/ansible/inventory.txt
similarity index 100%
rename from inventory.txt
rename to ansible/inventory.txt
diff --git a/jenkins_node.yml b/ansible/node.yml
similarity index 100%
rename from jenkins_node.yml
rename to ansible/node.yml
diff --git a/roles.yml b/ansible/roles.yml
similarity index 100%
rename from roles.yml
rename to ansible/roles.yml
diff --git a/secrets.yml.in b/ansible/secrets.yml.in
similarity index 100%
rename from secrets.yml.in
rename to ansible/secrets.yml.in
diff --git a/jenkins_server.yml b/ansible/server.yml
similarity index 98%
rename from jenkins_server.yml
rename to ansible/server.yml
index 0a29298..55a4484 100644
--- a/jenkins_server.yml
+++ b/ansible/server.yml
@@ -7,7 +7,7 @@
     - plone.jenkins_server
   vars:
     admin_email: [email protected]
-    simple_theme_css_url: https://rawgit.com/plone/jenkins.plone.org/master/jenkins.plone.org.css
+    simple_theme_css_url: https://rawgit.com/plone/jenkins.plone.org/master/files/jenkins.plone.org.css
     simple_theme_js_url: https://cdnjs.cloudflare.com/ajax/libs/doony/2.1/js/doony.min.js
     jenkins_admins:
       - tisto
diff --git a/etc/jenkins_credentials.xml b/ansible/vagrant/files/credentials.xml
similarity index 100%
rename from etc/jenkins_credentials.xml
rename to ansible/vagrant/files/credentials.xml
diff --git a/etc/vagrant.priv b/ansible/vagrant/files/key.priv
similarity index 100%
rename from etc/vagrant.priv
rename to ansible/vagrant/files/key.priv
diff --git a/etc/vagrant.pub b/ansible/vagrant/files/key.pub
similarity index 100%
rename from etc/vagrant.pub
rename to ansible/vagrant/files/key.pub
diff --git a/etc/node.xml b/ansible/vagrant/files/node.xml
similarity index 100%
rename from etc/node.xml
rename to ansible/vagrant/files/node.xml
diff --git a/inventory-local.txt b/ansible/vagrant/inventory.txt
similarity index 100%
rename from inventory-local.txt
rename to ansible/vagrant/inventory.txt
diff --git a/jenkins_local.yml b/ansible/vagrant/playbook.yml
similarity index 91%
rename from jenkins_local.yml
rename to ansible/vagrant/playbook.yml
index 47ec5f7..32620ce 100644
--- a/jenkins_local.yml
+++ b/ansible/vagrant/playbook.yml
@@ -24,7 +24,7 @@
     pillow: true
     lxml: true
   vars_files:
-    - secrets.yml
+    - ../secrets.yml
 
   tasks:
     # most probably this vagrant box will not have a public Internet IP
@@ -40,7 +40,7 @@
     - name: 'Override node configuration'
       become: yes
       copy:
-        src=etc/node.xml
+        src=files/node.xml
         dest=/var/lib/jenkins/nodes/node/config.xml
         owner=jenkins
         group=jenkins
@@ -48,7 +48,7 @@
     - name: 'Add dummy private key'
       become: yes
       copy:
-        src=etc/vagrant.priv
+        src=files/key.priv
         dest=/var/lib/jenkins/private_key
         owner=jenkins
         group=jenkins
@@ -56,7 +56,7 @@
     - name: 'Add credentials.xml'
       become: yes
       copy:
-        src=etc/jenkins_credentials.xml
+        src=files/credentials.xml
         dest=/var/lib/jenkins/credentials.xml
         owner=jenkins
         group=jenkins
@@ -73,4 +73,4 @@
       become: yes
       authorized_key:
         user=jenkins
-        key="{{ lookup('file', 'etc/vagrant.pub') }}"
+        key="{{ lookup('file', 'files/key.pub') }}"
diff --git a/docs/source/setup.rst b/docs/source/setup.rst
index 6b9f9bf..cef1516 100644
--- a/docs/source/setup.rst
+++ b/docs/source/setup.rst
@@ -31,10 +31,23 @@ Install all the tools needed (ansible, ansible roles and jenkins-job-builder):
 .. code-block:: shell
 
     $ pip install -r requirements.txt
-    $ ansible-galaxy install -r roles.yml
+    $ ansible-galaxy install -r ansible/roles.yml
     $ git submodule update --init
 
-Check inventory.txt and make sure that you can connect to the machines listed there.
+.. note::
+   For the roles that are downloaded from checkouts,
+   plone.jenkins_server and plone.jenkins_node,
+   you will need to remove them and clone them manually if you want to make changes on them.
+
+   .. code-block:: shell
+
+       $ cd ansible/roles
+       $ rm -rf plone.jenkins_server
+       $ rm -rf plone.jenkins_node
+       $ git clone git-9UaJU3cA/F/[email protected]:plone/plone.jenkins_server
+       $ git clone git-9UaJU3cA/F/[email protected]:plone/plone.jenkins_node
+
+Check ansible/inventory.txt and make sure that you can connect to the machines listed there.
 
 Copy your public ssh key to all servers:
 
@@ -71,27 +84,27 @@ Test the jobs are properly setup:
 
 .. code-block:: shell
 
-    $ jenkins-jobs --conf jenkins.ini.in test jobs.yml -o output
+    $ jenkins-jobs --conf jobs/config.ini.in test jobs/jobs.yml -o output
 
 .. note::
    A folder named ``output`` should contain one file per each jenkins job
    configured on jobs.yml
 
-Create your own ``jenkins.ini`` by copying it from ``jenkins.ini.in``:
+Create your own ``jobs/config.ini`` by copying it from ``jobs/config.ini.in``:
 
 .. code-block:: shell
 
-    $ cp jenkins.ini.in jenkins.ini
+    $ cp jobs/config.ini.in jobs/config.ini
 
-Add your own credentials to jenkins.ini.
+Add your own credentials to jobs/config.ini.
 You can find them when you log into Jenkins and copy your API token
 (e.g. http://jenkins.plone.org/user/tisto/configure).
 
-Create your own ``secrets.yml`` by copying it from ``secrets.yml.in``:
+Create your own ``ansible/secrets.yml`` by copying it from ``ansible/secrets.yml.in``:
 
 .. code-block:: shell
 
-    $ cp secrets.yml.in secrets.yml
+    $ cp ansible/secrets.yml.in ansible/secrets.yml
 
 Add github API secrets that are needed for the github login functionality on jenkins.plone.org.
 You can find those settings on plone organization in github:
diff --git a/docs/source/vagrant.rst b/docs/source/vagrant.rst
index 5886b9b..5d997ba 100644
--- a/docs/source/vagrant.rst
+++ b/docs/source/vagrant.rst
@@ -51,6 +51,6 @@ Finally, to run ``jenkins-job-builder`` on it, run:
 
 .. code-block:: shell
 
-    jenkins-jobs --conf jenkins.ini.in update jobs.yml
+    jenkins-jobs --conf jobs/config.ini.in update jobs/jobs.yml
 
 *Enjoy!*
diff --git a/jenkins.plone.org.css b/files/jenkins.plone.org.css
similarity index 100%
rename from jenkins.plone.org.css
rename to files/jenkins.plone.org.css
diff --git a/jenkins.plone.org.pub b/files/jenkins.plone.org.pub
similarity index 100%
rename from jenkins.plone.org.pub
rename to files/jenkins.plone.org.pub
diff --git a/etc/sponsors/iskra.png b/files/sponsors/iskra.png
similarity index 100%
rename from etc/sponsors/iskra.png
rename to files/sponsors/iskra.png
diff --git a/etc/sponsors/kitconcept.png b/files/sponsors/kitconcept.png
similarity index 100%
rename from etc/sponsors/kitconcept.png
rename to files/sponsors/kitconcept.png
diff --git a/etc/sponsors/rackspace.jpg b/files/sponsors/rackspace.jpg
similarity index 100%
rename from etc/sponsors/rackspace.jpg
rename to files/sponsors/rackspace.jpg
diff --git a/etc/sponsors/sponsors.html b/files/sponsors/sponsors.html
similarity index 78%
rename from etc/sponsors/sponsors.html
rename to files/sponsors/sponsors.html
index df6d8d4..470a3d5 100644
--- a/etc/sponsors/sponsors.html
+++ b/files/sponsors/sponsors.html
@@ -1,15 +1,15 @@
 <div style="text-align: center; width: 32%; margin-right: 2%; float: left;">
   <a href="http://www.iskra.cat">
-    <img src="https://cdn.rawgit.com/plone/jenkins.plone.org/master/etc/sponsors/iskra.png" alt="Iskra" />
+    <img src="https://cdn.rawgit.com/plone/jenkins.plone.org/master/files/sponsors/iskra.png" alt="Iskra" />
   </a>
 </div>
 <div style="text-align: center; width: 32%; margin-right: 2%; float: left;">
   <a href="http://www.kitconcept.com">
-  <img src="https://cdn.rawgit.com/plone/jenkins.plone.org/master/etc/sponsors/kitconcept.png" alt="kitconcept" />
+  <img src="https://cdn.rawgit.com/plone/jenkins.plone.org/master/files/sponsors/kitconcept.png" alt="kitconcept" />
 </a>
 </div>
 <div style="text-align: center; width: 32%; float: left;">
   <a href="http://www.rackspace.com">
-    <img src="https://cdn.rawgit.com/plone/jenkins.plone.org/master/etc/sponsors/rackspace.jpg" alt="Rackspace" />
+    <img src="https://cdn.rawgit.com/plone/jenkins.plone.org/master/files/sponsors/rackspace.jpg" alt="Rackspace" />
   </a>
 </div>
diff --git a/jenkins.ini.in b/jobs/config.ini.in
similarity index 100%
rename from jenkins.ini.in
rename to jobs/config.ini.in
diff --git a/flow.groovy b/jobs/flow.groovy
similarity index 100%
rename from flow.groovy
rename to jobs/flow.groovy
diff --git a/jobs.yml b/jobs/jobs.yml
similarity index 100%
rename from jobs.yml
rename to jobs/jobs.yml
diff --git a/scripts/4.3-tests.sh b/jobs/scripts/4.3-tests.sh
similarity index 100%
rename from scripts/4.3-tests.sh
rename to jobs/scripts/4.3-tests.sh
diff --git a/scripts/5.x-at.sh b/jobs/scripts/5.x-at.sh
similarity index 100%
rename from scripts/5.x-at.sh
rename to jobs/scripts/5.x-at.sh
diff --git a/scripts/5.x-js.sh b/jobs/scripts/5.x-js.sh
similarity index 100%
rename from scripts/5.x-js.sh
rename to jobs/scripts/5.x-js.sh
diff --git a/scripts/5.x-robot.sh b/jobs/scripts/5.x-robot.sh
similarity index 100%
rename from scripts/5.x-robot.sh
rename to jobs/scripts/5.x-robot.sh
diff --git a/scripts/5.x-tests.sh b/jobs/scripts/5.x-tests.sh
similarity index 100%
rename from scripts/5.x-tests.sh
rename to jobs/scripts/5.x-tests.sh
diff --git a/scripts/addon-get-info.py b/jobs/scripts/addon-get-info.py
similarity index 100%
rename from scripts/addon-get-info.py
rename to jobs/scripts/addon-get-info.py
diff --git a/scripts/addon-tests.sh b/jobs/scripts/addon-tests.sh
similarity index 100%
rename from scripts/addon-tests.sh
rename to jobs/scripts/addon-tests.sh
diff --git a/scripts/addon.email b/jobs/scripts/addon.email
similarity index 100%
rename from scripts/addon.email
rename to jobs/scripts/addon.email
diff --git a/scripts/docs-styleguide.sh b/jobs/scripts/docs-styleguide.sh
similarity index 100%
rename from scripts/docs-styleguide.sh
rename to jobs/scripts/docs-styleguide.sh
diff --git a/scripts/pkg-py3-report.py b/jobs/scripts/pkg-py3-report.py
similarity index 100%
rename from scripts/pkg-py3-report.py
rename to jobs/scripts/pkg-py3-report.py
diff --git a/scripts/pkg-py3.sh b/jobs/scripts/pkg-py3.sh
similarity index 100%
rename from scripts/pkg-py3.sh
rename to jobs/scripts/pkg-py3.sh
diff --git a/scripts/pkg-qa-report.py b/jobs/scripts/pkg-qa-report.py
similarity index 100%
rename from scripts/pkg-qa-report.py
rename to jobs/scripts/pkg-qa-report.py
diff --git a/scripts/pkg-qa.sh b/jobs/scripts/pkg-qa.sh
similarity index 100%
rename from scripts/pkg-qa.sh
rename to jobs/scripts/pkg-qa.sh
diff --git a/scripts/plips.email b/jobs/scripts/plips.email
similarity index 100%
rename from scripts/plips.email
rename to jobs/scripts/plips.email
diff --git a/scripts/plips.sh b/jobs/scripts/plips.sh
similarity index 100%
rename from scripts/plips.sh
rename to jobs/scripts/plips.sh
diff --git a/scripts/pr-get-info.py b/jobs/scripts/pr-get-info.py
similarity index 100%
rename from scripts/pr-get-info.py
rename to jobs/scripts/pr-get-info.py
diff --git a/scripts/pr-tests.sh b/jobs/scripts/pr-tests.sh
similarity index 100%
rename from scripts/pr-tests.sh
rename to jobs/scripts/pr-tests.sh
diff --git a/scripts/pr.email b/jobs/scripts/pr.email
similarity index 100%
rename from scripts/pr.email
rename to jobs/scripts/pr.email
diff --git a/scripts/qa-global-code-analysis.sh b/jobs/scripts/qa-global-code-analysis.sh
similarity index 100%
rename from scripts/qa-global-code-analysis.sh
rename to jobs/scripts/qa-global-code-analysis.sh
diff --git a/scripts/zope-cmf.sh b/jobs/scripts/zope-cmf.sh
similarity index 100%
rename from scripts/zope-cmf.sh
rename to jobs/scripts/zope-cmf.sh
diff --git a/scripts/zope.sh b/jobs/scripts/zope.sh
similarity index 100%
rename from scripts/zope.sh
rename to jobs/scripts/zope.sh
diff --git a/scripts/ztk.sh b/jobs/scripts/ztk.sh
similarity index 100%
rename from scripts/ztk.sh
rename to jobs/scripts/ztk.sh
diff --git a/update_jobs.sh b/update_jobs.sh
index 6708098..fb2e5b2 100755
--- a/update_jobs.sh
+++ b/update_jobs.sh
@@ -1,2 +1,2 @@
 #!/usr/bin/env bash
-jenkins-jobs --conf jenkins.ini update jobs.yml
+jenkins-jobs --conf jobs/config.ini update jobs/jobs.yml
diff --git a/update_master.sh b/update_master.sh
index 143456b..f5e026e 100755
--- a/update_master.sh
+++ b/update_master.sh
@@ -1,2 +1,2 @@
 #!/usr/bin/env bash
-ansible-playbook --limit jenkins_server -i inventory.txt jenkins_server.yml
+ansible-playbook --limit jenkins_server -i ansible/inventory.txt ansible/server.yml
diff --git a/update_nodes.sh b/update_nodes.sh
index 87dace6..d382320 100755
--- a/update_nodes.sh
+++ b/update_nodes.sh
@@ -1,2 +1,2 @@
 #!/usr/bin/env bash
-ansible-playbook --limit jenkins_nodes -i inventory.txt jenkins_node.yml
+ansible-playbook --limit jenkins_nodes -i ansible/inventory.txt ansible/node.yml



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.