Fix functional testing for Ubuntu
Change-Id: Ic02a84f7f44f0589ac7b53bd1aa73fc1400c27f0 Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
parent
af22492259
commit
e7869b9e49
@ -21,8 +21,9 @@
|
|||||||
with_items:
|
with_items:
|
||||||
- "{{ jenkins_user_home }}/plugins"
|
- "{{ jenkins_user_home }}/plugins"
|
||||||
|
|
||||||
- name: Template clouds yaml file.
|
- name: Template jenkins service config.
|
||||||
template:
|
template:
|
||||||
dest: "{{ jenkins_template_config_dest }}"
|
dest: "{{ jenkins_template_config_dest }}"
|
||||||
src: "{{ jenkins_template_config_src }}"
|
src: "{{ jenkins_template_config_src }}"
|
||||||
|
when: ansible_os_family == 'RedHat'
|
||||||
notify: Restart jenkins
|
notify: Restart jenkins
|
||||||
|
@ -17,5 +17,13 @@
|
|||||||
jenkins_build_depends: "{{ __jenkins_build_depends | list }}"
|
jenkins_build_depends: "{{ __jenkins_build_depends | list }}"
|
||||||
when: jenkins_build_depends is not defined
|
when: jenkins_build_depends is not defined
|
||||||
|
|
||||||
- include: install/redhat.yaml
|
- name: Ensure build dependencies are installed.
|
||||||
when: ansible_os_family == 'RedHat'
|
package:
|
||||||
|
name: "{{ item }}"
|
||||||
|
state: installed
|
||||||
|
with_items: jenkins_build_depends
|
||||||
|
|
||||||
|
- name: Ensure jenkins is installed.
|
||||||
|
package:
|
||||||
|
name: jenkins
|
||||||
|
state: installed
|
||||||
|
1
tests/files/jenkins/etc/apt/sources.list.d/jenkins.list
Normal file
1
tests/files/jenkins/etc/apt/sources.list.d/jenkins.list
Normal file
@ -0,0 +1 @@
|
|||||||
|
deb http://pkg.jenkins-ci.org/debian binary/
|
@ -18,12 +18,6 @@
|
|||||||
rolename: "{{ lookup('pipe', 'pwd') | dirname | basename }}"
|
rolename: "{{ lookup('pipe', 'pwd') | dirname | basename }}"
|
||||||
|
|
||||||
pre_tasks:
|
pre_tasks:
|
||||||
# Make sure OS does not have a stale package cache.
|
|
||||||
- name: Update apt cache.
|
|
||||||
apt:
|
|
||||||
update_cache: yes
|
|
||||||
when: ansible_os_family == 'Debian'
|
|
||||||
|
|
||||||
- name: Configure yum for Jenkins repository.
|
- name: Configure yum for Jenkins repository.
|
||||||
become: yes
|
become: yes
|
||||||
copy:
|
copy:
|
||||||
@ -31,6 +25,13 @@
|
|||||||
dest: /etc/yum.repos.d
|
dest: /etc/yum.repos.d
|
||||||
when: ansible_os_family == 'RedHat'
|
when: ansible_os_family == 'RedHat'
|
||||||
|
|
||||||
|
- name: Configure apt for Jenkins repository.
|
||||||
|
become: yes
|
||||||
|
copy:
|
||||||
|
src: jenkins/etc/apt/sources.list.d/jenkins.list
|
||||||
|
dest: /etc/apt/sources.list.d
|
||||||
|
when: ansible_os_family == 'Debian'
|
||||||
|
|
||||||
- name: Configure gpg key for Jenkins repository.
|
- name: Configure gpg key for Jenkins repository.
|
||||||
become: yes
|
become: yes
|
||||||
copy:
|
copy:
|
||||||
@ -44,5 +45,16 @@
|
|||||||
key: /etc/pki/rpm-gpg/jenkins-ci.org.key
|
key: /etc/pki/rpm-gpg/jenkins-ci.org.key
|
||||||
when: ansible_os_family == 'RedHat'
|
when: ansible_os_family == 'RedHat'
|
||||||
|
|
||||||
|
- name: Import GPG key for Jenkins repo.
|
||||||
|
become: yes
|
||||||
|
apt_key:
|
||||||
|
data: "{{ lookup('file', 'jenkins/jenkins-ci.org.key') }}"
|
||||||
|
when: ansible_os_family == 'Debian'
|
||||||
|
|
||||||
|
- name: Update apt cache.
|
||||||
|
apt:
|
||||||
|
update_cache: yes
|
||||||
|
when: ansible_os_family == 'Debian'
|
||||||
|
|
||||||
roles:
|
roles:
|
||||||
- "{{ rolename }}"
|
- "{{ rolename }}"
|
||||||
|
@ -12,13 +12,5 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
---
|
---
|
||||||
- name: Ensure build dependencies are installed.
|
__jenkins_build_depends:
|
||||||
yum:
|
- openjdk-7-jdk
|
||||||
pkg: "{{ item }}"
|
|
||||||
state: installed
|
|
||||||
with_items: jenkins_build_depends
|
|
||||||
|
|
||||||
- name: Ensure jenkins is installed.
|
|
||||||
yum:
|
|
||||||
pkg: jenkins
|
|
||||||
state: installed
|
|
Loading…
x
Reference in New Issue
Block a user