From 5e19b199ff0b86a410981f32ea08de6ddc3a9288 Mon Sep 17 00:00:00 2001 From: Heewon Park Date: Fri, 18 Jun 2021 16:00:50 +0900 Subject: [PATCH] Add install E2AP library shellscript for xapp-framework-py. - add install-deb-e2ap.sh for install e2ap lib - update ric-plt-xapp-frame-py.yaml to use install-deb-e2ap.sh Issue-ID: RIC-664 Signed-off-by: Heewon Park Change-Id: Iff72cc418fecbc96a202831860a25ee72a7facd7 --- .../ric-plt-xapp-frame-py.yaml | 1 + jjb/shell/install-deb-e2ap.sh | 51 ++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100755 jjb/shell/install-deb-e2ap.sh diff --git a/jjb/ric-plt-xapp-frame-py/ric-plt-xapp-frame-py.yaml b/jjb/ric-plt-xapp-frame-py/ric-plt-xapp-frame-py.yaml index d0f70f59..8fb58075 100644 --- a/jjb/ric-plt-xapp-frame-py/ric-plt-xapp-frame-py.yaml +++ b/jjb/ric-plt-xapp-frame-py/ric-plt-xapp-frame-py.yaml @@ -26,6 +26,7 @@ build-node: ubuntu1804-builder-2c-2g pre-build-script: !include-raw-escape: - ../shell/install-deb-rmr.sh + - ../shell/install-deb-e2ap.sh - project: name: ric-plt-xapp-frame-py-pypi diff --git a/jjb/shell/install-deb-e2ap.sh b/jjb/shell/install-deb-e2ap.sh new file mode 100755 index 00000000..ecee2ff5 --- /dev/null +++ b/jjb/shell/install-deb-e2ap.sh @@ -0,0 +1,51 @@ +#!/bin/bash + +# O-RAN-SC +# +# Copyright (C) 2020 AT&T Intellectual Property and Nokia +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Installs E2AP headers and shared-object libraries from PackageCloud +# on a Debian; does NOT install or assume NNG. +# Reads E2AP version number from repo file e2ap-version.yaml like this: +# --- +# version: 1.1.0 (this entry is required) + +echo "---> install-deb-e2ap.sh" +# stop on error or unbound var, and be chatty +set -eux + +version_file=e2ap-version.yaml +if [[ -f $version_file ]]; then + # pipeline is less elegant than yq but that requires venv and pip install + repo=$(grep "^repo:" "$version_file" | cut -d: -f2 | xargs ) + ver=$(grep "^version:" "$version_file" | cut -d: -f2 | xargs) +else + echo "File $version_file not found." + exit 1 +fi +if [[ -z $ver ]]; then + echo "Failed to get E2AP version string from file $version_file" + exit 1 +fi +# default to release repo; accept override to use staging repo +repo=${repo:-"release"} +# +for deb in "riclibe2ap_${ver}_amd64.deb" "riclibe2ap-dev_${ver}_amd64.deb"; do + wget -nv --content-disposition "https://packagecloud.io/o-ran-sc/${repo}/packages/debian/stretch/${deb}/download.deb" + sudo dpkg -i "${deb}" + rm -f "${deb}" +done + +echo "---> install-deb-e2ap.sh ends" -- 2.16.6