mirror of https://gerrit.osmocom.org/osmo-ci
48 lines
1.2 KiB
YAML
48 lines
1.2 KiB
YAML
---
|
|
|
|
- name: install jenkins packages
|
|
include_tasks: debian.yml
|
|
when: ansible_distribution == 'Debian'
|
|
|
|
- name: add user jenkins
|
|
user:
|
|
name: "{{ jenkins_user }}"
|
|
generate_ssh_key: yes
|
|
ssh_key_bits: 4096
|
|
ssh_key_type: rsa
|
|
shell: /bin/bash
|
|
|
|
- name: setup jenkins ssh key
|
|
authorized_key:
|
|
user: "{{ jenkins_user }}"
|
|
key: "{{ lookup('file', 'jenkins.osmocom.org.pub') }}"
|
|
|
|
- name: install ttcn3 dependencies
|
|
include_tasks: ttcn3-slave.yml
|
|
when: ttcn3_slave and ansible_distribution == 'Debian' and ansible_distribution_version|int >= 9 and not (ansible_architecture == "armv7l" or ansible_architecture == "arm64")
|
|
|
|
- name: include osmocom_build_deps.yml
|
|
include_tasks: osmocom_build_deps.yml
|
|
when: install_osmocom_build_deps
|
|
|
|
- name: include generic slave
|
|
include_tasks: generic-slave.yml
|
|
when: generic_slave
|
|
|
|
- name: set-up osmo-ci repo
|
|
include_tasks: osmo-ci.yml
|
|
when: generic_slave
|
|
|
|
- name: copy .gitconfig
|
|
copy:
|
|
src: gitconfig
|
|
dest: "/home/{{ jenkins_user }}/.gitconfig"
|
|
|
|
- name: call fstrim periodically
|
|
cron:
|
|
name: "fstrim"
|
|
hour: "*/12"
|
|
minute: 0
|
|
job: "fstrim / >/dev/null 2>/dev/null || true"
|
|
when: osmocom_jenkins_slave_fstrim
|