You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by ba...@apache.org on 2015/08/16 19:47:37 UTC

[20/23] couchdb-ci git commit: use the SCM sync plug-in

use the SCM sync plug-in


Project: http://git-wip-us.apache.org/repos/asf/couchdb-ci/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-ci/commit/c0131b74
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-ci/tree/c0131b74
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-ci/diff/c0131b74

Branch: refs/heads/master
Commit: c0131b745550a7dd29c19f1ec0293f5a8e5fd944
Parents: e1b1854
Author: Bastian Krol <ba...@web.de>
Authored: Sat Aug 1 13:41:52 2015 +0200
Committer: Bastian Krol <ba...@web.de>
Committed: Sat Aug 1 13:41:52 2015 +0200

----------------------------------------------------------------------
 .../jenkins/plugins/scm-sync-configuration.jpi  | Bin 0 -> 7064483 bytes
 ansible/roles/jenkins-master/tasks/jenkins.yml  |  20 +++++++++++++++++++
 ansible/roles/jenkins-master/tasks/main.yml     |   6 ++++++
 ansible/roles/ubuntu-worker/tasks/main.yml      |   6 ++++++
 readme.markdown                                 |   9 ++++++++-
 5 files changed, 40 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/c0131b74/ansible/roles/jenkins-master/files/jenkins/plugins/scm-sync-configuration.jpi
----------------------------------------------------------------------
diff --git a/ansible/roles/jenkins-master/files/jenkins/plugins/scm-sync-configuration.jpi b/ansible/roles/jenkins-master/files/jenkins/plugins/scm-sync-configuration.jpi
new file mode 100644
index 0000000..6260427
Binary files /dev/null and b/ansible/roles/jenkins-master/files/jenkins/plugins/scm-sync-configuration.jpi differ

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/c0131b74/ansible/roles/jenkins-master/tasks/jenkins.yml
----------------------------------------------------------------------
diff --git a/ansible/roles/jenkins-master/tasks/jenkins.yml b/ansible/roles/jenkins-master/tasks/jenkins.yml
index d2721f6..00fd5e3 100644
--- a/ansible/roles/jenkins-master/tasks/jenkins.yml
+++ b/ansible/roles/jenkins-master/tasks/jenkins.yml
@@ -34,6 +34,24 @@
     group: jenkins
     mode: 0600
 
+- name: create plugins folder
+  file:
+    path: /var/lib/jenkins/plugins
+    owner: jenkins
+    group: jenkins
+    state: directory
+
+- name: install plug-ins
+  copy:
+    src: jenkins/plugins/{{ item }}.jpi
+    dest: /var/lib/jenkins/plugins/{{ item }}.jpi
+    owner: jenkins
+    group: jenkins
+  with_items:
+  - scm-sync-configuration
+  notify: restart jenkins service
+
+  # TODO This can be removed, SCM sync plug-in will handle job configs
 - name: create build job folder
   file:
     path: /var/lib/jenkins/jobs/couchdb-build-1.6.x-ubuntu/builds
@@ -41,6 +59,7 @@
     group: jenkins
     state: directory
 
+  # TODO This can be removed, SCM sync plug-in will handle job configs
 - name: create build job config
   template:
     src: jenkins/jobs/couchdb-build-1.6.x-ubuntu.xml
@@ -49,6 +68,7 @@
     group: jenkins
   notify: restart jenkins service
 
+  # TODO This can be removed, SCM sync plug-in will handle job configs
 - name: create nextBuildNumber file
   copy:
     dest: /var/lib/jenkins/jobs/couchdb-build-1.6.x-ubuntu/nextBuildNumber

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/c0131b74/ansible/roles/jenkins-master/tasks/main.yml
----------------------------------------------------------------------
diff --git a/ansible/roles/jenkins-master/tasks/main.yml b/ansible/roles/jenkins-master/tasks/main.yml
index b27ed50..e1d5f05 100644
--- a/ansible/roles/jenkins-master/tasks/main.yml
+++ b/ansible/roles/jenkins-master/tasks/main.yml
@@ -1,3 +1,9 @@
 ---
+# Install auxiliary packages
+- name: install auxiliary packages
+  apt: name={{item}} state=present
+  with_items:
+  - git
+
 - include: jenkins.yml
 - include: nginx.yml

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/c0131b74/ansible/roles/ubuntu-worker/tasks/main.yml
----------------------------------------------------------------------
diff --git a/ansible/roles/ubuntu-worker/tasks/main.yml b/ansible/roles/ubuntu-worker/tasks/main.yml
index de00fd8..3355657 100644
--- a/ansible/roles/ubuntu-worker/tasks/main.yml
+++ b/ansible/roles/ubuntu-worker/tasks/main.yml
@@ -8,6 +8,12 @@
     state: present
     update_cache: yes
 
+# Install auxiliary packages (not required to build CouchDB)
+- name: install auxiliary packages
+  apt: name={{item}} state=present
+  with_items:
+  - git
+
 # Install packages required to build CouchDB via apt-get
 - name: install packages required to build CouchDB
   apt: name={{item}} state=present

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/c0131b74/readme.markdown
----------------------------------------------------------------------
diff --git a/readme.markdown b/readme.markdown
index ec2bf5e..0d30947 100644
--- a/readme.markdown
+++ b/readme.markdown
@@ -18,8 +18,11 @@ Current state:
 - [x] create CouchDB build job in Jenkins via Ansible
 - [x] switch to master-worker Jenkins setup
 - [x] use ntp server for master and workers
+- [ ] Use SCM sync plug-in to manage job configs
+    * http://stackoverflow.com/questions/27138043/jenkins-scm-sync-configuration-plugin-in-docker-wont-talk-to-github
+    * https://cburgmer.wordpress.com/2013/01/02/tracking-configuration-changes-in-jenkins/
+- [ ] enable auth for Jenkins
 - [ ] actually fetch CouchDB from VCS
-- [ ] optional: switch to Jenkins Job DSL plug-in for defining jobs?
 - [ ] all apt-get commands should pin a specific version, in the base box definition as well as in Ansible. How?
 - [ ] create an additional Ubuntu worker with an older Erlang version
 - [ ] create another base box (different linux distro) for a third worker
@@ -27,6 +30,10 @@ Current state:
 
 *Remark: Throughout this repository we use the terms "master"/"worker" for the Jenkins build machines, whereas the Jenkins documentation uses the terms "master"/"slave".*
 
+## SCM Sync Plug-in/Jenkins Public SSH Key
+
+The SCM Sync Jenkins plug-in is used to manage the Jenkins configuration and also the job configurations. To be able to do this, the public key that Jenkins uses needs to be uploaded as a deploy key at the associated repository (currently https://github.com/basti1302/couchdb-ci-jenkins-config/settings/keys). Unfortunately, this key might change. More specifically: The Ansible scripts will regenerate a key pair at runtime automatically if they don't find an existing key pair from a previous run.
+
 Vagrant Configuration for Testing the CouchDB CI Setup Locally
 --------------------------------------------------------------