Change in osmo-ci[master]: generalize the install-poky-sdk role to support multiple sdks

lynxis lazus gerrit-no-reply at lists.osmocom.org
Fri Apr 26 13:30:54 UTC 2019


lynxis lazus has uploaded this change for review. ( https://gerrit.osmocom.org/13793


Change subject: generalize the install-poky-sdk role to support multiple sdks
......................................................................

generalize the install-poky-sdk role to support multiple sdks

Change-Id: I35f34a089311808cb21a064dd50e41cd1887b320
---
M ansible/roles/install-poky-sdk/README.md
M ansible/roles/install-poky-sdk/defaults/main.yml
M ansible/roles/install-poky-sdk/tasks/main.yml
M ansible/setup-desktop.yml
M ansible/setup-jenkins-slave.yml
5 files changed, 32 insertions(+), 12 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/93/13793/1

diff --git a/ansible/roles/install-poky-sdk/README.md b/ansible/roles/install-poky-sdk/README.md
index 541ea3c..7f2c31e 100644
--- a/ansible/roles/install-poky-sdk/README.md
+++ b/ansible/roles/install-poky-sdk/README.md
@@ -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
 
 The poky installation requires you to have the installer available.
 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
-`poky_version`.
-For the defaults of those variable have a look into `defaults/main.yml`.
+Also the exact filename must match the variable `poky_installer_file`
 
+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
+```
diff --git a/ansible/roles/install-poky-sdk/defaults/main.yml b/ansible/roles/install-poky-sdk/defaults/main.yml
index 9b8eb04..5b7385c 100644
--- a/ansible/roles/install-poky-sdk/defaults/main.yml
+++ b/ansible/roles/install-poky-sdk/defaults/main.yml
@@ -1,7 +1,3 @@
 ---
 # OS user
 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
-
diff --git a/ansible/roles/install-poky-sdk/tasks/main.yml b/ansible/roles/install-poky-sdk/tasks/main.yml
index 9d64347..85b310a 100644
--- a/ansible/roles/install-poky-sdk/tasks/main.yml
+++ b/ansible/roles/install-poky-sdk/tasks/main.yml
@@ -1,5 +1,4 @@
 ---
-
 - name: install bzip2 and tar
   apt:
     name: "{{ item }}"
@@ -19,21 +18,28 @@
   tags: [poky]
 
 - name: execute poky installer
-  command: "/tmp/{{ poky_installer_file }} -y"
+  command: "/tmp/{{ poky_installer_file }} -y -d '{{ poky_dest }}'"
   args:
-    creates: "/opt/poky/{{ poky_version }}"
+    creates: "{{ poky_dest }}"
   when: poky_copy.failed == false
   tags: [poky]
 
 - name: change owner/group to jenkins user
   file:
-    path: /opt/poky
+    path: "{{ poky_dest }}"
     owner: "{{ jenkins_user }}"
     group: "{{ jenkins_user }}"
     recurse: yes
   when: poky_copy.failed == false
   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"
   debug:
     msg: "Ansible can not find or copy {{ poky_installer_file }}"
diff --git a/ansible/setup-desktop.yml b/ansible/setup-desktop.yml
index 507a8f2..563d124 100644
--- a/ansible/setup-desktop.yml
+++ b/ansible/setup-desktop.yml
@@ -9,6 +9,8 @@
 
     - 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:
         - poky
 
diff --git a/ansible/setup-jenkins-slave.yml b/ansible/setup-jenkins-slave.yml
index 4ca7188..1135ab2 100644
--- a/ansible/setup-jenkins-slave.yml
+++ b/ansible/setup-jenkins-slave.yml
@@ -21,6 +21,15 @@
 
     - 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-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:
         - poky
 

-- 
To view, visit https://gerrit.osmocom.org/13793
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I35f34a089311808cb21a064dd50e41cd1887b320
Gerrit-Change-Number: 13793
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus <lynxis at fe80.eu>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190426/295575cb/attachment.html>


More information about the gerrit-log mailing list