summaryrefslogtreecommitdiffstats
path: root/ansible/roles/osmocom-jenkins-slave/tasks/main.yml
blob: dc2e843d5efae1d92a8dbaba5472a92ea7bf2a10 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
---

- name: install jenkins packages
  include: debian.yml
  when: ansible_distribution == 'Debian'

- name: install build utilities
  apt:
    name: "{{ item }}"
    cache_valid_time: 3600
    update_cache: yes
  with_items:
    - asciidoc
    - autoconf
    - automake
    - bc
    - bison
    - coccinelle
    - cppcheck
    - debhelper
    - devscripts
    - dh-autoreconf
    - dh-systemd
    - doxygen
    - flex
    - g++
    - gawk
    - gcc
    - gcc-arm-none-eabi
    - git
    - git-buildpackage
    - libtool
    - libboost-all-dev
    - make
    - mscgen
    - osc
    - pkgconf
    - python-minimal
    - python-setuptools
    - python3
    - python3-setuptools
    - stow
    - texinfo

- name: install build dependencies and libraries
  apt:
    name: "{{ item }}"
    cache_valid_time: 3600
    update_cache: yes
  with_items:
    - libc-ares-dev
    - libdbd-sqlite3
    - libdbi-dev
    - libffi-dev
    - libffi-dev
    - libfftw3-dev
    - libgmp-dev
    - libgnutls28-dev
    - libgps-dev
    - libgsm1-dev
    - libmnl-dev
    - libncurses5-dev
    - libortp-dev
    - libpcap-dev
    - libpcsclite-dev
    - libreadline-dev
    - libsctp-dev
    - libsigsegv-dev
    - libsnmp-dev
    - libsofia-sip-ua-glib-dev
    - libsqlite3-dev
    - libssl-dev
    - libsystemd-dev
    - libtalloc-dev
    - libusb-1.0-0-dev
    - libusb-dev
    - libzmq3-dev
    - sqlite3
    - libboost-dev
    - libuhd-dev

- 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: include generic slave
  include: generic-slave.yml
  when: generic_slave

- name: copy .gitconfig
  copy:
    src: gitconfig
    dest: "/home/{{ jenkins_user }}/.gitconfig"