mirror of https://gerrit.osmocom.org/osmo-ci
generalize the install-poky-sdk role to support multiple sdks
Change-Id: I35f34a089311808cb21a064dd50e41cd1887b320
This commit is contained in:
parent
d745bee443
commit
0d33d9204a
|
@ -1,10 +1,17 @@
|
||||||
# Install the poky sdk used to build sysmobts binaries
|
# Install the poky sdk's used to build sysmobts binaries
|
||||||
|
|
||||||
# Poky Installation
|
# Poky Installation
|
||||||
|
|
||||||
The poky installation requires you to have the installer available.
|
The poky installation requires you to have the installer available.
|
||||||
Put the `poky_installer_file` to the root directory of this repo.
|
Put the `poky_installer_file` to the root directory of this repo.
|
||||||
Also the exact filename must match the variable `poky_installer_file` and the
|
Also the exact filename must match the variable `poky_installer_file`
|
||||||
`poky_version`.
|
|
||||||
For the defaults of those variable have a look into `defaults/main.yml`.
|
|
||||||
|
|
||||||
|
example:
|
||||||
|
```
|
||||||
|
- name: install-poky-sdk
|
||||||
|
jenkins_user: osmocom-build
|
||||||
|
poky_install_file: poky-glibc-x86_64-meta-toolchain-osmo-cortexa15hf-neon-toolchain-osmo-2.3.4-20190426050512.sh
|
||||||
|
poky_dest: /opt/poky-sdk/2.3.4/
|
||||||
|
tags:
|
||||||
|
- poky
|
||||||
|
```
|
||||||
|
|
|
@ -1,7 +1,3 @@
|
||||||
---
|
---
|
||||||
# OS user
|
# OS user
|
||||||
jenkins_user: jenkins
|
jenkins_user: jenkins
|
||||||
|
|
||||||
poky_installer_file: poky-glibc-x86_64-meta-toolchain-osmo-armv5te-toolchain-osmo-2.3.4.sh
|
|
||||||
poky_version: 2.3.4
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
---
|
---
|
||||||
|
|
||||||
- name: install bzip2 and tar
|
- name: install bzip2 and tar
|
||||||
apt:
|
apt:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
|
@ -19,21 +18,28 @@
|
||||||
tags: [poky]
|
tags: [poky]
|
||||||
|
|
||||||
- name: execute poky installer
|
- name: execute poky installer
|
||||||
command: "/tmp/{{ poky_installer_file }} -y"
|
command: "/tmp/{{ poky_installer_file }} -y -d '{{ poky_dest }}'"
|
||||||
args:
|
args:
|
||||||
creates: "/opt/poky/{{ poky_version }}"
|
creates: "{{ poky_dest }}"
|
||||||
when: poky_copy.failed == false
|
when: poky_copy.failed == false
|
||||||
tags: [poky]
|
tags: [poky]
|
||||||
|
|
||||||
- name: change owner/group to jenkins user
|
- name: change owner/group to jenkins user
|
||||||
file:
|
file:
|
||||||
path: /opt/poky
|
path: "{{ poky_dest }}"
|
||||||
owner: "{{ jenkins_user }}"
|
owner: "{{ jenkins_user }}"
|
||||||
group: "{{ jenkins_user }}"
|
group: "{{ jenkins_user }}"
|
||||||
recurse: yes
|
recurse: yes
|
||||||
when: poky_copy.failed == false
|
when: poky_copy.failed == false
|
||||||
tags: [poky]
|
tags: [poky]
|
||||||
|
|
||||||
|
- name: remove poky installer
|
||||||
|
file:
|
||||||
|
path: "/tmp/{{ poky_installer_file }}"
|
||||||
|
state: absent
|
||||||
|
when: poky_copy.failed == false
|
||||||
|
tags: [poky]
|
||||||
|
|
||||||
- name: "Please download {{ poky_installer_file }} to your ansible directory to allow ansible to install poky"
|
- name: "Please download {{ poky_installer_file }} to your ansible directory to allow ansible to install poky"
|
||||||
debug:
|
debug:
|
||||||
msg: "Ansible can not find or copy {{ poky_installer_file }}"
|
msg: "Ansible can not find or copy {{ poky_installer_file }}"
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
|
|
||||||
- name: install-poky-sdk
|
- name: install-poky-sdk
|
||||||
jenkins_user: osmocom-build
|
jenkins_user: osmocom-build
|
||||||
|
poky_installer_file: poky-glibc-x86_64-meta-toolchain-osmo-armv5te-toolchain-osmo-2.3.4.sh
|
||||||
|
poky_dest: /opt/poky-sdk/2.3.4/
|
||||||
tags:
|
tags:
|
||||||
- poky
|
- poky
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,15 @@
|
||||||
|
|
||||||
- name: install-poky-sdk
|
- name: install-poky-sdk
|
||||||
jenkins_user: osmocom-build
|
jenkins_user: osmocom-build
|
||||||
|
poky_install_file: poky-glibc-x86_64-meta-toolchain-osmo-cortexa15hf-neon-toolchain-osmo-2.3.4-20190426050512.sh
|
||||||
|
poky_dest: /opt/poky-oc2g/2.3.4/
|
||||||
|
tags:
|
||||||
|
- poky
|
||||||
|
|
||||||
|
- name: install-poky-sdk
|
||||||
|
jenkins_user: osmocom-build
|
||||||
|
poky_installer_file: poky-glibc-x86_64-meta-toolchain-osmo-armv5te-toolchain-osmo-2.3.4.sh
|
||||||
|
poky_dest: /opt/poky-sdk/2.3.4/
|
||||||
tags:
|
tags:
|
||||||
- poky
|
- poky
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue