summaryrefslogtreecommitdiff
path: root/per-service
diff options
context:
space:
mode:
authorBen Copeland <ben.copeland@linaro.org>2016-08-19 12:02:16 +0100
committerBen Copeland <ben.copeland@linaro.org>2016-09-13 14:38:51 +0000
commit98179f8c8df46bab6cfd71afa55a5d3d25761e1f (patch)
tree7d2866e827ee43e58e28e842253cf0f06ec9261d /per-service
parent686f2bf5fa47ddc8760ce0781f21a06f5c218691 (diff)
downloadansible-playbooks-98179f8c8df46bab6cfd71afa55a5d3d25761e1f.tar.gz
Jenkins: Lint errors android-build removal
Fix a couple basic linting errors, and move unused roles/files related to android-build. Change-Id: I50c77ef4fc86076447534c24168e957546e6cfea Reviewed-on: https://review.linaro.org/13807 Reviewed-by: Andy Doan <andy.doan@linaro.org> Reviewed-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Diffstat (limited to 'per-service')
-rw-r--r--per-service/jenkins/frontend.yml12
-rw-r--r--per-service/jenkins/jenkins.yml7
-rw-r--r--per-service/jenkins/reposeed.yml5
-rw-r--r--per-service/jenkins/roles/apache/tasks/main.yml3
-rw-r--r--per-service/jenkins/roles/frontend/tasks/main.yml102
-rw-r--r--per-service/jenkins/roles/frontend/templates/settings_prod.py18
-rw-r--r--per-service/jenkins/roles/frontend/vars/main.yml2
-rw-r--r--per-service/jenkins/roles/jenkins-cli/tasks/main.yml7
-rw-r--r--per-service/jenkins/roles/jenkins-config-git/tasks/main.yml2
-rw-r--r--per-service/jenkins/roles/jenkins-cronjobs/tasks/main.yml3
-rw-r--r--per-service/jenkins/roles/jenkins-utils-set-jenkins-url/tasks/main.yml11
-rw-r--r--per-service/jenkins/roles/jenkins/tasks/jenkins-pkgs.yml20
-rw-r--r--per-service/jenkins/roles/reposeed/tasks/main.yml6
-rw-r--r--per-service/jenkins/site.yml5
14 files changed, 11 insertions, 192 deletions
diff --git a/per-service/jenkins/frontend.yml b/per-service/jenkins/frontend.yml
deleted file mode 100644
index 06598b5..0000000
--- a/per-service/jenkins/frontend.yml
+++ /dev/null
@@ -1,12 +0,0 @@
----
-- hosts: android-build
- gather_facts: no
- vars:
- - linaro_android_frontend_repo: http://git.linaro.org/git/infrastructure/linaro-android-frontend.git
- - linaro_android_frontend_rev: HEAD
- vars_files:
- - ["{{private_vars}}", "vars/empty.yml"]
- roles:
- - common
- - {role: jenkins-user, when: not jenkins_config_from_backup|bool}
- - frontend
diff --git a/per-service/jenkins/jenkins.yml b/per-service/jenkins/jenkins.yml
index 10d3ea6..7fcc8a7 100644
--- a/per-service/jenkins/jenkins.yml
+++ b/per-service/jenkins/jenkins.yml
@@ -29,7 +29,6 @@
- {role: linaro-jenkins-tools, tags: ['linaro-jenkins-tools']}
- {role: jenkins-utils-cron-disable}
- {role: jenkins-utils-publish-staging}
- - {role: jenkins-utils-set-jenkins-url}
- {role: jenkins-cli}
tasks:
- name: Check out linaro-android-build-tools
@@ -44,9 +43,3 @@
roles:
- dput-config
- {role: squid, tags: ["squid"]}
-
-- hosts: android-build.linaro.org
- gather_facts: no
- become: yes
- roles:
- - {role: jenkins-cronjobs, tags: ["cron"]}
diff --git a/per-service/jenkins/reposeed.yml b/per-service/jenkins/reposeed.yml
deleted file mode 100644
index af61d92..0000000
--- a/per-service/jenkins/reposeed.yml
+++ /dev/null
@@ -1,5 +0,0 @@
-- hosts: android-build
- gather_facts: no
- roles:
- - common
- - reposeed
diff --git a/per-service/jenkins/roles/apache/tasks/main.yml b/per-service/jenkins/roles/apache/tasks/main.yml
index 8f644d9..58bed17 100644
--- a/per-service/jenkins/roles/apache/tasks/main.yml
+++ b/per-service/jenkins/roles/apache/tasks/main.yml
@@ -2,8 +2,7 @@
apt: pkg={{item}}
with_items:
- apache2
- # This is actually needed only for android-build frontend app
- - libapache2-mod-wsgi
+
- name: Enable Apache modules
command: a2enmod {{item}} creates=/etc/apache2/mods-enabled/{{item}}.load
with_items:
diff --git a/per-service/jenkins/roles/frontend/tasks/main.yml b/per-service/jenkins/roles/frontend/tasks/main.yml
deleted file mode 100644
index b84194c..0000000
--- a/per-service/jenkins/roles/frontend/tasks/main.yml
+++ /dev/null
@@ -1,102 +0,0 @@
-- name: Install Frontend package dependencies
- apt: pkg={{item}}
- with_items:
- - libapache2-mod-wsgi
- - python-virtualenv
- - python-lxml
- - python-openid
- - tidy
- - unzip
- - python-cssutils
- - python-lxml
- - sqlite3
- # ??
- - python-pycurl
-
-- name: Create frontend user
- user: name=build-system-frontend comment="Android Build Frontend"
-
-- name: Create Frontend var dir
- file: state=directory path=/var/lib/linaro-abs-frontend/ owner=www-data
-
-- name: Install Frontend/Jenkins auth password
- copy: content={{ lookup('password', cred_store + '/jenkins/frontend') }}
- dest=/var/lib/linaro-abs-frontend/jenkins-password mode=0640
- become_user: www-data
- when: not jenkins_config_from_backup|bool
-
-- name: Install Frontend/Jenkins auth password
- copy: content={{jenkins_frontend_passwd}}
- dest=/var/lib/linaro-abs-frontend/jenkins-password mode=0640
- become_user: www-data
- when: jenkins_config_from_backup|bool
-
-- name: Check out Frontend
- git: name={{linaro_android_frontend_repo}} version={{linaro_android_frontend_rev}}
- dest=~/frontend-{{linaro_android_frontend_rev}}
- become_user: build-system-frontend
- tags:
- - git
-
-- name: Create Frontend current version symlink
- file: state=link src=~/frontend-{{linaro_android_frontend_rev}}/ dest=~/frontend
- become_user: build-system-frontend
- tags:
- - git
-
-- name: Install Frontend
- shell: cd ~/frontend; make
- become_user: build-system-frontend
-
-- name: Create production config
- # TODO: actually replace SECRET_KEY
- template: src=settings_prod.py dest=~build-system-frontend/ mode=0640 owner=build-system-frontend group=www-data
- notify:
- - Restart Apache
-- name: Create config symlink
- # wart: relative symlinks not supported
- file: state=link src=~/settings_prod.py dest=~/frontend/settings_prod.py
- become_user: build-system-frontend
-- name: Create DB
- shell: cd ~build-system-frontend/frontend; ./bin/manage syncdb --noinput --settings settings_prod
- become_user: www-data
- # Fixture is automatically installed by syncdb
- #sudo -u www-data ./bin/manage loaddata --settings settings_prod group-fixture.json
-
-- name: Download YUI3
- get_url: url=http://yui.zenfs.com/releases/yui3/yui_3.3.0.zip dest=~/yui_3.3.0.zip
- become_user: build-system-frontend
- register: download_yui3
-- name: Extract YUI3
- shell: cd ~; unzip -o -q yui_3.3.0.zip
- become_user: build-system-frontend
- when: download_yui3.changed
-- name: Checkout patched lazr-js
- bzr: name=lp:~mwhudson/lazr-js/combo-mod_wsgi-config dest=~/lazr-js
- # version=?
- become_user: build-system-frontend
-- name: Setup lazr-js 1/3
- file: state=directory path=~/lazr-js/{{item}}
- with_items:
- - build/3.3.0
- - build/gallery
- become_user: build-system-frontend
-- name: Setup lazr-js 2/3
- file: state=link src=~/yui/build/ dest=~/lazr-js/build/3.3.0/build
- become_user: build-system-frontend
-- name: Setup lazr-js 3/3
- file: state=directory path=~/lazr-js/build/gallery/{{item}}
- with_items:
- - gallery-overlay-extras
- - gallery-outside-events
- - gallery-base64
- become_user: build-system-frontend
-
-- name: Fetch YUI gallery components
- get_url: url=http://yui.yahooapis.com/combo?gallery-2010.12.16-18-24/build/{{item}}/{{item}}-min.js
- dest=~/lazr-js/build/gallery/{{item}}/{{item}}-min.js
- with_items:
- - gallery-overlay-extras
- - gallery-outside-events
- - gallery-base64
- become_user: build-system-frontend
diff --git a/per-service/jenkins/roles/frontend/templates/settings_prod.py b/per-service/jenkins/roles/frontend/templates/settings_prod.py
deleted file mode 100644
index 7cfa7c8..0000000
--- a/per-service/jenkins/roles/frontend/templates/settings_prod.py
+++ /dev/null
@@ -1,18 +0,0 @@
-from settings import *
-
-MEDIA_URL = '/static/'
-USE_OWN_COMBO = True
-
-DATABASES['default']['NAME'] = '/var/lib/linaro-abs-frontend/session.db'
-
-FRONTEND_JENKINS_USER = 'linaro-android-build-frontend@linaro.org'
-FRONTEND_JENKINS_PASSWORD = open('/var/lib/linaro-abs-frontend/jenkins-password').read().strip()
-
-{% if frontend_auth == "openid" %}
-LOGIN_URL = '/openid/login/'
-{% elif frontend_auth == "crowd" %}
-AUTH_CROWD_APPLICATION_USER = '{{crowd_user}}'
-AUTH_CROWD_APPLICATION_PASSWORD = '{{crowd_passwd}}'
-{% endif %}
-
-SECRET_KEY = "{{ lookup('password', cred_store + '/frontend/django_secret_key') }}"
diff --git a/per-service/jenkins/roles/frontend/vars/main.yml b/per-service/jenkins/roles/frontend/vars/main.yml
deleted file mode 100644
index e927a04..0000000
--- a/per-service/jenkins/roles/frontend/vars/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-# "crowd" or "openid"
-frontend_auth: crowd
diff --git a/per-service/jenkins/roles/jenkins-cli/tasks/main.yml b/per-service/jenkins/roles/jenkins-cli/tasks/main.yml
index a73af81..c83d342 100644
--- a/per-service/jenkins/roles/jenkins-cli/tasks/main.yml
+++ b/per-service/jenkins/roles/jenkins-cli/tasks/main.yml
@@ -1,10 +1,11 @@
# Make sure Jenkins is (re)started
- meta: flush_handlers
-- wait_for: port={{jenkins_port}} timeout=60
+- name: Ensure jenkins port is up
+ wait_for: port={{jenkins_port}} timeout=60
-# Container port may be opened, but app running there may not yet be ready
-- wait_for: port={{jenkins_port}} delay=10 timeout=60
+- name: Container port may be opened, but app running there may not yet be ready
+ wait_for: port={{jenkins_port}} delay=10 timeout=60
- name: Download jenkins-cli, required by some cronjobs
get_url: url=http://localhost:{{jenkins_port}}{{jenkins_prefix}}/jnlpJars/jenkins-cli.jar
diff --git a/per-service/jenkins/roles/jenkins-config-git/tasks/main.yml b/per-service/jenkins/roles/jenkins-config-git/tasks/main.yml
index 4c513fa..8424e40 100644
--- a/per-service/jenkins/roles/jenkins-config-git/tasks/main.yml
+++ b/per-service/jenkins/roles/jenkins-config-git/tasks/main.yml
@@ -25,7 +25,7 @@
- git
- name: Copy config checkout to final destination (if not yet)
- shell: cp -a /home/ubuntu/jenkins /var/lib/
+ command: cp -a /home/ubuntu/jenkins /var/lib/
when: checkout_exists.stat.exists == False
tags:
- git
diff --git a/per-service/jenkins/roles/jenkins-cronjobs/tasks/main.yml b/per-service/jenkins/roles/jenkins-cronjobs/tasks/main.yml
deleted file mode 100644
index 0fc8556..0000000
--- a/per-service/jenkins/roles/jenkins-cronjobs/tasks/main.yml
+++ /dev/null
@@ -1,3 +0,0 @@
-- name: Set up cronjob to expire old builds of inactive jobs
- template: src=linaro-jenkins dest=/etc/cron.d/linaro-jenkins
- owner=root group=root mode=0644
diff --git a/per-service/jenkins/roles/jenkins-utils-set-jenkins-url/tasks/main.yml b/per-service/jenkins/roles/jenkins-utils-set-jenkins-url/tasks/main.yml
deleted file mode 100644
index 59fc681..0000000
--- a/per-service/jenkins/roles/jenkins-utils-set-jenkins-url/tasks/main.yml
+++ /dev/null
@@ -1,11 +0,0 @@
-- name: Set Jenkins URL
- shell: JENKINS_URL=https://{{ansible_ssh_host}}{{jenkins_prefix}} ./mangle-jobs jenkins-url-set.mangle
- --file=/var/lib/jenkins/jenkins.model.JenkinsLocationConfiguration.xml
- --backup --really
- chdir=linaro-jenkins-tools/mangle-jobs/
- become_user: jenkins
- when: "not production|bool and jenkins_config_from_backup|bool"
- notify:
- - Restart Jenkins
- tags:
- - mangle-jobs
diff --git a/per-service/jenkins/roles/jenkins/tasks/jenkins-pkgs.yml b/per-service/jenkins/roles/jenkins/tasks/jenkins-pkgs.yml
index b15aec0..8a96a63 100644
--- a/per-service/jenkins/roles/jenkins/tasks/jenkins-pkgs.yml
+++ b/per-service/jenkins/roles/jenkins/tasks/jenkins-pkgs.yml
@@ -20,13 +20,6 @@
- pkg
- jenkins-install
-- name: Download Jenkins {{jenkins_version}} LTS package
- get_url: url=http://pkg.jenkins-ci.org/debian-stable/binary/jenkins_{{jenkins_version}}_all.deb
- dest=/tmp/jenkins_{{jenkins_version}}_all.deb
- tags:
- - pkg
- - jenkins-install
-
# Make sure that Jenkins is stopped if running. Otherwise, they may be races
# with it trying to doing something on plugins we download, etc.
- name: Stop Jenkins (if running)
@@ -37,15 +30,12 @@
tags:
- jenkins-install
-- name: Install Jenkins
- shell: RUNLEVEL=1 dpkg -i --skip-same-version /tmp/jenkins_{{jenkins_version}}_all.deb
- register: dpkg_result
- changed_when: "'already installed' not in dpkg_result.stderr"
- notify:
- - Restart Jenkins
+- name: Install Jenkins-{{jenkins_version}} LTS package
+ apt: deb=http://pkg.jenkins-ci.org/debian-stable/binary/jenkins_{{jenkins_version}}_all.deb
+ notify: Restart Jenkins
tags:
- - pkg
- - jenkins-install
+ - pkg
+ - jenkins-install
# System-level Jenkins configuration
- name: Configure Jenkins port
diff --git a/per-service/jenkins/roles/reposeed/tasks/main.yml b/per-service/jenkins/roles/reposeed/tasks/main.yml
deleted file mode 100644
index 30246df..0000000
--- a/per-service/jenkins/roles/reposeed/tasks/main.yml
+++ /dev/null
@@ -1,6 +0,0 @@
-#- name: Create seed directory
-# file: state=directory path=/mnt2/seed
-
-- name: Create seed symlink
- file: state=link src=jenkins/jobs/_extra/seed dest=/mnt2/seed
- force=yes
diff --git a/per-service/jenkins/site.yml b/per-service/jenkins/site.yml
deleted file mode 100644
index bd2a790..0000000
--- a/per-service/jenkins/site.yml
+++ /dev/null
@@ -1,5 +0,0 @@
-# Main site file - deploys everything
----
-- include: jenkins.yml
-- include: frontend.yml
-- include: reposeed.yml