Commit 3fb80570 by Jeff LaJoie

TNL-6278 adds in browser role to tools_jenkins for bok-choy tests

parent b85cf377
FROM edxops/precise-common:latest FROM edxops/trusty-common:latest
MAINTAINER edxops MAINTAINER edxops
USER root USER root
......
...@@ -20,6 +20,12 @@ browser_s3_deb_pkgs: ...@@ -20,6 +20,12 @@ browser_s3_deb_pkgs:
- name: google-chrome-stable_55.0.2883.87-1_amd64.deb - name: google-chrome-stable_55.0.2883.87-1_amd64.deb
url: https://s3.amazonaws.com/vagrant.testeng.edx.org/google-chrome-stable_55.0.2883.87-1_amd64.deb url: https://s3.amazonaws.com/vagrant.testeng.edx.org/google-chrome-stable_55.0.2883.87-1_amd64.deb
trusty_browser_s3_deb_pkgs:
- name: google-chrome-stable_30.0.1599.114-1_amd64.deb
url: https://s3.amazonaws.com/vagrant.testeng.edx.org/google-chrome-stable_30.0.1599.114-1_amd64.deb
- name: firefox-mozilla-build_42.0-0ubuntu1_amd64.deb
url: https://s3.amazonaws.com/vagrant.testeng.edx.org/firefox-mozilla-build_42.0-0ubuntu1_amd64.deb
# ChromeDriver # ChromeDriver
chromedriver_version: 2.27 chromedriver_version: 2.27
chromedriver_url: "http://chromedriver.storage.googleapis.com/{{ chromedriver_version }}/chromedriver_linux64.zip" chromedriver_url: "http://chromedriver.storage.googleapis.com/{{ chromedriver_version }}/chromedriver_linux64.zip"
......
...@@ -21,20 +21,42 @@ ...@@ -21,20 +21,42 @@
- install - install
- install:system-requirements - install:system-requirements
- name: download browser packages from S3 - name: download trusty browser packages from S3
get_url:
dest: /tmp/{{ item.name }}
url: "{{ item.url }}"
register: download_deb
with_items: "{{ trusty_browser_s3_deb_pkgs }}"
when: ansible_distribution_release == 'trusty'
tags:
- install
- install:system-requirements
- name: download xenial browser packages from S3
get_url: get_url:
dest: /tmp/{{ item.name }} dest: /tmp/{{ item.name }}
url: "{{ item.url }}" url: "{{ item.url }}"
register: download_deb register: download_deb
with_items: "{{ browser_s3_deb_pkgs }}" with_items: "{{ browser_s3_deb_pkgs }}"
when: ansible_distribution_release == 'xenial'
tags:
- install
- install:system-requirements
- name: install trusty browser packages
shell: gdebi -nq /tmp/{{ item.name }}
when: download_deb.changed
with_items: "{{ trusty_browser_s3_deb_pkgs }}"
when: ansible_distribution_release == 'trusty'
tags: tags:
- install - install
- install:system-requirements - install:system-requirements
- name: install browser packages - name: install xenial browser packages
shell: gdebi -nq /tmp/{{ item.name }} shell: gdebi -nq /tmp/{{ item.name }}
when: download_deb.changed when: download_deb.changed
with_items: "{{ browser_s3_deb_pkgs }}" with_items: "{{ browser_s3_deb_pkgs }}"
when: ansible_distribution_release == 'xenial'
tags: tags:
- install - install
- install:system-requirements - install:system-requirements
...@@ -127,12 +149,29 @@ ...@@ -127,12 +149,29 @@
- install - install
- install:system-requirements - install:system-requirements
# Systemd doesn't exist in 14.04, use upstart instead
- name: create xvfb upstart script
template:
src: xvfb.conf.j2
dest: /etc/init/xvfb.conf
owner: root
group: root
when: ansible_distribution_release == 'trusty'
- name: start xvfb
service:
name: xvfb
state: restarted
when: ansible_distribution_release == 'trusty'
# Use systemd for xvfb in 16.04
- name: create xvfb systemd service - name: create xvfb systemd service
template: template:
src: xvfb.service.j2 src: xvfb.service.j2
dest: /etc/systemd/system/xvfb.service dest: /etc/systemd/system/xvfb.service
owner: root owner: root
group: root group: root
when: ansible_distribution_release == 'xenial'
tags: tags:
- install - install
- install:configuration - install:configuration
...@@ -142,6 +181,7 @@ ...@@ -142,6 +181,7 @@
name: xvfb name: xvfb
enabled: yes enabled: yes
state: started state: started
when: ansible_distribution_release == 'xenial'
tags: tags:
- install - install
- install:configuration - install:configuration
description "Xvfb X Server"
start on (net-device-up and local-filesystems and runlevel [2345])
stop on runlevel [016]
exec /usr/bin/Xvfb {{ browser_xvfb_display }} -screen 0 1024x768x24
respawn
respawn limit 15 5
--- ---
jenkins_tools_version: "1.651.3" jenkins_tools_version: "1.651.3"
jenkins_tools_plugins: jenkins_tools_plugins:
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
dependencies: dependencies:
- common - common
- edxapp_common - edxapp_common
- browsers
- role: jenkins_master - role: jenkins_master
jenkins_plugins: "{{ jenkins_tools_plugins }}" jenkins_plugins: "{{ jenkins_tools_plugins }}"
jenkins_version: "{{ jenkins_tools_version }}" jenkins_version: "{{ jenkins_tools_version }}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment